Re: Action on a ImageResourceCell

2011-06-07 Thread Jambi
Works ;) thanks a lot!

On 1 Jun., 15:49, Sydney  wrote:
> See my implementation:http://pastie.org/2003461http://pastie.org/2003467
>
> The call to add the column:
>
>         // Remove Bet Column
>         ClickableImageResourceCell removeCell = new
> ClickableImageResourceCell();
>         Column removeColumn = new Column , YourObject>(removeCell) {
>             @Override
>             public YourObject getValue(YourObject obj) {
>                 return obj;
>             }
>         };
>         removeCell.setUpdater(this);
>
> I use a ValueUpdater instead of a FieldUpdater. The class containing the
> CellTable implements ValueUpdater, I guess you can do the same
> with FieldUpdater.

-- 
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: Action on a ImageResourceCell

2011-06-01 Thread Sydney
See my implementation:
http://pastie.org/2003461
http://pastie.org/2003467

The call to add the column:

// Remove Bet Column
ClickableImageResourceCell removeCell = new 
ClickableImageResourceCell();
Column removeColumn = new Column(removeCell) {
@Override
public YourObject getValue(YourObject obj) {
return obj;
}
};
removeCell.setUpdater(this);


I use a ValueUpdater instead of a FieldUpdater. The class containing the 
CellTable implements ValueUpdater, I guess you can do the same 
with FieldUpdater.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/Y0htcThZVUp2ekVK.
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: Action on a ImageResourceCell

2011-06-01 Thread Jambi
I could solve my problems and I got it to work. But now I want to use
a FieldUpdater to get the row object when I click on the cell. It does
not work with the tutorial solution. Do I have to add something?

On 1 Jun., 10:49, Jambi  wrote:
> I couldn´t get it working. And I don´t know what I did wrong. Could
> you please provide me with the code of your renderer, cell and
> cellTable setup? This would be great. I know that you sure customized
> your cell for your use cases but it really could help. You could send
> it via mail or just post the code here if you want. I´m sure that a
> lot of users could need a working implementation of a
> clickableImageCell... I´m wondering why there´s no build in
> implementation?
>
> Cheers, Mike
>
> On 31 Mai, 19:44, Sydney  wrote:
>
> > In a 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: Action on a ImageResourceCell

2011-06-01 Thread Jambi
I couldn´t get it working. And I don´t know what I did wrong. Could
you please provide me with the code of your renderer, cell and
cellTable setup? This would be great. I know that you sure customized
your cell for your use cases but it really could help. You could send
it via mail or just post the code here if you want. I´m sure that a
lot of users could need a working implementation of a
clickableImageCell... I´m wondering why there´s no build in
implementation?

Cheers, Mike

On 31 Mai, 19:44, Sydney  wrote:
> In a 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: Action on a ImageResourceCell

2011-05-31 Thread Sydney
In a 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: Action on a ImageResourceCell

2011-05-31 Thread Jambi
Are you using this cell in a cellList or in a cellTable? I´m also
stucking with creating a clickable Image Cell

On 31 Mai, 16:16, Sydney  wrote:
> I actually followed this tutorial and now it works 
> fine:http://webcentersuite.blogspot.com/2011/03/custom-gwt-clickable-cell-...

-- 
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: Action on a ImageResourceCell

2011-05-31 Thread Sydney
I actually followed this tutorial and now it works fine: 
http://webcentersuite.blogspot.com/2011/03/custom-gwt-clickable-cell-with-images.html

-- 
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.



Action on a ImageResourceCell

2011-05-29 Thread Sydney
In a CellTable, I want to show an image, and when the user clicks on it, I 
remove the row from the table. I created a custom cell that extends from 
ImageResourceCell, but I don't know how to process the click:

public ClickableImageResourceCell() {
consumedEvents = new HashSet();
consumedEvents.add("click");
}

@Override
public Set getConsumedEvents() {
return consumedEvents;
}

@Override
public void onBrowserEvent(Context context, Element parent,
ImageResource value, NativeEvent event,
ValueUpdater valueUpdater) {
super.onBrowserEvent(context, parent, value, event, valueUpdater);
if ("click".equals(event.getType())) {
onEnterKeyDown(context, parent, value, event, valueUpdater);
}
}

@Override
protected void onEnterKeyDown(Context context, Element parent,
ImageResource value, NativeEvent event,
ValueUpdater valueUpdater) {
if (valueUpdater != null) {
valueUpdater.update(value);
}
}

-- 
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.