This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes JSF and the fly likes Help with MyFaces dataTable in portlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Java » JSF
Bookmark "Help with MyFaces dataTable in portlet" Watch "Help with MyFaces dataTable in portlet" New topic

Help with MyFaces dataTable in portlet

Larry Zheng

Joined: Oct 24, 2005
Posts: 4
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>
<h utputText value="#{bean.columnValue}" id="output" />
</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.
GeeCON Prague 2014
subject: Help with MyFaces dataTable in portlet