PDA

View Full Version : How to place ContentPanel as a column inside Grid or ListView?



kishorekadiri
29 Jun 2009, 9:40 AM
I am new to ExtGWT, as I understood from examples, multiple rows of text data can be placed in column of a ListView using native Template, for eg:

---
private native String getTemplate() /*-{
return ['<tpl for=".">',
'<div class="thumb-wrap" id="{Eventday}{Eventmonth}{Eventyear}" style="border: 1px solid gray; float:left; width: 14%">',
'<tpl for="eventlist">',
'<div class="thumb">{startTime}-{endTime}: {comments}</div>',
'</tpl>',

'<span class="x-editable">{Eventday}{Eventmonth}{Eventyear}</span></div>',
'</tpl>',
'<div class="x-clear"></div>'].join("");

}-*/;
--

But I would like to know if we can place ContentPanel or HtmlContainer as a column data instead of using above template? I am planning to implement Monthly-View of a calender as similar to Outlook, where we have option to edit existing event, context-menu to accept invitation, open occurence, etc..

Appreciate expertise thoughts as soon as possible.

Thanks,
Kishore

kishorekadiri
29 Jun 2009, 9:15 PM
Any one has any great ideas? Is there any other way to achieve this? Really appreciate your inputs here...

kishorekadiri
1 Jul 2009, 6:51 AM
Drag and drop seems to be working for me....

final ListViewDragSource source = new ListViewDragSource(view);

final ListViewDropTarget target = new ListViewDropTarget(view);
target.setAllowSelfAsSource(true);
target.setAutoSelect(false);
target.addDNDListener(new DNDListener() {
@Override
public void dragDrop(DNDEvent e) {

// TODO Auto-generated method stub
//super.dragDrop(e);
e.getTarget().setInnerHTML(e.getTarget().getInnerHTML()+source.getData().toString());

//dayList.add(new Html(e.getTarget());

}
});



However, now I got struck on DailyView Calender, where I need to merge to two div tags, or we can say I need to span two rows and merge it to one (for eg; If I need to show 9:00 to 10:30 div bar)...How to merge two div tags when I am using getTemplate ....

Please let me know your thoughts ... is there any other approach to solve this daily, weekly and monthly view calendar...

Really appreciate any one's help here...

Thanks,
Kishore