>>>>> "kiuma" == kiuma  <[EMAIL PROTECTED]> writes:

    kiuma> Ok, I've understood that if I have the tag
    kiuma> <html-el:checkbox property="principalPermissions" value="Foo">

    kiuma> and then I have a Collection getPrincipalPermissions() and
    kiuma> setPrincipalPermissions(String value)

    kiuma> and if I put the value "Foo" in the collection this should be checked.
    kiuma> But I have some doubt about it.

It's important to know how the three "select button" types (checkbox, multibox,
and radio) work with respect to when the "checked" attribute gets set, and the
values of the specified bean property and the "value" attribute value:

Checkbox: property = "true", "yes", or "on"
Multibox: property = any of the collection values
Radio:    property = value

So, if you have a checkbox, the property value has to be a scalar, and having
the value "true", "yes", or "on".

If you want it to be checked if the value is equal to any of the entries of a
collection/array, then you need to use the "multibox" tag.

If this isn't clear from the documentation, it is often helpful to run your
application in a debugger, and set breakpoints in the Struts source code.
You'll learn a lot.

-- 
===================================================================
David M. Karr          ; Java/J2EE/XML/Unix/C++
[EMAIL PROTECTED]


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

Reply via email to