gwt - Grid and Pager in UiBinder -
i trying build grid has pagination controls. understand datagrid
of gwt provides grid , simplepager
provides pagination.
i have taken approach shown in example http://gwt.googleusercontent.com/samples/showcase/showcase.html#!cwcelltable
but composition wrapped component neither grid not pager, composition of both.
if want extends datagrid
of gwt provide pagination how can achieve using uibinder
?
please ask me number of questions if not clear. thanks.
if understand correctly want element simplepager , datagrid @ same time. don't understand why need this? don't need , composition http://gwt.googleusercontent.com/samples/showcase/showcase.html#! doesn't have? if need able call functions of datagrid, suppose make class extends datagrid.
public class mydatagrid extends datagrid<enginejobdto> { private static mydatagriduibinder uibinder = gwt.create(mydatagriduibinder.class); interface mydatagriduibinder extends uibinder<widget, mydatagrid> { } @uifield simplepager pager; public mydatagrid() { initwidget(uibinder.createandbindui(this)); simplepager.resources pagerresources = gwt.create(simplepager.resources.class); pager = new simplepager(textlocation.center, pagerresources, false, 0, true); pager.setdisplay(this); } }
uibinder it:
<!doctype ui:uibinder system "http://dl.google.com/gwt/dtd/xhtml.ent"> <ui:uibinder xmlns:ui="urn:ui:com.google.gwt.uibinder" xmlns:g="urn:import:com.google.gwt.user.client.ui" xmlns:c="urn:import:com.google.gwt.user.cellview.client"> <c:simplepager ui:field='pager' location='center'/> </ui:uibinder>
and have own datagrid paging. don't know if works, i've done similar normal grid.
hope you.
Comments
Post a Comment