This week's book giveaway is in the OCAJP forum.
We're giving away four copies of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) and have Khalid A Mughal & Rolf W Rasmussen on-line!
See this thread for details.
Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Help with MyFaces dataTable in portlet

 
Larry Zheng
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I have a question and need some help.

I am building a JSF portlet, and trying to use Appache MyFaces custom tags.

I need to use t ataTable, and t:columns tags to display a dynamic ListDataModel, since the number and content of columns will vary.
My code looks like this:

<t ataTable value="#{bean.userList}}" var="varuser" border="0" cellpadding="2" cellspacing="0" columnClasses="columnClass1" headerClass="headerClass" footerClass="footerClass" rowClasses="rowClass1" styleClass="dataTable" id="table1" width="100%" preserveDataModel="false">

<t:columns value="#{bean.columnDataModel}" var="column" id="columns1">
<f:facet name="header">
<h anelGroup>
<h utputText value="#{column} " />
</h anelGroup>
</f:facet>
<h utputText value="#{bean.columnValue}" id="output" />
</t:columns>
</t ataTable>

The problem is, the dataTable will only display the first row of the ListDataModel, although the data is all there. It seems that the page only reads the first row of the ListDataModel. Anybody has similar experience, or have some work around?

Thank you in advance.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic