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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

HTML-Based(Eclipse Wizard Builds #1 & #2)1. Create XML file– Top-level element is an HTML tag like – Put raw HTML <strong>in</strong>side– Use ui:field to mark places for later <strong>in</strong>sertion2. Create Java class that represents the XML– Extend UiObject– Use UiB<strong>in</strong>der <strong>in</strong>terface and GWT.create to b<strong>in</strong>d the Java class to theXML representation– Mark fields with @UiField (one for each ui:field <strong>in</strong> XML)– Call setElement– Insert content <strong>in</strong>to those fields3. Use new Java class <strong>in</strong> EntryPo<strong>in</strong>t class– Use DOM API with getElement and appendChild7Widget-Based(Eclipse Wizard Builds #1 & #2)81. Create XML file– Top-level element represents a Widget: – Put mixture of raw HTML and <strong>in</strong>side– Use ui:field to mark places for later <strong>in</strong>sertion2. Create Java class that represents the XML– Extend Composite– Use UiB<strong>in</strong>der <strong>in</strong>terface and GWT.create to b<strong>in</strong>d the Java class to theXML representation– Mark fields with @UiField (one for each ui:field <strong>in</strong> XML)– Call <strong>in</strong>itWidget– Set properties of those fields3. Use new Java class <strong>in</strong> EntryPo<strong>in</strong>t class– Use normal Widget methods• E.g., RootPanel.get(…).add(yourWidget)

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

Saved successfully!

Ooh no, something went wrong!