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: Improved States/Cities ListBoxImprovedUi.ui.xmlUser ControlResultState:City:11Example: Improved States/Cities ListBoxImprovedUi.java...public class ImprovedUi extends Composite {private static ImprovedUiUiB<strong>in</strong>der uiB<strong>in</strong>der =GWT.create(ImprovedUiUiB<strong>in</strong>der.class);<strong>in</strong>terface ImprovedUiUiB<strong>in</strong>derextends UiB<strong>in</strong>der {}@UiField ListBox stateList;@UiField ListBox cityList;S<strong>in</strong>ce all the visual setup is done <strong>in</strong> UI XMLtemplate, no longer a need for setupListBoxmethod. All we need is to do is populate bothListBoxes.public ImprovedUi() {<strong>in</strong>itWidget(uiB<strong>in</strong>der.createAndB<strong>in</strong>dUi(this));populateStateList();cityList.addItem("Select City");}...12

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

Saved successfully!

Ooh no, something went wrong!