J
jf
Hi
I am new to struts and I have a small problem.
I have a bean (DataGrid) that has a collection of Columns (ArrayList)
and each column has rows (ArrayList). So, when i want to iterate with
the lists i would do something like:
<logic:iterate name="datagrid" property="columns" id="column">
<bean:write name="column" property="columnName"/>
<logic:iterate id="row" name="columns" property="rows">
<bean:write name="row" property="value"/>
</logic:iterate>
I can iterate with the columns but when i try to iterate with the rows
(that is a member variable of the columns) it says that cannot find the
bean.
The question is: we need to have a bean to iterate? I cannot simple
iterate within the member variable?
Even if i have it declared on the bean (Datagrid) each row must be
defined with a column (parameter). For example... Column A has 1,2,3
and Column B has 1,4,5...
This is my action form:
public class DatagridForm extends ActionForm {
private List columns;
public List getColumns()
{
return columns;
}
public void setColumns(List cols)
{
columns =cols;
}
....
Ok...I don't have a rows property, but each Column (class) has a
getRows (Row class)... So.. on normal java i would loop it without
problems!
Ok... Any help would be great
Thanks
JF
I am new to struts and I have a small problem.
I have a bean (DataGrid) that has a collection of Columns (ArrayList)
and each column has rows (ArrayList). So, when i want to iterate with
the lists i would do something like:
<logic:iterate name="datagrid" property="columns" id="column">
<bean:write name="column" property="columnName"/>
<logic:iterate id="row" name="columns" property="rows">
<bean:write name="row" property="value"/>
</logic:iterate>
I can iterate with the columns but when i try to iterate with the rows
(that is a member variable of the columns) it says that cannot find the
bean.
The question is: we need to have a bean to iterate? I cannot simple
iterate within the member variable?
Even if i have it declared on the bean (Datagrid) each row must be
defined with a column (parameter). For example... Column A has 1,2,3
and Column B has 1,4,5...
This is my action form:
public class DatagridForm extends ActionForm {
private List columns;
public List getColumns()
{
return columns;
}
public void setColumns(List cols)
{
columns =cols;
}
....
Ok...I don't have a rows property, but each Column (class) has a
getRows (Row class)... So.. on normal java i would loop it without
problems!
Ok... Any help would be great
Thanks
JF