I'm having a problem passing a set of checkbox values from an ActionForm to
our database.  When I transfer the values of the String[] array, such as a
String[5] array, using BeanUtils.populate in my Action, the array gets
truncated and comes out as a single String value, actually a String[1].

What's up with that?!

Is BeanUtils.populate() able to work with String[] arrays?   If so, is there
a known bug in my particular version?  (How can I tell what version of
BeanUtils I'm working with?  It's bundled with Struts 1.1 and I can't seem
to match the source code versions.)

If BeanUtils.populate is not able to work with String[] arrays, how do folks
deal with transferring checkbox-style data from a Web page, through an
ActionForm to a database?

To chase down this problem, I wrote a simple test case that pulls up one of
our Document objects, creates a DocumentForm (an ActionForm), populates it
from the document and sees if their "selectedUserGroups" values are
different.  They are.  Here's the gist of it:

    Document document = new Document(cn, 10);
    SearchForm searchForm = new SearchForm();
    Map map = BeanUtils.describe(document);
    BeanUtils.populate(searchForm, map);

At the first line, document contains a selectedUserGroups property that is a
String[] array with five values.
At the third line, map references a HashMap that contains a key for
selectedUserGroups  that contains a String[] with one value.

How do I get all the values?   Any help would be appreciated.



Dave


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

Reply via email to