Hi Mario,

thanks for the hint. This is what I was looking for. But unfortunately t:aliasBean does not work with component bindings and I need them. There's a workaround mentoined in the t:aliasBean wiki but I don't understand it right know. Hm, maybe I should use my own solution which works even with
component bindings...

Regards
Helmut

----- Original Message ----- From: "Mario Ivankovits" <[EMAIL PROTECTED]>
To: "MyFaces Discussion" <users@myfaces.apache.org>
Sent: Tuesday, January 08, 2008 11:26 AM
Subject: Re: How to use one subview more than once in one page


Hi!
<% String beanName = request.getParameter("beanName"); %>
 <tc:panel>
   <f:facet name="layout">
     <tc:gridLayout rows="fixed" columns="1*;1*;1*"/>
   </f:facet>
   <tc:out id="out" value='<%= "#{" + beanName + ".value}" %>'/>
   <tc:in id="in" value='<%= "#{" + beanName + ".value2}" %>'/>
Woho .... would never have thought about such a solution myself :-)
kudos to you.

If you already use tomahawk have a look at the aliasBean which allows
you to get rid of the JSP stuff.

           <t:aliasBeansScope>
               <t:aliasBean alias="#{quickSwitchToolbarData}"
value="#{toolbar.toolbarData}">
                   <jsp:include page="xyz.page" />
               </t:aliasBean>
           </t:aliasBeansScope>

This allows you to use "quickSwitchToolbarData" from within your include.

Ciao,
Mario



Reply via email to