Get Row Key for the dynamic table
I have a dynamic table. I want to catch the rowkey for the rowGroup in a different method in the same class. My code is as follows
private Table createProjectsTable(){
Table table = new Table();
table.setId("projectTable");
//table.setTitle("PROJECTS");
// table.setBgColor("black");
table.setCellPadding("10");
table.setCellSpacing("1");
TableRowGroup rowGroup = new TableRowGroup();
rowGroup.setId("rowGroup1");
rowGroup.setSourceVar("currentRow");
rowGroup.setValueBinding("sourceData", getApplication().createValueBinding("#{SessionBean1.projectsData}"));
//rowGroup.setBgColor("black");
// rowGroup.setRows(5);
// if(getSessionBean1().getProjectsData()!=null)
rowGroup.setValueBinding("styleClasses", getApplication().createValueBinding("#{hunterincludes$leftBar1_hc.styleClass}") );
// rowGroup.getRowCount();
table.getChildren().add(rowGroup);
TableColumn tableColumn1 = new TableColumn();
tableColumn1.setId("column1");
// tableColumn1.setHeaderText("projects::");
tableColumn1.setStyle("background-color:black");
// Add the first table Column to the table row group
rowGroup.getChildren().add(tableColumn1);
Hyperlink projectLink = new Hyperlink();
projectLink.setId("links");
projectLink.setStyle("color:white; ");
projectLink.setValueBinding("text", getApplication().createValueBinding("#{currentRow.value['projectName']}"));
projectLink.setAction(getApplication().createMethodBinding("#{hunterincludes$le ftBar1_hc.project_action}", null));
tableColumn1.getChildren().add(projectLink);
return table;
}
could anyone plz help me on this regard

