Subversion Repository Public Repository

litesoft

Diff Revisions 724 vs 749 for /trunk/GWT_Sandbox/FormEngine/src/org/litesoft/sampleapplication/sampleApplication/client/SampleApplication.java

Diff revisions: vs.
  @@ -12,7 +12,6 @@
12 12 import com.temp.client.foundation.util.*;
13 13 import com.temp.client.foundation.widget.*;
14 14 import com.temp.client.foundation.widget.input.*;
15 - import com.temp.shared.externalization.*;
16 15 import com.temp.shared.utils.*;
17 16 import com.temp.shared.validators.*;
18 17
  @@ -58,12 +57,12 @@
58 57
59 58 // Pretend "Injected" by the "ui.xml" file
60 59 private TextInputField tif = new TextInputField().name( "Fred" ).helpLink( "XX#Fred" ).required().maxLength( 9 ).extendedLabel().example().errorLabel();
61 - private OptionBoxInputField<Options> obif = new OptionBoxInputField<Options>().name("Wilma").helpLink("XX#YY").required().labelPosition(LabelPosition.Top).errorLabel();
62 - private CheckBoxInputField cbif = new CheckBoxInputField().name("Pebbles").helpLink("XX#YY").labelPosition(LabelPosition.Right);
63 - private RadioButtonInputField rbif1 = new RadioButtonInputField().name("Public").group("Visibility").helpLink( "XX#YY" ).labelPosition( LabelPosition.Right );
64 - private RadioButtonInputField rbif2 = new RadioButtonInputField().name("Private").group("Visibility").helpLink("XX#YY").labelPosition(LabelPosition.Right);
60 + private OptionBoxInputField<Options> obif = new OptionBoxInputField<Options>().name( "Wilma" ).helpLink( "XX#YY" ).required().labelPosition( LabelPosition.Top ).errorLabel();
61 + private CheckBoxInputField cbif = new CheckBoxInputField().name( "Pebbles" ).helpLink( "XX#YY" ).labelPosition( LabelPosition.Right );
62 + private RadioButtonInputField rbif1 = new RadioButtonInputField().name( "Public" ).group( "Visibility" ).helpLink( "XX#YY" ).labelPosition( LabelPosition.Right );
63 + private RadioButtonInputField rbif2 = new RadioButtonInputField().name( "Private" ).group( "Visibility" ).helpLink( "XX#YY" ).labelPosition( LabelPosition.Right );
65 64
66 - VerticalPanel radioButtonContainer = UtilsGwt.add( UtilsGwt.add( UtilsGwt.vertical("radioButtonContainer"), rbif1 ), rbif2 );
65 + VerticalPanel radioButtonContainer = UtilsGwt.add( UtilsGwt.add( UtilsGwt.vertical( "radioButtonContainer" ), rbif1 ), rbif2 );
67 66
68 67 private NamedTextButton buttonSetValue = new NamedTextButton( "SetValue", new ClickHandler()
69 68 {
  @@ -95,7 +94,7 @@
95 94 E13nResolver viewResolver = new OptionallyPrefixingE13nResolver( "BusinessUnitManager", globalResolver );
96 95
97 96 // Create Composite(s)
98 - rbgif = new RadioButtonGroupInputField(radioButtonContainer, rbif1, rbif2);
97 + rbgif = new RadioButtonGroupInputField( radioButtonContainer, rbif1, rbif2 );
99 98
100 99 // Create FormEngine
101 100 FormEngine fe = new FormEngine( "Family" );
  @@ -113,7 +112,7 @@
113 112 @Override
114 113 public void submit( String name )
115 114 {
116 - System.out.println( "Form '"+name+"' says OK to Submit!" );
115 + System.out.println( "Form '" + name + "' says OK to Submit!" );
117 116 }
118 117 } );
119 118 // Initialize the FormEngine (which will in turn initialize all the Input Fields)
  @@ -121,7 +120,6 @@
121 120 // Finally apply IDs to "everything" named
122 121 fe.addNamedWidgetsTo( new NameToID() ).applyIDs();
123 122
124 -
125 123 // Below here is what would normally be handled by the "ui.xml" file.
126 124
127 125 formPanel = new VerticalPanel();
  @@ -202,8 +200,10 @@
202 200 {
203 201 public void onClick( ClickEvent event )
204 202 {
205 - new Timer() {
206 - public void run() {
203 + new Timer()
204 + {
205 + public void run()
206 + {
207 207 fe.setFocused();
208 208 }
209 209 }.schedule( 100 );