10.07.2015 Views

Tutorial section in PDF - Custom Training Courses - Coreservlets.com

Tutorial section in PDF - Custom Training Courses - Coreservlets.com

Tutorial section in PDF - Custom Training Courses - Coreservlets.com

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Example: ConstructorArg1.java...public class ConstructorArg1 extends Composite {private static ConstructorArg1UiB<strong>in</strong>der uiB<strong>in</strong>der =GWT.create(ConstructorArg1UiB<strong>in</strong>der.class);<strong>in</strong>terface ConstructorArg1UiB<strong>in</strong>derextends UiB<strong>in</strong>der {}@UiField(provided = true)FancyOptionalTextBox shared;Important! This must be <strong>in</strong>stantiated beforecall<strong>in</strong>g <strong>in</strong>itWidget(…).public ConstructorArg1() {// You would usually retrieve this from a factoryshared = new FancyOptionalTextBox("Shar<strong>in</strong>g is car<strong>in</strong>g!",true, false);<strong>in</strong>itWidget(uiB<strong>in</strong>der.createAndB<strong>in</strong>dUi(this));}...31Example: ContructorArg1.ui.xml...Us<strong>in</strong>g@UiField(provided=&quot;true&quot;):...Attributes correspond<strong>in</strong>g to setters can still beused as usual. This one corresponds tosetClearTextOnDisable(…).32

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!