You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by imran ali <al...@rediffmail.com> on 2003/07/03 22:25:13 UTC

variable passing.

<logic:iterate name="FormBean" property="fee" id="feeCat" 
indexId="ctr" scope="request">

<td> <bean:write name="feeCat" property="categoryId"/> </td>
<td>
<html:link page="/foo.do"> <bean:write name="feeCat" 
property="cat"/>
</td>

I have a form "FormBean" and their I have a collection of other 
form and that collection is named "feeCat". I am iterating over it 
and displaying rows in a table in my jsp. Now on clicking one of 
this row I am going to "/foo.do" action. This action takes control 
to a different jsp with a diferent form bean.

Now I want to pass the id of the row selected to the new jsp with 
a fresh form. How can I pass on this information. scope is request 
only.

Thank you. :)
Imran.

Imran
___________________________________________________
Click below to experience Sooraj R Barjatya's latest offering
'Main Prem Ki Diwani Hoon' starring Hrithik, Abhishek
  & Kareena http://www.mpkdh.com


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


Re: variable passing.

Posted by Nagendra Kumar O V S <na...@ikigo.com>.
hi,
try this..

<logic:iterate name="FormBean" property="fee" id="feeCat" 
indexId="ctr" scope="request">

<td> <bean:write name="feeCat" property="categoryId"/> </td>
<td>
<html:link page="/foo.do" paramId="id" paramName="<%= ctr %>"> <bean:write
name="feeCat" property="cat"/></html:link> 
</td>

hope this helps..
--nagi

-------Original Message-------

From: Struts Users Mailing List
Date: Friday, July 04, 2003 01:55:34 AM
To: struts-user@jakarta.apache.org
Subject: variable passing.

<logic:iterate name="FormBean" property="fee" id="feeCat" 
indexId="ctr" scope="request">

<td> <bean:write name="feeCat" property="categoryId"/> </td>
<td>
<html:link page="/foo.do"> <bean:write name="feeCat" 
property="cat"/>
</td>

I have a form "FormBean" and their I have a collection of other 
form and that collection is named "feeCat". I am iterating over it 
and displaying rows in a table in my jsp. Now on clicking one of 
this row I am going to "/foo.do" action. This action takes control 
to a different jsp with a diferent form bean.

Now I want to pass the id of the row selected to the new jsp with 
a fresh form. How can I pass on this information. scope is request 
only.

Thank you. :)
Imran.

Imran
___________________________________________________
Click below to experience Sooraj R Barjatya's latest offering
'Main Prem Ki Diwani Hoon' starring Hrithik, Abhishek
& Kareena http://www.mpkdh.com


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


. 

RE: variable passing.

Posted by Steve Raeburn <st...@ninsky.com>.
Apparently I did misunderstand. Pick mine or nagi's answer depending on what
you meant by "the id of the row selected"

Steve

> -----Original Message-----
> From: Steve Raeburn [mailto:steve@ninsky.com]
> Sent: July 4, 2003 3:01 AM
> To: Struts Users Mailing List
> Subject: RE: variable passing.
>
>
> If I've understood your example correctly:
>
>   <html:link action="/foo" paramId="id" paramName="feeCat"
> paramProperty="categoryId">
>     <bean:write name="feeCat" property="cat"/>
>   </html:link>
>
> If feeCat's categoryId=5, this would generate the following HTML:
>
>   <a:href="/context/foo.do?id=5>Category</a>
>
> I've used 'action' instead of 'page' to avoid having to specify the .do
> extension.
>
> Steve
>
>
> > -----Original Message-----
> > From: imran ali [mailto:aliimran@rediffmail.com]
> > Sent: July 3, 2003 1:25 PM
> > To: struts-user@jakarta.apache.org
> > Subject: variable passing.
> >
> >
> >
> > <logic:iterate name="FormBean" property="fee" id="feeCat"
> > indexId="ctr" scope="request">
> >
> > <td> <bean:write name="feeCat" property="categoryId"/> </td>
> > <td>
> > <html:link page="/foo.do"> <bean:write name="feeCat"
> > property="cat"/>
> > </td>
> >
> > I have a form "FormBean" and their I have a collection of other
> > form and that collection is named "feeCat". I am iterating over it
> > and displaying rows in a table in my jsp. Now on clicking one of
> > this row I am going to "/foo.do" action. This action takes control
> > to a different jsp with a diferent form bean.
> >
> > Now I want to pass the id of the row selected to the new jsp with
> > a fresh form. How can I pass on this information. scope is request
> > only.
> >
> > Thank you. :)
> > Imran.
> >
> > Imran
> > ___________________________________________________
> > Click below to experience Sooraj R Barjatya's latest offering
> > 'Main Prem Ki Diwani Hoon' starring Hrithik, Abhishek
> >   & Kareena http://www.mpkdh.com
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: struts-user-help@jakarta.apache.org
> >
> >
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>
>



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


RE: variable passing.

Posted by Steve Raeburn <st...@ninsky.com>.
If I've understood your example correctly:

  <html:link action="/foo" paramId="id" paramName="feeCat"
paramProperty="categoryId">
    <bean:write name="feeCat" property="cat"/>
  </html:link>

If feeCat's categoryId=5, this would generate the following HTML:

  <a:href="/context/foo.do?id=5>Category</a>

I've used 'action' instead of 'page' to avoid having to specify the .do
extension.

Steve


> -----Original Message-----
> From: imran ali [mailto:aliimran@rediffmail.com]
> Sent: July 3, 2003 1:25 PM
> To: struts-user@jakarta.apache.org
> Subject: variable passing.
>
>
>
> <logic:iterate name="FormBean" property="fee" id="feeCat"
> indexId="ctr" scope="request">
>
> <td> <bean:write name="feeCat" property="categoryId"/> </td>
> <td>
> <html:link page="/foo.do"> <bean:write name="feeCat"
> property="cat"/>
> </td>
>
> I have a form "FormBean" and their I have a collection of other
> form and that collection is named "feeCat". I am iterating over it
> and displaying rows in a table in my jsp. Now on clicking one of
> this row I am going to "/foo.do" action. This action takes control
> to a different jsp with a diferent form bean.
>
> Now I want to pass the id of the row selected to the new jsp with
> a fresh form. How can I pass on this information. scope is request
> only.
>
> Thank you. :)
> Imran.
>
> Imran
> ___________________________________________________
> Click below to experience Sooraj R Barjatya's latest offering
> 'Main Prem Ki Diwani Hoon' starring Hrithik, Abhishek
>   & Kareena http://www.mpkdh.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>
>



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