Hi , i' ve got problem and i don't have any idea how to resolve it. I tried a lot of trick but nothing works .I would be grateful if someone help me.
I use sun JSF implementation.
I woudl like to preapre from Java code Table.
My class looks following
class public test
{
private String name = null;
private String [] role= new String {"test1", "test2", "test3"};
...
// gets and sets for the atributes here
//
}
My function prepared table like that.
When i binding propertie name everything is ok and i see this value on the page . But problem appear when i want to access to array Role from bean test.
Faces Config contains every mapping.
public void preparetable()
{
Table table = new Table();
orderTableRowGroup = new TableOrderRowGroup();
orderTableRowGroup .setSoruceVar("currentRow");
orderTableRowGroup .setValueBinding("sourceData",getApplication().createValueBinding("#{test.myDataSource }");
TableColumn loginColumn =
new TableColumn();
StaticText labelLogin =
new StaticText();
labelLogin.setValueBinding("text", getApplication().createValueBinding( "#{currentRow.value['name']}"));
loginColumn.setHeaderText("Name");
loginColumn.getChildren().add(labelLogin);
orderTableRowGroup.getChildren().add(loginColumn);
To this point everyhing works fine. The problem appear in code below.
I don't know how to access to array Role. Solution presenting below doesn't work.
//kolumna rola
TableColumn rolaColumn =
new TableColumn();
StaticText labelRola =
new StaticText();
labelRola.setValueBinding(
"text", getApplication().createValueBinding( "#{currentRow.value['role[1]']}"));
rolaColumn.setHeaderText("Rola");
rolaColumn.getChildren().add(labelRola);
orderTableRowGroup.getChildren().add(rolaColumn);
Thx for any advise