Tuesday, April 28, 2015

How to Add inner class which returns the Widget in GWT UiBinder

I am Using GWT UiBinder for creating custom component.Main class(Table uibinder) will create custom component table with pager,See below code

Table.ui.xml:

<ui:UiBinder xmlns:item="urn:import:"com.example.ui.widgets.item">      <g:HTMLPanel >              <item:CustomGrid ui:field="table"></item:CustomGrid>              <item:Pager ui:field="pager" </item:Pager>          </g:HTMLPanel>      </ui:UiBinder>

Table.java:

package com.example.ui.widgets.item;      public class Table extends Composite{          private static TableUiBinder uiBinder = GWT.create(TableUiBinder.class);            interface TableUiBinder extends                  UiBinder<Widget, CustomGrid> {          }            @UiField CustomGrid grid;          @UiField Pager pager;            public Table() {              initWidget(uiBinder.createAndBindUi(this));              }        class CustomGrid extends CellTable{      //create custom celltable       }        class Pager{      //Pagination code      }      }

How to access(&add) the Inner Class CustomGrid & Pager in UiBinder?What is syntax ?Any Suggestion

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment