Re: Celltable w/ selectionModel and ActionCells
this sounds great, John! i'll give it a try. Thanks! On Mar 2, 8:00 am, John LaBanca jlaba...@google.com wrote: r9788 adds a new BlacklistEventTranslator and WhitelistEventTranslator for use in DefaultSelectionEventManager. Using these, you can disable/enable selection for specific columns.http://code.google.com/p/google-web-toolkit/source/detail?r=9788 DefaultSelectionEventManager manager = DefaultSelectionEventManager.createBlacklistManager(0, 3); // Ignore clicks on columns 0 and 3 SelectionModel model = new SingleSelectionModel(); cellTable.setSelectionModel(model, manager); Hope this helps with this issue. You can wait for GWT 2.3, or just copy the BlacklistEventTranslator code into your app and call DefaultSelectionEventManager.createCustomManager(myBlacklistEventTranslator). Thanks, John LaBanca jlaba...@google.com On Tue, Feb 22, 2011 at 12:09 PM, John LaBanca jlaba...@google.com wrote: You can try overriding ActionCell#handlesSelection() to return true to disable the default selection. We might need to do so for all interactive cells and change the JavaDoc of Cell#handlesSelection() to clarify that it can be used to simply disable default selection. But in general, this is what handlesSelection() was designed to do. Thanks, John LaBanca jlaba...@google.com On Tue, Feb 22, 2011 at 8:44 AM, Thomas Visser thomas.vis...@gmail.comwrote: ActionCell already returns false for handlesSelection(). If a cell declares to handle the selection, the default way of (de)selecting, by clicking in the row, does not work anymore. Then it is the value- updater's task to do so. I recently wrote something about it in a blog post. See for more information: http://thoughtsofthree.com/2011/02/creating-a-gwt-radiobuttoncell/ (paragraph Depending on and handling the selection) On Feb 22, 5:30 am, Patrick Tucker tucker...@gmail.com wrote: I haven't played with this a whole bunch but have you looked at handlesSelection? I was under the impression that by setting this to false you indicate that a particular cell type is not allowed to determine selection state? Like if you have a checkboxcell it can be the only cell that determines whether or not the row is selected. On Feb 11, 2:09 pm, Henry H. djhenr...@gmail.com wrote: yeah, i had the feeling i have to ditch the selectionModel. thanks for your help... On Feb 11, 6:28 am, Thomas Visser thomas.vis...@gmail.com wrote: This is not possible. In your case, the click event is always also given to the SelectionModel. See line 971 in CellTable (http://www.google.com/codesearch/p? hl=en#A1edwVHBClQ/user/src/com/google/gwt/user/cellview/client/ CellTable.javaq=CellTable%20package:http://google-web-toolkit %5C.googlecode%5C.comsa=Ncd=1ct=rc): if (selectionModel != null click.equals(eventType) ! handlesSelection) { selectionModel.setSelected(value, true); } As you can see, if you could make the handlesSelection boolean true, the selectionModel will not be updated. This boolean is true if one (or more) cell(s) declare(s) to handle the selection. ActionCell does not do that. What you can do is create your own cell, make it handle the selection, and use it for all the columns that you want to be clickable. On Feb 11, 1:42 am, Henry H. djhenr...@gmail.com wrote: hi, i have a celltable with a selectionModel but also a column of actioncells. the selectionModel and actioncells both handle click events, but when i click the action cell, it also triggers the selectionmodel click handler. is it possible to prevent this? Or do i have to nix the selectionModel and go with clickable cells on the row? thanks. -- 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. -- 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: Celltable w/ selectionModel and ActionCells
yeah, i had the feeling i have to ditch the selectionModel. thanks for your help... On Feb 11, 6:28 am, Thomas Visser thomas.vis...@gmail.com wrote: This is not possible. In your case, the click event is always also given to the SelectionModel. See line 971 in CellTable (http://www.google.com/codesearch/p? hl=en#A1edwVHBClQ/user/src/com/google/gwt/user/cellview/client/ CellTable.javaq=CellTable%20package:http://google-web-toolkit %5C.googlecode%5C.comsa=Ncd=1ct=rc): if (selectionModel != null click.equals(eventType) ! handlesSelection) { selectionModel.setSelected(value, true); } As you can see, if you could make the handlesSelection boolean true, the selectionModel will not be updated. This boolean is true if one (or more) cell(s) declare(s) to handle the selection. ActionCell does not do that. What you can do is create your own cell, make it handle the selection, and use it for all the columns that you want to be clickable. On Feb 11, 1:42 am, Henry H. djhenr...@gmail.com wrote: hi, i have a celltable with a selectionModel but also a column of actioncells. the selectionModel and actioncells both handle click events, but when i click the action cell, it also triggers the selectionmodel click handler. is it possible to prevent this? Or do i have to nix the selectionModel and go with clickable cells on the row? thanks. -- 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.
Celltable w/ selectionModel and ActionCells
hi, i have a celltable with a selectionModel but also a column of actioncells. the selectionModel and actioncells both handle click events, but when i click the action cell, it also triggers the selectionmodel click handler. is it possible to prevent this? Or do i have to nix the selectionModel and go with clickable cells on the row? thanks. -- 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: EditTextCell and RPC worked in 2.1m1 but not in 2.1
thanks Thomas! FieldUpdater did the trick. On Nov 8, 2:27 am, Thomas Broyer t.bro...@gmail.com wrote: On 8 nov, 07:14, Henry H. djhenr...@gmail.com wrote: hi, when i was using 2.1.m1 i was able to extend an EditTextCell to make an rpc call to update the database after the cell is updated. i just inserted the rpc call right before commit() method in the cell. when i made the switch to 2.1, this no longer works. the cell just remains in edit mode and the onFailure() of the rpc doesn't show. the viewdata is updated though. i haven't messed with the new mvp framework yet , but is there another way to make rpc calls after a cell has been edited? I'm not sure but I think you should (as in it's intended that you) use a FieldUpdater (in CellTable) or ValueUpdated (in CellList) to handle the commit of the value and do your RPC. -- 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-tool...@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.
EditTextCell and RPC worked in 2.1m1 but not in 2.1
hi, when i was using 2.1.m1 i was able to extend an EditTextCell to make an rpc call to update the database after the cell is updated. i just inserted the rpc call right before commit() method in the cell. when i made the switch to 2.1, this no longer works. the cell just remains in edit mode and the onFailure() of the rpc doesn't show. the viewdata is updated though. i haven't messed with the new mvp framework yet , but is there another way to make rpc calls after a cell has been edited? thanks. -- 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-tool...@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.