Re: CellList with ListDataProvider does not get redrawn on data change
OK got it working. It works as documented. I just got error in my TextColumns which silently resulted in no data displayed. Watch for nulls! -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: CellList with ListDataProvider does not get redrawn on data change
I also solved my problem, thanks to the mvp4g group. It was an mvp4g related issue. I was doing something wrong causing to have two different instances of the view. I was updating the CellList on the view that wasn't been showed. On 7 feb, 12:14, Peter Ondruška peter.ondru...@gmail.com wrote: OK got it working. It works as documented. I just got error in my TextColumns which silently resulted in no data displayed. Watch for nulls! -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: CellList with ListDataProvider does not get redrawn on data change
Same also with code based on AsyncDataProvider. Does anybody have a working example of updating CellTable from within callback? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: CellList with ListDataProvider does not get redrawn on data change
Seems like it is not possible to update ListDataProvider within callback function. I am trying to refactor to using AsyncDataProvider.. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: CellList with ListDataProvider does not get redrawn on data change
Ok, tell me if it works for you. On 4 feb, 09:02, Peter Ondruska peter.ondru...@gmail.com wrote: Seems like it is not possible to update ListDataProvider within callback function. I am trying to refactor to using AsyncDataProvider.. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: CellList with ListDataProvider does not get redrawn on data change
Hi, I have exactly the same problem.. Either I misunderstood documentation or something is broken, still trying to find the way.. On Feb 2, 6:51 pm, Daniel Francisco melkor...@gmail.com wrote: Hi. I'm working on a project with GWT 2.1 and mvp4g. In a view, I'm using a CellList backed with a ListDataProvider. If I pass a List with data when instantiating the ListDataProvider, the CellList shows this data. The problem is that afterthat, the CellList never gets redrawn whenever I change the list of ListDataProvider. I don't know what I am doing wrong or if I missing something. I have looked into the documentation and but I can't find anything. Here is the code: The UIBinder xml file: !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 xmlns:v=urn:import:net.universia.ferias.feriavirtual.backend.client.exhibi tors.view ui:style .leftPanel { padding: 15px 25px 15px 25px; } .rightPanel { padding: 15px 25px 15px 25px; } .button { margin-right: 8px; } .exhibitorList { border: 1px solid black; background-color: #EEE; width: 250px; height: 600px; } .moduleList { } /ui:style g:DockLayoutPanel unit=PX g:west size=300 g:VerticalPanel styleName='{style.leftPanel}' spacing=8 g:LabelExpositores/g:Label g:ScrollPanel addStyleNames='{style.exhibitorList}' width=250px height=600px c:CellList ui:field=exhibitorList / /g:ScrollPanel g:Button ui:field=editExhibitorButton addStyleNames='{style.button}'Editar/g:Button /g:VerticalPanel /g:west g:center g:VerticalPanel styleName='{style.rightPanel}' spacing=8 g:LabelExpositor X/g:Label g:FlowPanel g:Button addStyleNames='{style.button}'Nuevo módulo/g:Button g:Button addStyleNames='{style.button}' enabled=falseEditar módulo/g:Button g:Button addStyleNames='{style.button}' enabled=falseEliminar módulo/g:Button /g:FlowPanel /g:VerticalPanel /g:center /g:DockLayoutPanel /ui:UiBinder The View class: public class ExhibitorsAdminView extends Composite implements ExhibitorsAdminPresenter.IExhibitorsAdminView { interface Binder extends UiBinderWidget, ExhibitorsAdminView {} private static final Binder binder = GWT.create( Binder.class ); private static class ExhibitorCell extends AbstractCellExhibitor { @Override public void render(Cell.Context context, Exhibitor exhibitor, SafeHtmlBuilder sb) { if (exhibitor != null) { sb.appendEscaped(exhibitor.getName()); } } } private ListDataProviderExhibitor exhibitorsDataProvider; private SingleSelectionModelExhibitor exhibitorsSelectionModel; @UiField( provided = true ) CellListExhibitor exhibitorList; @UiField Button editExhibitorButton; // @UiField(provided = true) // CellTableObject moduleList = new CellTableObject(); public ExhibitorsAdminView() { exhibitorsSelectionModel = new SingleSelectionModelExhibitor(Exhibitor.KEY_PROVIDER); exhibitorList = new CellListExhibitor(new ExhibitorCell(), Exhibitor.KEY_PROVIDER); exhibitorList.setSelectionModel(exhibitorsSelectionModel); exhibitorsDataProvider = new ListDataProviderExhibitor(getExhibitors()); exhibitorsDataProvider.addDataDisplay(exhibitorList); exhibitorList.setPageSize(exhibitorsDataProvider.getList().size()); initWidget( binder.createAndBindUi( this ) ); } public SingleSelectionModelExhibitor getExhibitorsSelectionModel() { return exhibitorsSelectionModel; } public ListDataProviderExhibitor getExhibitorsDataProvider() {
CellList with ListDataProvider does not get redrawn on data change
Hi. I'm working on a project with GWT 2.1 and mvp4g. In a view, I'm using a CellList backed with a ListDataProvider. If I pass a List with data when instantiating the ListDataProvider, the CellList shows this data. The problem is that afterthat, the CellList never gets redrawn whenever I change the list of ListDataProvider. I don't know what I am doing wrong or if I missing something. I have looked into the documentation and but I can't find anything. Here is the code: The UIBinder xml file: !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 xmlns:v=urn:import:net.universia.ferias.feriavirtual.backend.client.exhibitors.view ui:style .leftPanel { padding: 15px 25px 15px 25px; } .rightPanel { padding: 15px 25px 15px 25px; } .button { margin-right: 8px; } .exhibitorList { border: 1px solid black; background-color: #EEE; width: 250px; height: 600px; } .moduleList { } /ui:style g:DockLayoutPanel unit=PX g:west size=300 g:VerticalPanel styleName='{style.leftPanel}' spacing=8 g:LabelExpositores/g:Label g:ScrollPanel addStyleNames='{style.exhibitorList}' width=250px height=600px c:CellList ui:field=exhibitorList / /g:ScrollPanel g:Button ui:field=editExhibitorButton addStyleNames='{style.button}'Editar/g:Button /g:VerticalPanel /g:west g:center g:VerticalPanel styleName='{style.rightPanel}' spacing=8 g:LabelExpositor X/g:Label g:FlowPanel g:Button addStyleNames='{style.button}'Nuevo módulo/g:Button g:Button addStyleNames='{style.button}' enabled=falseEditar módulo/g:Button g:Button addStyleNames='{style.button}' enabled=falseEliminar módulo/g:Button /g:FlowPanel /g:VerticalPanel /g:center /g:DockLayoutPanel /ui:UiBinder The View class: public class ExhibitorsAdminView extends Composite implements ExhibitorsAdminPresenter.IExhibitorsAdminView { interface Binder extends UiBinderWidget, ExhibitorsAdminView {} private static final Binder binder = GWT.create( Binder.class ); private static class ExhibitorCell extends AbstractCellExhibitor { @Override public void render(Cell.Context context, Exhibitor exhibitor, SafeHtmlBuilder sb) { if (exhibitor != null) { sb.appendEscaped(exhibitor.getName()); } } } private ListDataProviderExhibitor exhibitorsDataProvider; private SingleSelectionModelExhibitor exhibitorsSelectionModel; @UiField( provided = true ) CellListExhibitor exhibitorList; @UiField Button editExhibitorButton; // @UiField(provided = true) // CellTableObject moduleList = new CellTableObject(); public ExhibitorsAdminView() { exhibitorsSelectionModel = new SingleSelectionModelExhibitor(Exhibitor.KEY_PROVIDER); exhibitorList = new CellListExhibitor(new ExhibitorCell(), Exhibitor.KEY_PROVIDER); exhibitorList.setSelectionModel(exhibitorsSelectionModel); exhibitorsDataProvider = new ListDataProviderExhibitor(getExhibitors()); exhibitorsDataProvider.addDataDisplay(exhibitorList); exhibitorList.setPageSize(exhibitorsDataProvider.getList().size()); initWidget( binder.createAndBindUi( this ) ); } public SingleSelectionModelExhibitor getExhibitorsSelectionModel() { return exhibitorsSelectionModel; } public ListDataProviderExhibitor getExhibitorsDataProvider() { return exhibitorsDataProvider; } private ListExhibitor getExhibitors() { ListExhibitor exhibitors = new ArrayListExhibitor(); for (int i = 0; i 10; i++) { exhibitors.add(new Exhibitor(i, aaa));