You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Roland Carlsson <ro...@alfa-moving.se> on 2004/11/03 11:01:40 UTC
Multibox problem
Hi!
I'm trying to create a set of checkboxes with the MulitBox-tag.
The problem is that I get an extra checkbox with brackets around its value,
like in this html-code where I expect two checkboxes but get three:
<input type="checkbox" name="functions" value="[test, prov]">
[test, prov]
<input type="checkbox" name="functions" value="prov" checked="checked">
prov
<input type="checkbox" name="functions" value="test" checked="checked">
test
My page has this code inside it: ("funk" are a Collection stored in the
request, "filedata" has the property "functions" that also is a Collection)
<logic:iterate id="item" name="func" scope="request">
<html:multibox name="filedata" property="functions">
<bean:write name="item"/>
</html:multibox>
<bean:write name="item"/>
</logic:iterate>
Could you please point out why I get this extra checkbox
Thanks in advance
Roland Carlsson
ps: I have looked in the arcives but it says it doesn't support textsearch
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
SV: Multibox problem
Posted by Roland Carlsson <ro...@alfa-moving.se>.
Hi Robert!
Thanks for your answer. It pointed me to the problem. I used the add instead
of addAll of the Collection-interface. So instead of adding the elements
(Strings) I added the collection as a collection.
Regards
Roland Carlsson
Den 04-11-03 11.50, skrev "Robert Taylor" <rt...@mulework.com>:
> How many items are in the "func" data structure in request scope?
> This is what drives the number of iterations.
>
> robert
>
>> -----Original Message-----
>> From: Roland Carlsson [mailto:roland.carlsson@alfa-moving.se]
>> Sent: Wednesday, November 03, 2004 5:02 AM
>> To: Struts Users Mailing List
>> Subject: Multibox problem
>>
>>
>> Hi!
>>
>> I'm trying to create a set of checkboxes with the MulitBox-tag.
>>
>> The problem is that I get an extra checkbox with brackets around its value,
>> like in this html-code where I expect two checkboxes but get three:
>>
>> <input type="checkbox" name="functions" value="[test, prov]">
>> [test, prov]
>> <input type="checkbox" name="functions" value="prov" checked="checked">
>> prov
>> <input type="checkbox" name="functions" value="test" checked="checked">
>> test
>>
>>
>> My page has this code inside it: ("funk" are a Collection stored in the
>> request, "filedata" has the property "functions" that also is a Collection)
>>
>> <logic:iterate id="item" name="func" scope="request">
>> <html:multibox name="filedata" property="functions">
>> <bean:write name="item"/>
>> </html:multibox>
>> <bean:write name="item"/>
>> </logic:iterate>
>>
>> Could you please point out why I get this extra checkbox
>>
>> Thanks in advance
>> Roland Carlsson
>>
>>
>> ps: I have looked in the arcives but it says it doesn't support textsearch
>>
>>
>> ---------------------------------------------------------------------
>> 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
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
RE: Multibox problem
Posted by Robert Taylor <rt...@mulework.com>.
How many items are in the "func" data structure in request scope?
This is what drives the number of iterations.
robert
> -----Original Message-----
> From: Roland Carlsson [mailto:roland.carlsson@alfa-moving.se]
> Sent: Wednesday, November 03, 2004 5:02 AM
> To: Struts Users Mailing List
> Subject: Multibox problem
>
>
> Hi!
>
> I'm trying to create a set of checkboxes with the MulitBox-tag.
>
> The problem is that I get an extra checkbox with brackets around its value,
> like in this html-code where I expect two checkboxes but get three:
>
> <input type="checkbox" name="functions" value="[test, prov]">
> [test, prov]
> <input type="checkbox" name="functions" value="prov" checked="checked">
> prov
> <input type="checkbox" name="functions" value="test" checked="checked">
> test
>
>
> My page has this code inside it: ("funk" are a Collection stored in the
> request, "filedata" has the property "functions" that also is a Collection)
>
> <logic:iterate id="item" name="func" scope="request">
> <html:multibox name="filedata" property="functions">
> <bean:write name="item"/>
> </html:multibox>
> <bean:write name="item"/>
> </logic:iterate>
>
> Could you please point out why I get this extra checkbox
>
> Thanks in advance
> Roland Carlsson
>
>
> ps: I have looked in the arcives but it says it doesn't support textsearch
>
>
> ---------------------------------------------------------------------
> 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