PDA

View Full Version : Comment system


Kutu
09-03-2008, 07:01 PM
I'm sure most of you have used a comment-system in most blogs you've visited. Could someone advise me how to create it (visually) using GXT? Let's assume that it'll have its own CSS so it won't look like a Grid/List/Table even if we use one.

The comment-system is single threaded, will have links, some dates, so there will be a specific template.

Pattern like this seems to arise quite frequently in the app that I'm writing, so we're thinking to generalize the mechanism.

So far, we come out with a list of todos:
1) We would need our own binder (unless if there's one good enough already)
2) We could use ListStore (is it good enough?)
3) We would need a generic List Container (ScrollContainer seems to be good enough) that we can add generic "widget" (can be a Container, Composite, or BoxComponent)

The closest mechanism for this is the DataList, DataListItem, ListStore and StoreBinder. Except we need the DataListItem to be of a Widget where a model can be set according to specific template/variable (data) positioning.

Perhaps the shortcut would be to extends DataListItem (but DataListItem is a Component type not BoxComponent) and do DataList.setItemTemplate() ?