Hi
all,
I'm having some
problems creating a set of tables in tabbed panes dynamically. I've searched the
mailing list and the web but could not find anything that is helping me moving
forward.
I'm creating the
TabbedPane dynamically since the individual tabs are a result from a Database
query. Each of the tabs is supposed to display a subset of data grouped to the
Panel.
String bindingString = "#{parameterTypeBean.parameterTypeTables["
+ index + "]}";
ValueBinding binding = getFacesContext().getApplication()
.createValueBinding(bindingString);
HtmlPanelTab tab = new HtmlPanelTab();
tab.setLabel(label);
tab.setId(label);
List data;
UIData uidata = new UIData();
try {
data = ""> uidata.setValue(data);
setparameterTypeTables(index, uidata);
} catch (DataStoreException d) {
data = "" ArrayList(0);
}
UIComponent table = createTable(label + "Table", // Id
"row" + id, // Var
data, // Value
binding); // Binding
tab.getChildren().add(table);
List tableChildren = table.getChildren();
ValueBinding vb = getFacesContext().getApplication()
.createValueBinding("#{row" + id + ".id}");
UIColumn idColumn = createColumn();
idColumn.setId(label + "Id");
idColumn
.setHeader(createOutputLabel(getSimpleDisplayString("defaultParameterTypeId")));
idColumn.setValueBinding("value", vb);
tableChildren.add(idColumn);
the tabs display
fine, but the tables show 1 element each (there are 11 elements in one table, 2
in another and others are empty).
As well when I
remove the binding the tables show up - however without any content (meaning the
Column data does not display, but the size is correct).
I need to be able to
select individual elements from the table, but don't expect to edit them
directly (comamnd links).
Many thanks for any
help in advance,
Reiner
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.362 / Virus Database: 267.13.8/183 - Release Date: 11/25/2005