GWT & Eclipse: UiBinder - Field has no corresponding field in template file -



GWT & Eclipse: UiBinder - Field has no corresponding field in template file -

with following:

class="lang-java prettyprint-override">public class promotiontablecomposite<t extends promotion> extends composite { @uifield(provided=true) protected celltable<t> displaytable; @uifield(provided=true) protected simplepager pager;

and

class="lang-xml prettyprint-override"><!doctype ui:uibinder scheme "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"> <g:docklayoutpanel unit="em"> <!-- datagrid. --> <g:center> <c:celltable ui:field='displaytable'/> </g:center> <!-- pager. --> <g:south size="3"> <g:htmlpanel> <table style="width:100%"> <tr> <td align='center'> <c:simplepager ui:field='pager'/> </td> </tr> </table> </g:htmlpanel> </g:south> </g:docklayoutpanel> </ui:uibinder>

eclipse gives me errors:

"field displaytable has no corresponding field in template file promotiontablecomposite.ui.xml"

"field pager has no corresponding field in template file promotiontablecomposite.ui.xml".

and when run project next runtime error:

java.lang.assertionerror: uifield pager 'provided = true' null

what have done wrong? have checked build properties includes source files , excludes non (so ui.xml file included alongside java file).

my guess in constructor didn't initialize displaytable , pager before initwidget(uibinder.createandbindui(this));.

class="lang-java prettyprint-override">private static promotiontablecompositeuibinder uibinder = gwt.create(promotiontablecompositeuibinder.class); @uifield(provided=true) celltable<t> displaytable; @uifield(provided=true) simplepager pager; public promotiontablecomposite(){ this.displaytable = new celltable<t>(); this.pager = new simplepager(); initwidget(uibinder.createandbindui(this)); ... }

eclipse gwt field uibinder

Comments

Popular posts from this blog

web services - java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.proxy.Enhancer -

Accessing MATLAB's unicode strings from C -

javascript - mongodb won't find my schema method in nested container -