I recentyl upgraded my web application to JSF 2.0 (MyFaces 2.0.9) and using tomcat 6 (Servlet 2.5 container).
Previously (Before upgrading to JSF 2) in the JSP files i had statments such as:
<h:selectOneMenu id="country"
value="#{myBean.countrySelectionControl ? (empty myBean.restrictedCountry ? '' : myBean.restrictedCountry) : myBean.countryCode}"
onchange="submit()"
disabled="#{myBean.countrySelectionControl}">
<f:selectItem itemValue="" itemLabel="------------------Select-----------------" />
<f:selectItem itemValue="here" itemLabel="Here" />
<f:selectItem itemValue="there" itemLabel="There" />
</h:selectOneMenu>
but ever since the upgrade such statements are causing errors as below:
ERROR: org.ajax4jsf.webapp.BaseXMLFilter - Exception in the filter chain javax.servlet.ServletException: /jsp/CrudUser.jsp(79,9) '#{myBean.countrySelectionControl ? (empty myBean.restrictedCountry ? '' : myBean.restrictedCountry) : myBean.countryCode}' Illegal Syntax for Set Operation
Now i know i can just move the logic back to Backbean but just before doing that i wanted to check and see if there are other alternative and to know what's the "best practice" in such cases.