A couple of questions about Tiles,

When I downloaded the binary distribution I did not see the
tiles-tutorial.war file and was therefore missing some of the files
necessary to go through your tutorial.  Am I missing something in the
distribution, or was the tutorial removed.

Secondly, when I attempt to run both the tiles-docs application and the
tiles-channel application I got an exception with the following message:

"Tag Insert : Can't get component definition 'mainLayout'. Check if this
name exist in component definitions."

I simply placed the war files in the webapps directory of my tomcat server
to deploy them.

thanks for the help.

Dave

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
]On Behalf Of Cedric Dumoulin
Sent: Friday, August 31, 2001 5:01 AM
To: [EMAIL PROTECTED]
Subject: Re: dynamic template tag parameter values



  You can do something like :
    <template:put name="sidebar" content='<%= "/jsps/sidemenu"+ clientName+
".jsp"%>'/>
  But you certainly have to put some processing before to check if the
clientName is valid.

  Also, you can check Tiles contribution for others ideas. For example, you
can
adapt the channels example to fit your client names.

    Cedric

Tiles sites :
  http://www.lifl.fr/~dumoulin/tiles/
  (mirror) : http://www.geocities.com/cedricdumoulin/tiles/



David Boardman wrote:

> Our site will be accessed by users via other sites on the web.  For
> instance, our site might be accessed from a link on Cisco's site.  When
this
> occurs we want the GUI to be different than the default GUI (same general
> layout, but different graphics etc.)  To do this I was hoping to include a
> client parameter in the query string
> (http://oursite.com/login.jsp?client=Xxx) and then use that to dynamically
> set the value of the content parameter within a <template:put> tag to load
> the appropriate jsp.
>
> I believe I can retrieve the query string parameter using <bean:parameter
> id="clientName" name="client">.  However, I am not sure how to dynamically
> include this value in the content parameter of the <template:put> tag.
>
> For example, my default template currently looks like this:
>
> ******************************************
> <%@ page language="java" %>
> <%@ taglib uri="/taglibs/struts-template.tld" prefix="template" %>
> <%@ taglib uri="/taglibs/struts-bean.tld" prefix="bean" %>
>
> <template:insert template="/jsps/template.jsp">
>     <template:put name="title"><bean:message
> key="candidate.detail.title"/></template:put>
>     <template:put name="top" content="/jsps/top.jsp"/>
>     <template:put name="sidebar" content="/jsps/sidemenu.jsp"/>
>     <template:put name="body" content="/jsps/loginBody.jsp"/>
>     <template:put name="footer" content="/jsps/footer.jsp"/>
> </template:insert>
> ******************************************
>
> for Cisco I would like it to look like:
> ******************************************
> <%@ page language="java" %>
> <%@ taglib uri="/taglibs/struts-template.tld" prefix="template" %>
> <%@ taglib uri="/taglibs/struts-bean.tld" prefix="bean" %>
>
> <template:insert template="/jsps/template.jsp">
>     <template:put name="title"><bean:message
> key="candidate.detail.title"/></template:put>
>     <template:put name="top" content="/jsps/topCisco.jsp"/>
>     <template:put name="sidebar" content="/jsps/sidemenuCisco.jsp"/>
>     <template:put name="body" content="/jsps/loginBody.jsp"/>
>     <template:put name="footer" content="/jsps/footerCisco.jsp"/>
> </template:insert>
> ******************************************
>
> and for client=Xxx I would like it to look like:
> ******************************************
> <%@ page language="java" %>
> <%@ taglib uri="/taglibs/struts-template.tld" prefix="template" %>
> <%@ taglib uri="/taglibs/struts-bean.tld" prefix="bean" %>
>
> <template:insert template="/jsps/template.jsp">
>     <template:put name="title"><bean:message
> key="candidate.detail.title"/></template:put>
>     <template:put name="top" content="/jsps/topXxx.jsp"/>
>     <template:put name="sidebar" content="/jsps/sidemenuXxx.jsp"/>
>     <template:put name="body" content="/jsps/loginBody.jsp"/>
>     <template:put name="footer" content="/jsps/footerXxx.jsp"/>
> </template:insert>
> ******************************************
>
> Any help would be greatly apprecitated.
>
> Thanks,
>
> David Boardman
> Integral7


Reply via email to