This content has been marked as final.
Show 8 replies
-
1. Re: How to import (include) .xhtml code
pmuir Jun 14, 2007 4:17 PM (in response to mvlach)ui:include from facelets (you are using facelets, right?)
-
2. Re: How to import (include) .xhtml code
monkeyden Jun 14, 2007 4:27 PM (in response to mvlach)<ui:include/> does not allow rtexp
-
3. Re: How to import (include) .xhtml code
pmuir Jun 14, 2007 4:29 PM (in response to mvlach)What's rtexp?
-
4. Re: How to import (include) .xhtml code
monkeyden Jun 14, 2007 4:45 PM (in response to mvlach)a runtime expression
-
5. Re: How to import (include) .xhtml code
pmuir Jun 14, 2007 4:48 PM (in response to mvlach)Oh, you're trying to say it doesn't support EL expressions? It does :)
-
6. Re: How to import (include) .xhtml code
monkeyden Jun 14, 2007 4:49 PM (in response to mvlach)Ah, my mistake, I guess EL doesn't qualify as a runtime expression.
<tag> <name>include</name> <tag-class></tag-class> <tei-class></tei-class> <body-content>JSP</body-content> <description>The include tag can point at any Facelet which might use the composition tag, component tag, or simply be straight XHTML/XML. It should be noted that the src path does allow relative path names, but they will always be resolved against the original Facelet requested. The include tag can be used in conjunction with multiple <ui:param/> tags to pass EL expressions/values to the target page.</description> <attribute> <name>src</name> <required>true</required> <rtexprvalue>false</rtexprvalue> <description>A literal or EL expression that specifies the target Facelet that you would like to include into your document.</description> </attribute> </tag>
-
7. Re: How to import (include) .xhtml code
mvlach Jun 15, 2007 2:12 AM (in response to mvlach)Hi, I tried to use ui:include but with no success.
When I use<ui:include src="/templates/testtemplate.xhtml" />
it works. But the I use<ui:include src="/templates/#{a.template}.xhtml" />
where #{a.template} = testtemplate I gotHTTP Status 404 - /cms/index.seam
-
8. Re: How to import (include) .xhtml code
mvlach Jun 15, 2007 2:43 AM (in response to mvlach)Solved !!
The problem is not in ui:include but in ui:repeat -
http://www.ninthavenue.com.au/blog/c:foreach-vs-ui:repeat-in-facelets
Working code...<s:fragment rendered="#{articleAction.article != null}"> <c:forEach items="#{articleAction.article.articles}" var="a"> #{a.template} <ui:include src="/templates/#{a.template}.xhtml" /> </c:forEach> </s:fragment> [/code[