Imagine the following scenario:
- We have a list page with some kind of filter criterias in a form
- The first time the page is rendered with an empty list
- After a submit the page is rendered again. Per definition the rendered attribute is calculated early during the first lifecycle phase. Should we refresh the list before the restore state or apply request values phase?
--> if yes, we would refresh the list from the DB with wrong query criterias, because the filter inputs have not yet been propagated to the model beans (this happens in updateModel phase).
--> if no, we use the old list (which is still empty) and the rendered attribute evaluates to false. That means our list component does not participate in lifecycle processing at all. So, the new filter criterias would perhaps give a non-empty list, but the list would not be rendered.
A stand-off situation!
Conclusion: In a situation where inputs on the page influence the size of the list (i.e. filter form inputs), never use the rendered attibute in a dataTable to determine if the list is empty or not empty.
HTH, Manfred
Francesco Consumi wrote:
Scrive Manfred Geiler <[EMAIL PROTECTED]>:
This is the culprit: rendered="#{mb.rsTelxSett.count > 0}" Please use the renderedIfEmpty attribute instead:
I've just tried, and for some aspects it works: the getList method is being called "only" times... :-)
the better place, I think, should be an hypothetical "OnPageLoad" action.......
-- Francesco Consumi Ufficio Sistemi informativi Istituto degli Innocenti Piazza SS.Annunziata, 12 50122 Firenze consumi at istitutodeglinnocenti.it Tel. +39 055 2037320 ICQ# 12516133

