You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Farshad Rabbani <fa...@hotmail.com> on 2009/09/11 17:02:38 UTC
adding parameters to a url - help please
Hi,
I would like to be able to add whatever is the currently selected option from my selection box as a parameter to the url shown below. I am able to attach the id as a parameter but I cannot figure out how to do the same for the selection box. I would greatly appreciate any assistance in doing this. Thanks.
Regards,
Farshad
<td><s:property value="id"/></td>
<td><s:property value="firstName"/></td>
<td><s:property value="lastName"/></td>
<td><s:property value="dob"/></td>
<td><s:property value="nationalityCD"/></td>
<td><s:select name="myEditSelections" emptyOption="false" list="editViewOptions" theme="simple"/></td>
<td>
<s:url id="editUrl" value="Individual_edit.action">
<s:param name="individualId" value="id"/>
<s:param name="editViewOption" value= />
</s:url>
<s:a href="%{editUrl}">Edit</s:a>
</td>
_________________________________________________________________
With Windows Live, you can organize, edit, and share your photos.
http://www.windowslive.com/Desktop/PhotoGallery
RE: adding parameters to a url - help please
Posted by C N Davies <cn...@cndavies.com>.
I haven't used struts for several years but can't you bind you table/listbox
to a bean property?
Using RichFaces I can create a datatable, bind it to a bean property which
is of type UIComponent, then when the user clicks on the component the
OnClick action fires a bean action within which I can access that bean
property and retrieve the relevant data. Then you can generate the required
URL and forward to the required page using a JSF return or an struts action.
Just my 2c worth!
Chris
-----Original Message-----
From: Farshad Rabbani [mailto:farshadrabbani@hotmail.com]
Sent: Saturday, 12 September 2009 12:43 AM
To: struts
Subject: RE: adding parameters to a url - help please
Thank you Wes. I thought I could have gotten around it without Javascript.
The problem is, I have no idea how to get that started. Can anyone provide
me with sample javascript that could potentially assist me in getting this
done? I would like to have both the id and the value from the selection box
added to the url. Any help would be greatly appreciated.
-Farshad
> You'll have to use javascript, the tags' output is rendered server
> side, when the jsp page is rendered.
>
> -Wes
> >
> > I would like to be able to add whatever is the currently selected
option from my selection box as a parameter to the url shown below. I am
able to attach the id as a parameter but I cannot figure out how to do the
same for the selection box. I would greatly appreciate any assistance in
doing this. Thanks.
> >
> > <td><s:property value="id"/></td>
> > <td><s:property value="firstName"/></td>
> > <td><s:property value="lastName"/></td>
> > <td><s:property value="dob"/></td>
> > <td><s:property value="nationalityCD"/></td>
> > <td><s:select name="myEditSelections" emptyOption="false"
list="editViewOptions" theme="simple"/></td>
> > <td>
> > <s:url id="editUrl" value="Individual_edit.action">
> > <s:param name="individualId" value="id"/>
> > <s:param name="editViewOption" value= />
> > </s:url>
> > <s:a href="%{editUrl}">Edit</s:a>
> > </td>
> >
> > _________________________________________________________________
> > With Windows Live, you can organize, edit, and share your photos.
> > http://www.windowslive.com/Desktop/PhotoGallery
>
>
>
> --
> Wes Wannemacher
>
> Head Engineer, WanTii, Inc.
> Need Training? Struts, Spring, Maven, Tomcat...
> Ask me for a quote!
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
_________________________________________________________________
With Windows Live, you can organize, edit, and share your photos.
http://www.windowslive.com/Desktop/PhotoGallery
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
RE: adding parameters to a url - help please
Posted by Farshad Rabbani <fa...@hotmail.com>.
Thank you Wes. I thought I could have gotten around it without Javascript. The problem is, I have no idea how to get that started. Can anyone provide me with sample javascript that could potentially assist me in getting this done? I would like to have both the id and the value from the selection box added to the url. Any help would be greatly appreciated.
-Farshad
> You'll have to use javascript, the tags' output is rendered server
> side, when the jsp page is rendered.
>
> -Wes
> >
> > I would like to be able to add whatever is the currently selected option from my selection box as a parameter to the url shown below. I am able to attach the id as a parameter but I cannot figure out how to do the same for the selection box. I would greatly appreciate any assistance in doing this. Thanks.
> >
> > <td><s:property value="id"/></td>
> > <td><s:property value="firstName"/></td>
> > <td><s:property value="lastName"/></td>
> > <td><s:property value="dob"/></td>
> > <td><s:property value="nationalityCD"/></td>
> > <td><s:select name="myEditSelections" emptyOption="false" list="editViewOptions" theme="simple"/></td>
> > <td>
> > <s:url id="editUrl" value="Individual_edit.action">
> > <s:param name="individualId" value="id"/>
> > <s:param name="editViewOption" value= />
> > </s:url>
> > <s:a href="%{editUrl}">Edit</s:a>
> > </td>
> >
> > _________________________________________________________________
> > With Windows Live, you can organize, edit, and share your photos.
> > http://www.windowslive.com/Desktop/PhotoGallery
>
>
>
> --
> Wes Wannemacher
>
> Head Engineer, WanTii, Inc.
> Need Training? Struts, Spring, Maven, Tomcat...
> Ask me for a quote!
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
_________________________________________________________________
With Windows Live, you can organize, edit, and share your photos.
http://www.windowslive.com/Desktop/PhotoGallery
Re: adding parameters to a url - help please
Posted by Wes Wannemacher <we...@wantii.com>.
You'll have to use javascript, the tags' output is rendered server
side, when the jsp page is rendered.
-Wes
On Fri, Sep 11, 2009 at 11:02 AM, Farshad Rabbani
<fa...@hotmail.com> wrote:
>
> Hi,
>
>
>
> I would like to be able to add whatever is the currently selected option from my selection box as a parameter to the url shown below. I am able to attach the id as a parameter but I cannot figure out how to do the same for the selection box. I would greatly appreciate any assistance in doing this. Thanks.
>
>
>
> Regards,
>
> Farshad
>
>
>
> <td><s:property value="id"/></td>
> <td><s:property value="firstName"/></td>
> <td><s:property value="lastName"/></td>
> <td><s:property value="dob"/></td>
> <td><s:property value="nationalityCD"/></td>
> <td><s:select name="myEditSelections" emptyOption="false" list="editViewOptions" theme="simple"/></td>
> <td>
> <s:url id="editUrl" value="Individual_edit.action">
> <s:param name="individualId" value="id"/>
> <s:param name="editViewOption" value= />
> </s:url>
> <s:a href="%{editUrl}">Edit</s:a>
> </td>
>
> _________________________________________________________________
> With Windows Live, you can organize, edit, and share your photos.
> http://www.windowslive.com/Desktop/PhotoGallery
--
Wes Wannemacher
Head Engineer, WanTii, Inc.
Need Training? Struts, Spring, Maven, Tomcat...
Ask me for a quote!
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org