aspose file tools*
The moose likes JSF and the fly likes Dynamic Table using PanelGrid/PanelGroup Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Dynamic Table using PanelGrid/PanelGroup" Watch "Dynamic Table using PanelGrid/PanelGroup" New topic
Author

Dynamic Table using PanelGrid/PanelGroup

Irfan Kapadiya
Greenhorn

Joined: Jan 28, 2011
Posts: 3
Hi All,

I have dynamically created panel grid using below code but I am not able to set colsapn to panelGroup component.I have attached image of table format which I required to implement in my project.


HtmlPanelGrid mainGrid=new HtmlPanelGrid();
mainGrid.setColumns(1);
mainGrid.setWidth("100%");
mainGrid.setBorder(1);
HtmlPanelGrid innerGrid=new HtmlPanelGrid();
innerGrid.setColumns(4);
innerGrid.setBorder(1);
HtmlOutputLabel srLabel=new HtmlOutputLabel();
srLabel.setValue("sr No");
innerGrid.getChildren().add(srLabel);
HtmlPanelGroup panelGroup=new HtmlPanelGroup();
panelGroup.setColspan(2);
HtmlOutputLabel panelGroupLabel=new HtmlOutputLabel();
panelGroupLabel.setValue("Date");
panelGroup.getChildren().add(panelGroupLabel);
HtmlPanelGrid groupGrid=new HtmlPanelGrid();
groupGrid.setColumns(2);
HtmlOutputLabel createdDtLabel=new HtmlOutputLabel();
createdDtLabel.setValue("created dt");
groupGrid.getChildren().add(createdDtLabel);

HtmlOutputLabel updatedDate=new HtmlOutputLabel();
updatedDate.setValue("Updated dt");
groupGrid.getChildren().add(updatedDate);
panelGroup.getChildren().add(groupGrid);
innerGrid.getChildren().add(panelGroup);

HtmlOutputLabel holidayDesc=new HtmlOutputLabel();
holidayDesc.setValue("holiday desc");
innerGrid.getChildren().add(holidayDesc);



Please help.

Thanks & Regards,
Irfan



[Thumbnail for SampleTable.jpg]

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Dynamic Table using PanelGrid/PanelGroup
 
Similar Threads
Dynamic UI generation problem while opening popup
box layout using HtmlPanelGroup
how to bind value attribute inside another component binding attribute
h:panelGrid with Attribute value
How to get Values out of dynamic created panel