Re: HasDataEditor + CellTable
hello, can i have the source code of MyCellTable class ? is it implementing any other kind of interface to make the save() method working. thank you. -- 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: HasDataEditor + CellTable
Hi! I give you an example: public class MyPanel extends Composite implements EditorInvoice { static MyPanelDriver myPanelDriver = GWT.create(MyPanelDriver .class); interface MyPanelDriver extends SimpleBeanEditorDriverInvoice, MyPanel {} @UiField// if you use declarative layout MyCellTable myCellTable; @Path(invoiceItems) HasDataEditorInvoiceItem editor; private final ListDataProviderInvoiceItem chosenItemsDataProvider = new ListDataProviderInvoiceItem(); public MyPanel() { myCellTable = new CellTableInvoiceItem(invoiceItemsDataProvider); // see http://gwt.google.com/samples/Showcase/Showcase.html#!CwCellTable // initialize celltable chosenItemsDataProvider.addDataDisplay(myCellTable); editor = HasDataEditor.of(myCellTable); // adapt invoiceItems-List to myCellTable myPanelDriver.initialize(this); // initialize editor framework initWidget(uiBinder.createAndBindUi(this)); // if you use declarative layout } public void edit(Invoice invoice) { myPanelDriver.edit(invoice); // binding! chosenItemsDataProvider.setList(editor.getList()); // don't know whether this can be done better... only needed for editing! } // retrieve edited invoice, if you need this public void save() { Invoice invoice = myPanelDriver.flush(); //do something with invoice - e.g. save to DB } } If you just want to display data in celltable, that' it! Hope this helps -- 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: HasDataEditor + CellTable
Thanks for the reply, but unless I'm mistaken, that will show the data, but it will not propagate any HasEditorErrors. I have no problem showing the data, my issue is trying to use HasEditorError with HasDataEditor and CellTable. -- 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: HasDataEditor + CellTable
Oops, got this thread confused with mine... similar topic and all :) On May 17, 4:00 pm, Tim tim.muri...@gmail.com wrote: Thanks for the reply, but unless I'm mistaken, that will show the data, but it will not propagate any HasEditorErrors. I have no problem showing the data, my issue is trying to use HasEditorError with HasDataEditor and CellTable. -- 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.