tags:

views:

887

answers:

1

Hi everyone, I am new to JSF and I am trying to display a JSF2 component with ui:include

<ui:include src="myComponent.xhtml">
    <ui:param name="attr" value="aValue"/>
</ui:include>

The component is successfully displayed but the param is not passed to the JSF2 component. the attribute attr is defined in the interface of the component.

It works if I use my component this way:

<ez:myComponent attr="aValue"/>

The point in using ui:include is to use something like that:

<ui:include src="#{componentName}"/>

Am I doing something that is not supported or is there another way to display my component and have the parameters filled?

I am using GlassFish v3.

Thanks in advance.

+1  A: 

from my understanding of ui:param you should be able to acess the value of the ui:param in myComponent.xhtml by using #{attr} which by using param name check this out https://facelets.dev.java.net/nonav/docs/dev/docbook.html#template-param

daedlus
Well I tried to put in ui:param a name of cc.attrs.attr so that it would correspond to what my component uses. It did not work. I guess that what I'm trying to achieve is just not possible now.
Awano