Re: selecting a row in a table with a checkbox

2002-01-03 Thread Shengmeng Liu

Hi,
   There're basically two approaches to this problem.
1)Use Javascript on the client side:
You may group each row of table including all its elements into a separate form 
without submit button,
and then you can use an independent button in a dedicated form and inside its 
onclick() event, you can
test the current state of checkboxes for each row. If it's checked, you can then 
submit its associated form.

If you have to deal with the situation where multiple checkboxes can be checked at the 
same time.
You would rather use the server side solution.

2)Use server side programming:
You can first detect the values for checkbox and start to process the associated group 
of elements.
Note that in this case, checkbox request parameter can have multiple values, I 
personally would rather
use the j2ee standard request.getParameters() instead of Struts method.

Hope this helps,


- Original Message - 
From: l str [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, January 02, 2002 8:42 PM
Subject: selecting a row in a table with a checkbox


 Hi,
 
 I have a question about usage of a checkbox. I have looked in the archive 
 whether somebody already posted the problem, but I couldn't find anything.
 My problem is: I have a table where the rows contain information and some 
 cells have to be filled in by a user. When the checkbox in the first cell of 
 a row is checked, I need to get all the information in that row. But how do 
 I do that? How do I know which row is selected? And how do I get the 
 information that is filled in by the user?
 Any help would be welcome. Thanks a lot,
 
 Lilian Teitsma
 
 _
 Meld je aan bij de grootste e-mailservice wereldwijd met MSN Hotmail: 
 http://www.hotmail.com/nl
 
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
 





selecting a row in a table with a checkbox

2002-01-02 Thread l str

Hi,

I have a question about usage of a checkbox. I have looked in the archive 
whether somebody already posted the problem, but I couldn't find anything.
My problem is: I have a table where the rows contain information and some 
cells have to be filled in by a user. When the checkbox in the first cell of 
a row is checked, I need to get all the information in that row. But how do 
I do that? How do I know which row is selected? And how do I get the 
information that is filled in by the user?
Any help would be welcome. Thanks a lot,

Lilian Teitsma

_
Meld je aan bij de grootste e-mailservice wereldwijd met MSN Hotmail: 
http://www.hotmail.com/nl


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




RE: selecting a row in a table with a checkbox

2002-01-02 Thread pritika.pattar

Hi Lilian,

Say, you have a column as 'UserId' which is the base for getting all the
information pertaining to the selected row. In such case you assign the
UserId to the 'value' attribute of the checkbox which you can access
later for retrieving the values. Refer Html Tags documentation of
Struts for details.

Pritika

-Original Message-
From: l str [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 02, 2002 6:13 PM
To: [EMAIL PROTECTED]
Subject: selecting a row in a table with a checkbox


Hi,

I have a question about usage of a checkbox. I have looked in the
archive 
whether somebody already posted the problem, but I couldn't find
anything.
My problem is: I have a table where the rows contain information and
some 
cells have to be filled in by a user. When the checkbox in the first
cell of 
a row is checked, I need to get all the information in that row. But how
do 
I do that? How do I know which row is selected? And how do I get the 
information that is filled in by the user?
Any help would be welcome. Thanks a lot,

Lilian Teitsma

_
Meld je aan bij de grootste e-mailservice wereldwijd met MSN Hotmail: 
http://www.hotmail.com/nl


--
To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
For additional commands, e-mail:
mailto:[EMAIL PROTECTED]


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]