diff options
| author | Benjamin Culkin <scorpress@gmail.com> | 2024-05-21 17:52:46 -0400 |
|---|---|---|
| committer | Benjamin Culkin <scorpress@gmail.com> | 2024-05-21 17:52:46 -0400 |
| commit | 3403adc8ac690439605072f9c4dc30995abac99f (patch) | |
| tree | bf039d2cab23157aeb8721328cfb4845bc7b7958 /wotonomy-web-test/WEB-INF/classes/Main.java | |
| parent | 8283e417245b26abd290f7e6fd0511869802fc82 (diff) | |
More work on getting a working example
Took a little bit, but I fixed the bindings and found the place where
they are supposed to be
Diffstat (limited to 'wotonomy-web-test/WEB-INF/classes/Main.java')
| -rw-r--r-- | wotonomy-web-test/WEB-INF/classes/Main.java | 54 |
1 files changed, 0 insertions, 54 deletions
diff --git a/wotonomy-web-test/WEB-INF/classes/Main.java b/wotonomy-web-test/WEB-INF/classes/Main.java deleted file mode 100644 index a12ca44..0000000 --- a/wotonomy-web-test/WEB-INF/classes/Main.java +++ /dev/null @@ -1,54 +0,0 @@ -import net.wotonomy.foundation.NSDate; -import net.wotonomy.web.*; - -public class Main extends WOComponent { - - private boolean showing; - private String textFieldValue; - - public Main() { - super(); - showing = true; - } - - public NSDate getCurrentTime() { - return new NSDate(); - } - - public boolean getShowTime() { - return showing; - } - public void setShowTime(boolean value) { - showing = value; - } - - public WOActionResults submit() { - System.out.println("Form Submitted"); - System.out.println("textfield says '" + getTextValue() + "'"); - return null; - } - - public void takeValuesFromRequest(WORequest r, WOContext c) { - System.out.println("taking values from request"); - if (r.formValueForKey("show") != null) - setShowTime(r.formValueForKey("show").equals("true")); - } - - public String getTimeLinkString() { - return showing ? "Hide the time display" : "Show time display"; - } - - public void setTextValue(String value) { - textFieldValue = value; - } - public String getTextValue() { - return textFieldValue; - } - - public WOComponent switchTime() { - System.out.println("switching time display"); - setShowTime(!getShowTime()); - return this; - } - -} |
