my dog learned polymorphism
The moose likes JSF and the fly likes Dynamic Table using PanelGrid/PanelGroup Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of Mongo DB Applied Patterns this week in the MongoDB forum
or a resume review from Five Year Itch in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » JSF
Reply 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://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Dynamic Table using PanelGrid/PanelGroup
 
Similar Threads
How to get Values out of dynamic created panel
Dynamic UI generation problem while opening popup
how to bind value attribute inside another component binding attribute
box layout using HtmlPanelGroup
h:panelGrid with Attribute value