Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
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


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Help with MyFaces dataTable in portlet" Watch "Help with MyFaces dataTable in portlet" New topic
Author

Help with MyFaces dataTable in portlet

Larry Zheng
Greenhorn

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>
</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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Help with MyFaces dataTable in portlet