0

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.

  • Just asking but, did you try using `#{exampleBean.someValue}` instead of `${exampleBean.someValue}`? It worked on your t:div. EL expressions are surrounded with #{}. – Fritz Jul 12 '12 at 13:10
  • Hello, when I try to change from ${ to #{ I receive this error: According to TLD or attribute directive in tag file, attribute test does not accept any expressions – Joao Carlos Jul 12 '12 at 13:23
  • Sometimes a configuration issue prevents JSTL tags from interpreting EL expressions. Which version of JSTL are you using?. – Fritz Jul 12 '12 at 15:19
  • Can you please post your xmlns declarations? – Fritz Jul 12 '12 at 16:07
  • (I'm sorry about formating, but I'm new here...) <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <%@taglib uri="http://java.sun.com/jsf/html" prefix="h"%> <%@taglib uri="http://java.sun.com/jsf/core" prefix="f"%> <%@taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%> <%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%> <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> – Joao Carlos Jul 12 '12 at 17:19

1 Answers1

0

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.