You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Vijay Venkataraman <vi...@ltp.soft.net> on 2006/10/25 10:42:58 UTC

Re: Select row from a Table

I believe you will specify action/href or forward attribute - which will 
identify the action. So in the appropriate action class you should be 
able to pull the value from the HttpServletRequest (request ) object. 
request.getParameter("orderNum"), plain servlet code.

Thanks,
Vijay Venkataraman

grifoxx wrote:
> Thank you man.....it worked but now I have another question, how can i get
> the parameter and pass it to an action class.
>
> Thank you again...
>
>
> Laurie Harper wrote:
>   
>> grifoxx wrote:
>>     
>>> Hi, I created a table using the iterate tag from struts. What I want to
>>> do is
>>> to select a row from that table so I have an extra column that has a link
>>> called Detail. If the user click on that link I want to display in other
>>> page the detail of that row.
>>>
>>> To do that I need to get the Order number which is one of the columns, so
>>> How can I get that parameter when the user click on the link.
>>>       
>> You don't, you encode it in the link when you render it. For example,
>>
>>    <html:link ...
>>      paramId="orderNum"
>>      paramName="orderBean"
>>      paramProperty="orderId"/>
>>
>> See the documentation for the html:link tag [1] for the various way of 
>> specifying request parameters.
>>
>> L.
>>
>> [1] http://struts.apache.org/1.2.9/userGuide/struts-html.html#link
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>>
>>     
>
>   


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


Re: Select row from a Table

Posted by Yujun Liang <yu...@gmail.com>.
if your named the parameter the way you name your html input
feild(html:text), struts can populate the form bean automatically.

Regards

On 10/25/06, Vijay Venkataraman <vi...@ltp.soft.net> wrote:
>
> I believe you will specify action/href or forward attribute - which will
> identify the action. So in the appropriate action class you should be
> able to pull the value from the HttpServletRequest (request ) object.
> request.getParameter("orderNum"), plain servlet code.
>
> Thanks,
> Vijay Venkataraman
>
> grifoxx wrote:
> > Thank you man.....it worked but now I have another question, how can i
> get
> > the parameter and pass it to an action class.
> >
> > Thank you again...
> >
> >
> > Laurie Harper wrote:
> >
> >> grifoxx wrote:
> >>
> >>> Hi, I created a table using the iterate tag from struts. What I want
> to
> >>> do is
> >>> to select a row from that table so I have an extra column that has a
> link
> >>> called Detail. If the user click on that link I want to display in
> other
> >>> page the detail of that row.
> >>>
> >>> To do that I need to get the Order number which is one of the columns,
> so
> >>> How can I get that parameter when the user click on the link.
> >>>
> >> You don't, you encode it in the link when you render it. For example,
> >>
> >>    <html:link ...
> >>      paramId="orderNum"
> >>      paramName="orderBean"
> >>      paramProperty="orderId"/>
> >>
> >> See the documentation for the html:link tag [1] for the various way of
> >> specifying request parameters.
> >>
> >> L.
> >>
> >> [1] http://struts.apache.org/1.2.9/userGuide/struts-html.html#link
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> >> For additional commands, e-mail: user-help@struts.apache.org
> >>
> >>
> >>
> >>
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


-- 
Yujun Liang
yujun.liang@acm.org