-
1. Re: Use of @Out with JSTL/ui:include
ekusnitz Oct 30, 2006 4:40 PM (in response to ekusnitz)Forget to add:
We are using JBoss4.0.5GA
JBoss Portal 2.4.1-CR1
myfaces-1.1.4 -
2. Re: Use of @Out with JSTL/ui:include
fhh Oct 30, 2006 6:59 PM (in response to ekusnitz)Hello!
I would guess that MyBean is in request scope and newObject is not. That's why it is not acessible.
I don't think it is a very good idea anyway to mix JSTL and JSF in that way anyway. I would recommend you to use the facelets stuff instead.
Regards
fhh -
3. Re: Use of @Out with JSTL/ui:include
pmuir Oct 31, 2006 4:06 AM (in response to ekusnitz)https://facelets.dev.java.net/nonav/docs/dev/docbook.html#template-include - you're right rendered isn't an attribute on ui:include but its easy to get around - simply include it in a grouping component which does have a rendered attribute.
<h:panelGroup rendered="#{myCondition}"> <ui:include src="myPage.xhtml" /> </h:panelGroup>
-
4. Re: Use of @Out with JSTL/ui:include
ekusnitz Oct 31, 2006 9:22 AM (in response to ekusnitz)Thank you for your replies. With regard to the scope,
I had tried it several ways, but predominantly like this:
@Out(required=false)
private boolean newObject;
What is the default scope for outjection? I couldn't find it in the docs. Furthermore, why wouldn't the expression find it in any scope? And, most important, why it is seen with the h:output and not c:f? I suppose the problem is, like you say, mixing JSF and JSTL. Similar code has worked for us, but I guess, the results are unpredictable, as many say.
I will try wrapping the ui:include in an h:panelGroup. I just wonder why the attribute is not supported. I thought all decendants of ui:component supported it.
I am really mostly concerned with how these things work, rather than just what works and what doesn't. -
5. Re: Use of @Out with JSTL/ui:include
ekusnitz Oct 31, 2006 12:42 PM (in response to ekusnitz)Ugh, this is getting really strange. As suggested, I changed my code to the following (note use of 'preNewObject' instead of 'newObject')
<h:panelGroup rendered="#{!preNewObject}">
<ui:include src="/pages/admin/Node/NodeDetails.xhtml" />
</h:panelGroup>
<h:panelGroup rendered="#{preNewObject}">
<ui:include src="/pages/admin/Node/ChooseNodeType.xhtml" />
</h:panelGroup>
It starts to work. It starts with the NodeDetails page because preNewObject is set to false. When the user chooses to create a new object, it's set to true, and the ChooseNodeType page loads correctly. Now, here's the weird thing. The OK button on that page -- whose action is 'newObject' -- stops working! The action is never called. I have a feeling there's a bug here somewhere. How best to proceed? -
6. Re: Use of @Out with JSTL/ui:include
gavin.king Oct 31, 2006 12:55 PM (in response to ekusnitz)Well, unless you think that this somehow has something to do with Seam, wouldn't it be better to proceed by asking in a facelets/myfaces forum?
-
7. Re: Use of @Out with JSTL/ui:include
pmuir Oct 31, 2006 12:57 PM (in response to ekusnitz)"ekusnitz" wrote:
I will try wrapping the ui:include in an h:panelGroup. I just wonder why the attribute is not supported. I thought all decendants of ui:component supported it.
Ah. ui:component != UIComponent -
8. Re: Use of @Out with JSTL/ui:include
ekusnitz Oct 31, 2006 1:09 PM (in response to ekusnitz)Sorry, Gavin. It started out in Seam, but I guess now it belongs in facelets.
-
9. Re: Use of @Out with JSTL/ui:include
gavin.king Oct 31, 2006 1:16 PM (in response to ekusnitz)NP, I'm just trying to help you get a useful answer, rather than talking to yourself :)