My personal opinion is keep if-else/jstl away from jsf. I like to put logic evaluation in backing beans and a keep the MVC distinction clear.
Couldn't you do
<h:outputText value="#{bean.threeLetters}" /> and do the logic in threeLetters
Instead of
<h:outputText value="ABC" render="#{bean.booleanFunction }" />
<h:outputText value="EFG" render="#{!bean.booleanFunction}"/>
I think it's just a matter of preference.
| Andrew robinson <[EMAIL PROTECTED]>
09/28/2005 05:37 PM
|
|
Use facelets. Then you can use the JSTL if & choose/when/otherwise tags
On 9/28/05, Dave <[EMAIL PROTECTED] > wrote:
<h:outputTex value="ABC" render="#{bean.booleanFunction }" />
<h:outputTex value="EFG" render="#{!bean.booleanFunction}"/>
If JSF supports If-else tags, it wll improve performance, and code readability. The booleanFunction should be called only once instead of twice. Any plan to add IF-ELSE? or other nice tag libraries going well with JSF? Thanks. Dave
Yahoo! for Good
Click here to donate to the Hurricane Katrina relief effort.

