JSF - Alternative to "rendered ="?

We are developing a Java web application that uses JSF (Richfaces via Seam) for its user interface. I have read several articles that show that using the "rendered =" attribute in user interface components produces a pretty substantial result. We have several components that we would like to enable or disable based on whether their values ​​are set. For example, if we show an item for sale, we would not have empty fields for attributes that are not set.

Given this success, we are wary of using multiple rendered fields. Is there a more effective alternative to this? Is there something we can do to improve the performance of using this field?

+6
java performance jsf richfaces seam
source share
3 answers

If the getter does nothing, just returns a (cached) boolean property, then I really don't see any pain. There is no alternative to this. The best you could do to improve performance is to cache it either in the model (lazy loading) or in the form ( c:set ). The cost of the getter method in turn is completely negligible.

+4
source share

In any case, any other method will not be free. Therefore, I just use the standard JSF method to hide / show components.

0
source share

You can use the style="display : (#{bean.booleon} ? block : none)" tag JSF.

0
source share

All Articles