I tried to create my own custom ImageLoadingCell but I have a problem to 
get any Browser Event fired.

My custom cell extends AbstractCell<MyItem> and if I overwrite the Browser 
Event method. E.g.:

@Override
 public void onBrowserEvent(Context context, Element parent, ActivityItem 
value,
    NativeEvent event, ValueUpdater<ActivityItem> updater) {
 Window.alert("browserevent!");
 } 


the alert-box will never called.

I also called in the constructor e.g.: 
super(BrowserEvents.CLICK);

to listen for click-events. But nothing happens If I click.

As I said before, I use mgwt CellList. The mgwt-CellList does not need the 
" extends AbstractCell<MyItem>", it needs " implements Cell<MyItem>" and 
it's own render method. I think there is no event support implemented. 
(https://github.com/mgwt/mgwt/blob/master/src/main/java/com/googlecode/mgwt/ui/client/widget/list/celllist/CellList.java)
 
How can I achieve it to listen on events to get notified if an Image could 
not be loaded correctly? So I could replace it with a default image.


Am Dienstag, 6. Januar 2015 09:57:04 UTC+1 schrieb marian lux:
>
> @Thomas: Thank you. After a quick research, ImageLoadingCell was also in 
> my opinion.
> But if I use ImageLoadingCell, how do I apply to use the image displaying 
> as background image? I want to overlay a text over the image as you can see 
> in my template above. Also as you can see, I did this (as background image) 
> with SafeStylesBuilder.
> The other thing: I experimented a little bit with the ImageLoadingCell and 
> ImageCell and didn't get the ImageLoadingCell working inside a mgwt 
> CellList e.g.:
> CellList cellList = new CellList<MyItem>(new MyItemCell());
> (inside a CellWidget I could display it without any problem).
>
> Can you give me a code snippet - based on my sample code above - how this 
> should work?
>
>
> @Ignacio: I have no control over the server code and the images(URLs) 
> could be temporary offline.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

Reply via email to