Hi Helmut, we use jsp tags instead of jsp:include. In tags you can define attributes e.g:
WEB-INF/tags/userList.tag: --------------------------------------------------------------------------- <%@ attribute name="controller" %> <%@ taglib uri="http://myfaces.apache.org/tobago/component" prefix="tc" %> <tc:sheet value="#{${controller}.users}" var="user columns="20px;15px;20px;90px;90px;20px;30*;20*;70px;12*;12*;6*;12*;12*;1*" pagingLength="30" binding="#{${controller}.sheet}"> ... </tc:sheet> --------------------------------------------------------------------------- and on the page to use it: --------------------------------------------------------------------------- <%@ taglib tagdir="/WEB-INF/tags/" prefix="tags" %> ... <tags:userList controller="#{searchController}"/> ... --------------------------------------------------------------------------- Regards, Volker 2008/1/8, Helmut Swaczinna <[EMAIL PROTECTED]>: > Hi Volker, > > this looks nice. > > How do you set the beanName in subview.jsp? > > I do this: > > <% > String beanName = request.getParameter("beanName"); > request.setAttribute("beanName", beanName); > %> > > This works fine when I navigate for the first time to the page. But when I > navigate to another page and back > ${beanName} is empty. > > Regards > Helmut > > > ----- Original Message ----- > From: "Volker Weber" <[EMAIL PROTECTED]> > To: "MyFaces Discussion" <users@myfaces.apache.org> > Sent: Tuesday, January 08, 2008 12:36 PM > Subject: Re: How to use one subview more than once in one page > > > > Hi, > > > > we are using a similar code in our project in the subview.jsp: > > > > <tc:out id="out" value="#{${beanName}.value}"/> > > <tc:in id="in" value="#{${beanName}.value2}"/> > > <tc:button id="button" label="${beanName}" > > action=#{${beanName}.subviewAction}"/> > > > > The tomahawk aliasBean stuff did not work in tobago if you use > > partiall reload or any component binding inside the subview. > > > > The tomahawk aliasBean stuff also can't work with the sun RI when using > > binding. > > > > Maybe we can add something like the aliasBean into tobago, i thought > > about adding a aliasPanel like: > > > > <tc:aliasPanel > > > <tc:alias alias="name" value="#{bean}"/> > > ... > > <tc:aliasPanel > > > > > where the aliasPanel is an extended tc:panel. > > > > But i'm too busy with other problems now. > > > > > > Regards, > > Volker > > > > 2008/1/8, Mario Ivankovits <[EMAIL PROTECTED]>: > >> 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 > >> > >> > > > > > > -- > > inexso - information exchange solutions GmbH > > Bismarckstraße 13 | 26122 Oldenburg > > Tel.: +49 441 4082 356 | > > FAX: +49 441 4082 355 | www.inexso.de > > > > -- inexso - information exchange solutions GmbH Bismarckstraße 13 | 26122 Oldenburg Tel.: +49 441 4082 356 | FAX: +49 441 4082 355 | www.inexso.de