struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: [Tiles]New tiles user with questions..
Date Tue, 22 Oct 2002 13:20:10 GMT

      Thank you for your replies.

      I should have been more clear about paramater passing.
      I guess my question is, can I pass the jsp include and a parameter
from the tiles-def file.

      Cedric, at first glance it appears that I would place this in a jsp
and not the in the tiles-def.xml:
      <tiles:insert path
="/WEB-INF/customer/form/CurrentCustomerSummaryForm.jsp" flush="true">
            <tiles:put name="actionTarget"  value
="/" />

      I was hoping for something like this in tile-defs.xml ..

      <definition name="arMainPage" path
            <put name="header" value="/WEB-INF/common/table/PageHeader.jsp"
            <put name="footer" value="/WEB-INF/common/PageFooter.jsp" />
            <put name="summaryForm"   value
="/WEB-INF/common/custSummaryForm.jsp" >
                  <put name="targetAction"  value="/" />
<-- imaginary tag  : - )
            <put name="mainContent" value="/WEB-INF/main/ArMainForm.jsp" />
      I don't know if they work, but I thought I have seen examples of
something like this:
            <put name="summaryForm"   value
="/WEB-INF/common/custSummaryForm.jsp?targetAction=/" >

      Marc, I will study the attached zip as well.  It is a  clear example,
though I am still unclear I achieve the above example.
      It seems that your example indicates that my jsp include should be
declared as definition on it's own (with inserted attribute) then inserted
into another main
      definition.   Am I correct?   If this is true, it would mean that I
would have two definitions per page.  I will experiment.


Cedric Dumoulin <> on 10/22/2002 03:09:36 AM

Please respond to "Struts Users Mailing List"

To:    Struts Users Mailing List <>

Subject:    Re: [Tiles]New tiles user with questions..


  Have you tried:

<tiles:insert path="/WEB-INF/customer/form/CurrentCustomerSummaryForm.jsp"
  <tiles:put name="actionTarget"  value="/" />

 And in the inserted jsp:
<tiles:useAttribute name="actionTarget" />

  In the inserted jsp (here CurrentCustomerSummaryForm.jsp), the tiles
  attribute is originally in the tiles context. You can import it in any
  jsp context with <importAttribute>, or declare it as a java variable

  Hope this help,
        Cedric wrote:

>      I am in the early stages of converting some of my page to use tiles
>      I am hoping that the conversion will go smooth as many of my pages
>are build with reusable includes,
>      however I have the several jsp:include files that depend on an input
>      I have checked the archives and documentation but could not find a
>direct answer.
>      Question:
>      How can I replace this call:
>      <jsp:include page
>="/WEB-INF/customer/form/CurrentCustomerSummaryForm.jsp" flush="true">
>                           <jsp:param name="actionTarget"  value
>="/" />
>                </jsp:include>
>      with something like  this:
>      <tiles:put  name="summaryForm" value
>="/WEB-INF/customer/form/CurrentCustomerSummaryForm.jsp" />
>      How can I ensure that the parameter: <jsp:param name="actionTarget"
>value="/" />
>      is found the included file?
>** I have tried <tiles:useAttribute .. it works in my main layout page but
>not the include.
>Any help would be appreciated
>To unsubscribe, e-mail:   <>
>For additional commands, e-mail: <>

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message