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#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...