struts-user mailing list archives

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

Cedric,Marc:
      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
="/papChangeCurrentCustomer.do" />
      </tiles:insert>


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

      <definition name="arMainPage" path
="/WEB-INF/common/MainLayoutPage.jsp">
            <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="/updateCust.do" />
<-- imaginary tag  : - )
            </put>
            <put name="mainContent" value="/WEB-INF/main/ArMainForm.jsp" />
      </definition>
      OR
      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=/updateCust.do" >



      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.

Thanks
Jeff




Cedric Dumoulin <cedric@apache.org> on 10/22/2002 03:09:36 AM

Please respond to "Struts Users Mailing List"
       <struts-user@jakarta.apache.org>

To:    Struts Users Mailing List <struts-user@jakarta.apache.org>
cc:

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



Hi,

  Have you tried:

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

 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
  (<useAttribute>).

  Hope this help,
        Cedric



Jeff_Mychasiw@nlgroup.ca wrote:

>Greetings:
>      I am in the early stages of converting some of my page to use tiles
>framework.
>
>      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
>parameter.
>      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
>="/papChangeCurrentCustomer.do" />
>                </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="/papChangeCurrentCustomer.do" />
>      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
>
>Thanks.
>
>
>--
>To unsubscribe, e-mail:   <
mailto:struts-user-unsubscribe@jakarta.apache.org>
>For additional commands, e-mail: <
mailto:struts-user-help@jakarta.apache.org>
>
>
>
>


--
To unsubscribe, e-mail:   <
mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <
mailto:struts-user-help@jakarta.apache.org>








--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message