Hi niesar,
no ... unfortunately not exactly what I want. Perhaps I showed a little too few
context of the calling page, sorry.
I want to have a reusable component "kontoname.xhtml" which can be embedded to
any other page. This reusable component needs two parameters, konto and liste.
Then I have one calling page which wants to make use of this reusable
component. It iterates over some objects:
| <t:dataList var="kontozeile_iter"
value="#{leistungsschein.kontozeilen.gefilterteListe}">
| <tr>
| <ui:include src="/komponenten/kontoname.xhtml">
| <ui:param name="konto" value="#{kontozeile_iter}" />
| <ui:param name="liste" value="#{leistungsschein.kontozeilen}" />
| </ui:include>
| </tr>
| </t:dataList>
|
(You see I also tried the "ui:param" syntax, but no success.)
The dataList iterates over something named
leistungsschein.kontozeilen.gefilterteListe. This works fine. The current
iteration is saved in the variable kontozeile_iter. This works fine. Then the
component is called with the two paramers konto (which is actually
kontozeile_iter, but inside a reusable method, you don't want to worry about
the actual parameter's name) and liste. This even works fine since I can access
both parameters, for example using outputText elements.
So the "konto" parameter is somewhere where it can be accessed via EL. But it
can't be accessed via injection. So where is it stored?
Once again my reusable component:
| <ui:component xmlns:ui="http://java.sun.com/jsf/facelets"
| xmlns:h="http://java.sun.com/jsf/html"
| xmlns:f="http://java.sun.com/jsf/core"
| xmlns:t="http://myfaces.apache.org/tomahawk"
| >
|
| <td class="auftragszelle">
| <!-- The following is absolutely perfect! -->
| <h:outputText value="#{konto.name}"></h:outputText>
| </td>
| <ui:repeat value="#{liste.angezeigteSpalten}" var="spalte">
| <td class="auftragszelle">
| <h:outputText value="#{kontoname.wert}" />
| </td>
| </ui:repeat>
| </ui:component>
|
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3959147#3959147
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3959147
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user