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 14:18:46 GMT

Thank you very much!

I should have tried ?targetAction=/updateCust.do" last night (it was late).

I know that passing parameters in  like this is not the best way,
 but this means that I can convert my existing pages without altering the
internal code.

Thanks again.







Cedric Dumoulin <cedric@apache.org> on 10/22/2002 08:55:59 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..



  You can do something like:

<definition name="summaryForm.definition" path
  ="/WEB-INF/common/custSummaryForm.jsp" >
  <put name="targetAction"  value="/updateCust.do" />
</definition>

<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="summaryForm.definition/>
  <put name="mainContent" value="/WEB-INF/main/ArMainForm.jsp" />
</definition>

And in MainLayoutPage.jsp:
...
<tiles:insert attribute="summaryForm" />
...

  You can also use
<put name="summaryForm"   value
="/WEB-INF/common/custSummaryForm.jsp?targetAction=/updateCust.do" >
But in this case you pass your value as an http request parameter.

  Cedric



Jeff_Mychasiw@nlgroup.ca wrote:

>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>
>
>
>
>


--
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