Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

dynamic ADF table..

451859Jan 7 2008 — edited Apr 26 2009
Hi,

I am trying to create a dynamic adf table with variable columns at runtime using a for each loop.

here't the code..

<af:table value="#{dynatable.rows}" var="row" emptyText="No items were found" id="table2">

<af:forEach items="#{dynatable.tabcolumns}" var="rowlist" varStatus="vs">
<af:column headerText="#{rowlist}" sortable="false">
<af:inputText value="#{row.cell}#{vs.index}" readOnly="false" disabled="false"/>
</af:column>
</af:forEach>
</af:table>


the table variable value="#{dynatable.rows}" has an array list that has a hashmap of all the cells. The "#{dynatable.tabcolumns}" has the number of columns. , At runtime, I was hoping that #{row.cell}#{vs.index} will resolve to #{row.cell0} and #{row.cell1} like wise untill the column counts, which I could use to display values but it does not do so, it simply prints the index. However if I hardcode #{row.cell0} etc, I get the values I want.

Anyone, has any solutions to this, how to could I achieve this.

thanks much
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 24 2009
Added on Jan 7 2008
6 comments
1,744 views