This content has been marked as final.
Show 3 replies
-
1. Re: Seam + Facelets: use of JSTL and if tests
japplicoon Jun 23, 2006 7:11 AM (in response to twistah)If something is wrong with your declaration of the standard core library, you should see the unresolved <c:if> tags in the html source of your output. How does your namespace-declaration for the core library look like?
-
2. Re: Seam + Facelets: use of JSTL and if tests
twistah Jun 23, 2006 7:42 AM (in response to twistah)They are like this:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:s="http://jboss.com/products/seam/taglib" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:f="http://java.sun.com/jsf" xmlns:fn="http://java.sun.com/jsp/jstl/functions" xmlns:c="http://java.sun.com/jstl/core" xmlns:h="http://java.sun.com/jsf/html">
However after further investigation I've found out that this only happens with within the ui:repeat (since the "node" object in question is within a collection).
The facelets manual says something about JSTL support: " A note about EL within this JSTL implementation. Since all set variables from these tags are backed by the new EL API, the only scope they can bind to is within the current FaceletContext, no others. This means that variables only can exist for the benefit of creating the component tree for JSF and do not work to assign variables in other scopes. The reason for this is that the Expressions are actually bound to the FaceletContext, not the evaluted Object. This is to better serve JSF tree creation."
I too new to all of this to really understand what that meant.
Strickly speaking this dont seem to be a Seam issue so I wont post anymore on that issue. Thanks anyway. -
3. Re: Seam + Facelets: use of JSTL and if tests
cptnkirk Jun 23, 2006 11:29 AM (in response to twistah)You might want to try a c:if c:set combo.
Outputtext says: <h:outputText value="#{node.nodeHaveSubNodes}"/><br/> <c:if var="tmp" test="#{node.nodeHaveSubNodes}"> <c:set var="nex" value="#{tmp}" /> If test says its true </c:if> Resulting evaluation: <h:outputText value="#{nex}"/><br/>
I haven't tested this, but I think it's your next best shot.
-Jim