Re: Checkboxes with multiple values

Stephen Davidson <[email protected]>
Newsgroups gmane.comp.java.keel.user
Message-ID <[email protected]>
Hi Mike.

You are correct, this was post 2.0, about a month and a half after 2.0 was released.  Therefore, this would be in the 2.1 development snapshots.

WARNING: There is some flakyness involving checkboxes, however.  Checkboxes are the only form element defined by HTML Standards to NOT return/submit 
a value when _not_ checked.  As a result, there is no way to tell correctly which checkbox was checked, or not checked.  The other INPUT types all 
send a value, even if it is only "DEFAULT" or "".  As a result, there is no easy way to handle multiple checkboxes with the same name.... For that, 
the best way is "name="checkbox_<rowX>", and then have a look for it when processing the row in question.

Regards,
Steve

Michael Nash JGlobal.com wrote:
> Nathan:
> 
> I'm pretty sure I recall Steve introducing a fix for this, where multiple values could be returned from several different UI components - I believe it was post 2.0, though.
> 
> I'll try to dig up the reference....
> 
> Mike
> 
> On Wed, 21 Apr 2004 20:37:43 -0700
> Nathan Kontny <Nathan.Kontny-UgwZ4owrJFB8UrSeD/[email protected]> wrote:
> 
> 
>>Has anyone been able to use the Keel 2.0 with Struts to get multiple values for
>>a set of checkboxes with the same name.  It doesn't look like its supported yet
>>as I see in the AbstractWebappClientConnector: 
>>
>>protected void processNonCommandParam(
>>        WebappRequest wreq,
>>        KeelRequest kreq,
>>        String oneParamName) {
>>
>>        kreq.setParameter(oneParamName, wreq.getParameter(oneParamName));
>>
>>As opposed to using a possible getParameterValues on the request.  Is there a
>>workaround for this in 2.0, or something to support this in 2.1? 
>>
>>Thank you, 
>>Nathan


-- 
Java/J2EE Developer/Integrator
Chair, Dallas/FortWorth J2EE Sig
214-724-7741
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.