Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Dynamic columns at rich:scrollableDataTable  RSS feed

 
Robson Vargas Peerless
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello there boys..

I need make a way to do a scrollableDataTable with Dynamic columns using richfaces just the version v3.1 !

Any idea ? Im tryn with scriptlet or jstl, but dont work.


ah, and sorry my english, i never was good with it..


Thanks anyway!

Robson
 
Venkat Sadasivam
Ranch Hand
Posts: 139
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I didn't understand your problem completely.

However, a few weeks back I faced a problem with datascroller when using dynamic columns inside the datatable.

Richfaces datascroller uses Ajax request for pagination. During ajax request your bean value may not be available hence some your condition for column display may go wrong.

my recommendation is to keep your managed bean in session scope to avoid this issue.
 
Karthik Swam
Greenhorn
Posts: 1
Java Tomcat Server Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

Try using the below template, this will generate the dynamic rows and columns.

Each row is a list that has the cell data to be displayed.

<rich:ScrollableDataTable rowKeyVar="idx" id="table" value="#{bean.rowsList}" var="eachRow">
<rich:columns value="#{bean.columnsHeaderList}" var="eachColumn" sortable="false" index="index">
<<f:facet name="header" style="text-align: center;">
<h:OutputText value="#{eachColumn}" style="font-weight: bold;"/>
</f:facet>
<h:OutputText value="#{eachRow[index]}"/>
</rich:columns>
</rich:ScrollableDataTable>
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!