Search code examples
javajstlmyfaces

Reading JSF property on JSTL tag (MyFaces 1.2)


i'm with a problem migrating an old application from MyFaces 1.1 to MyFaces 1.2. In old application if a had a ManagedBean exampleMBean, I can read these properties through ${exampleMBean.somePropertie}, but after migrate MyFaces to MyFaces 1.2, this kind of access doesn't work, return null always.

If I try to use , then this doesn't work. The tag cant retrieve the ${exampleMBean.someValue} value. To workaround this I'm replace the c:if test occurrences to t:div rendered="#{exampleMBean.someValue}", and now works.

If I try to use the JSTL tags with explicit values, they work, but when I try to access "jsf context" the value cant be retrieved.

I'm using JBoss 4.2.3 and my project has org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL set to true to use the myfaces lib that comes with my project.

Thanks in advance.


Solution

  • I've solved the problem just "starting" the beans in both contexts, actually I've just create a method "create" in ManagedBeans superclass and call it, this method start the bean and throw it in both contexts JSP and JSF. May not be a "smart" solution, but will be transitory.