You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Struts Newsgroup (@Basebeans.com)" <st...@basebeans.com> on 2002/07/29 23:10:02 UTC

Checkboxes - select All

Subject: Checkboxes - select All
From: J Isv <ji...@btopenworld.com>
 ===
I'm in a bit of a sticky problem with checkboxes.
Say I've got a list of items and there is a checkbox at the start of 
each row, similar to how yahoo or hotmail works. There is a selectAll 
checkbox at the top which when you select it will simply select all the 
checkboxes. Then I'll click a button or something and execute some code 
in my perform() method.

I know how to do this with Javascript - the problem comes when I have 
the attribute on my ActionForm that maps to the checkboxes. This behaves 
as a bean of course, but the checkboxes on the actual web page don't 
follow this, because I have to index them to select them.
Perhaps I'm going about it the wrong way by selecting them with 
Javascript, although I don't see anyother solution (I don't really want 
to post the form just to select the boxes).

Can someone give me some advice on this?

Thanks.


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Turn off Struts debugging?

Posted by Chris Wall <cw...@bea.com>.
How can I turn of Struts' debugging?  I have my own Log4J configuration that
sets log level to DEBUG, but I want only my logging, not Struts'.  I tried
setting the init param to off...
<param-name>debug</param-name>
<param-value>0</param-value>
...but I still get full Struts logging.

Thank you.


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Checkboxes - select All

Posted by Rick Reumann <ma...@reumann.net>.

On Monday, July 29, 2002, 5:10:02 PM, Struts wrote:

SN> Perhaps I'm going about it the wrong way by selecting them with 
SN> Javascript, although I don't see anyother solution (I don't really want 
SN> to post the form just to select the boxes).

    Personally I think this is a perfect valid task for javascript to
    handle. You really can't get around using javascript IMHO for this
    behavior. Sure you can have the user click a "Select All" box and
    then submit the form and return it with them all checked but how
    are you going to get the form to submit? More than likely you'd
    want a javascript handler to realize the checkbox was checked and
    then submit- so if that's the case why not just use javascript in
    the first place and mark them all selected when the box is
    checked.
    
-- 

Rick
mailto:maillist@reumann.net


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>