GWT 2.1 in UiBinder put Cell Widgets
Asked Answered
S

1

12

How does it work?

I see no tags defined for example to add a CellTable in a UiBinder.ui.xml file, like

The documentation is sparse on this.

So if it doesnt work, where should I put the cell widgets, in the uiBinder class or the presenter?

Simeon answered 15/11, 2010 at 15:18 Comment(0)
C
19

Look in the Expenses sample provided with GWT 2.1.0.

Basically you need to add to the <ui:Binder tag:

xmlns:c='urn:import:com.google.gwt.user.cellview.client'

and then use it for example as:

<c:CellTable
      addStyleNames='{desktop.table}'
      width='100%'
      ui:field='table' />

This is from the ExpenseReportList class.

Ui widgets should not go in the Presenter. The celltabel has interfaces to communicate the data between presenter and view.

Cardiograph answered 15/11, 2010 at 15:25 Comment(2)
Oh. Thank you, I forgot the to add the <ui:Binder tag for ..cellview.client.Simeon
+1. Silly mistake on my part. I had forgotten to add the namespace for cell widgets. Thanks.Mendoza

© 2022 - 2024 — McMap. All rights reserved.