not supposed to know that a particular button is going to result in a
Thing being deleted.
I guess it is up to you to decide how closely you want to follow that
though...
On Jan 23, 4:39 pm, Eric Metcalf <emetcalf....@gmail.com> wrote:
> Sorry, I meant to say I am using CellTable.
>
> Is there is a reason you don't pass the EventBus to your view? I
> found it very simple...
>
> private static final ButtonCell deleteButtonCell = new ButtonCell();
> private static final Column<Thing, String> deleteColumn =
> new Column<Thing, String>(deleteButtonCell) {
> @Override
> public String getValue(Thing thing) {
> return "delete";
> }
> };
> private final FieldUpdater<Thing, String> deleteFieldUpdater =
> new FieldUpdater<Thing, String>() {
>
> @Override
> public void update(int index, Thing thing, String value) {
> if (Window.confirm("Delete " + thing.getName() + "?" )) {
> eventBus.fireEvent(new ThingDeleteEvent(thing, index));
> }
> }
> };
>
> deleteColumn.setFieldUpdater(deleteFieldUpdater);
>
> On Jan 20, 4:18 am, Drew Spencer <slugmand...@gmail.com> wrote:
>
>
>
>
>
>
>
> > Eric, do you have a way to sort the FlexTable by a particular column?
> > That's gonna be an issue for me so if you have any code or tips that would
> > be great. Maybe it's a case of writing a custom function? 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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
No comments:
Post a Comment