[jboss-user] [JBoss Seam] - how to conditionally render a row of dataTable

ellenzhao do-not-reply at jboss.com
Sun Aug 19 14:07:07 EDT 2007


A column of a h:dataTable can be conditionally rendered. But is there any way to conditionally render a row of a dataTable? This can be useful, for example, for reducing communication between database and app server. 

In my application, each entity has a flag column with values like "creating", "created", "updating", "updated",...etc in the database. There is an extremely heavy weight stateless session bean called "dataStore" which has static fields for holding List allFoo, List allBar ....etc, this has proven working very well as data cache. Although my entities seldom get updated or deleted, I am thinking how can I still use this caching approach if I need to implement update or delete. It's of course easy to change the flags in the CRUD flag columns. But then, there is a need for conditionally rendering a row. It would be nice to only render rows with "created" or "updated" flag in the dataTable to the end user. If only there's something like:


  | <h:dataTable  value="#{fooManager.fooList}"  var="foo" rowRendered="#{foo.crudStatus eq 'created' or foo.crudStatus eq 'updated'}">
  | </h:dataTable>
  | 

Is there any exisiting lib can do this? If not, how about implement it as a Seam feature?


Regards,
Ellen

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4075566#4075566

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4075566



More information about the jboss-user mailing list