Reputation: 1098
I have a post widget in a blog application which are stored in a VerticalPanel.
I want to know if it's possible to handle the click at the VerticalPanel and get the Post Widget which has been clicked?
EDIT: I'm also thinking about wrapping each Post in a custom Cell using this http://code.google.com/webtoolkit/doc/latest/DevGuideUiCustomCells.html so I can later paginate my posts. Is that a good idea? Is there a standard way to do that?
Thanks
Upvotes: 1
Views: 97
Reputation: 22859
IMO, you'd be better off using a CellList
with a Custom Cell describing each post. Two reasons for this:
GWT's Cell Widgets are all capable of using a ListDataProvider
(or better yet, an AsyncDataProvider
) out of the box. You'd end up writing a great deal of code to get where they are.
You can easily learn how to implement both a AsyncDataProvider
and a CellList
with a pager in a very short time from the GWT Showcase examples or other sources.
Upvotes: 2