You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Varley, Roger" <Ro...@atosorigin.com> on 2004/08/26 12:44:56 UTC

Select One Row

Hi

I'm starting my first Struts project and I have got a .jsp page that displays a list of beans using the logic:iterate tags. Now I need a method of adding a radio button against each row so that the client can select one of the rows for editing. Googling has taken me to the Struts Layout site and the collection tag (http://struts.application-servers.com/doc/tags/collection.html) which looks like it will do what I want. However, the example given assumes that there is one property that uniquely identifies each row. In my case, the unique key to the underlying database is a composite key consisting of three properties that together uniquely identify each row. I'd be grateful for any pointers to tutorials etc that would provide guidance on how to proceed.

Regards
Roger


__________________________________________________________________________
This e-mail and the documents attached are confidential and intended 
solely for the addressee; it may also be privileged. If you receive this 
e-mail in error, please notify the sender immediately and destroy it.
As its integrity cannot be secured on the Internet, the Atos Origin group 
liability cannot be triggered for the message content. Although the 
sender endeavours to maintain a computer virus-free network, the sender 
does not warrant that this transmission is virus-free and will not be 
liable for any damages resulting from any virus transmitted.
__________________________________________________________________________

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


Re: Select One Row

Posted by Ovidiu EFTIMIE <eo...@gmail.com>.
When you make the select to retrive the data get your triple key in
one column like this
select key1 || '#' || key2 || '#' || key3  key from mytable
In your Action form you'll have 

 private String key ;
//setter + getter

In your TO
private String key1;
private String key2;
private String key3;
//setters+getters
private String key;
//setter+getter
public String setKey(String k){
   //extract your keys (StringTokenizer) and call their setters
}
On Thu, 26 Aug 2004 11:44:56 +0100, Varley, Roger
<ro...@atosorigin.com> wrote:
> Hi
> 
> I'm starting my first Struts project and I have got a .jsp page that displays a list of beans using the logic:iterate tags. Now I need a method of adding a radio button against each row so that the client can select one of the rows for editing. Googling has taken me to the Struts Layout site and the collection tag (http://struts.application-servers.com/doc/tags/collection.html) which looks like it will do what I want. However, the example given assumes that there is one property that uniquely identifies each row. In my case, the unique key to the underlying database is a composite key consisting of three properties that together uniquely identify each row. I'd be grateful for any pointers to tutorials etc that would provide guidance on how to proceed.
> 
> Regards
> Roger
> 
> __________________________________________________________________________
> This e-mail and the documents attached are confidential and intended
> solely for the addressee; it may also be privileged. If you receive this
> e-mail in error, please notify the sender immediately and destroy it.
> As its integrity cannot be secured on the Internet, the Atos Origin group
> liability cannot be triggered for the message content. Although the
> sender endeavours to maintain a computer virus-free network, the sender
> does not warrant that this transmission is virus-free and will not be
> liable for any damages resulting from any virus transmitted.
> __________________________________________________________________________
> 
> ---------------------------------------------------------------------
> 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 One Row

Posted by struts Dude <sc...@slingshot.co.nz>.
Can't u do it using checkbox?

Thanks


----- Original Message ----- 
From: "Varley, Roger" <Ro...@atosorigin.com>
To: <us...@struts.apache.org>
Sent: Thursday, August 26, 2004 10:44 PM
Subject: Select One Row


Hi

I'm starting my first Struts project and I have got a .jsp page that
displays a list of beans using the logic:iterate tags. Now I need a method
of adding a radio button against each row so that the client can select one
of the rows for editing. Googling has taken me to the Struts Layout site and
the collection tag
(http://struts.application-servers.com/doc/tags/collection.html) which looks
like it will do what I want. However, the example given assumes that there
is one property that uniquely identifies each row. In my case, the unique
key to the underlying database is a composite key consisting of three
properties that together uniquely identify each row. I'd be grateful for any
pointers to tutorials etc that would provide guidance on how to proceed.

Regards
Roger


__________________________________________________________________________
This e-mail and the documents attached are confidential and intended
solely for the addressee; it may also be privileged. If you receive this
e-mail in error, please notify the sender immediately and destroy it.
As its integrity cannot be secured on the Internet, the Atos Origin group
liability cannot be triggered for the message content. Although the
sender endeavours to maintain a computer virus-free network, the sender
does not warrant that this transmission is virus-free and will not be
liable for any damages resulting from any virus transmitted.
__________________________________________________________________________

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