We ran into this problem recently as well.

If you use a multiple select via a button set, the data is saved to a
child node of the paragraph. Thus, you need to access the *node* named
after the dialog control rather than the *property* named after it:

Iterator iter =
myParagraph.getContent("multiSelect").getNodeDataCollection().iterator()
;
while (iter.hasNext()) {
  NodeData next = (NodeData) iter.next();
  out.println(next.getString());
}

Hope that helps.

I wrote up a set of tags to make this sort of thing easier. Once I get
it refactored to adjust with some of the things I've learned since I
started, we'll see about contributing that back to make this easier for
all interested.

Cheers,
Andrew



--
Andrew Hanenkamp
Interaction Developer
Boomer Consulting, Inc.
 
[EMAIL PROTECTED]
1-785-537-2358 x17
1-888-266-6375 x17
 
610 Humboldt St.
Manhattan, KS 6502
http://www.boomer.com  
-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, May 10, 2006 1:15 PM
To: [email protected]
Subject: Re: [magnolia-user] AW: [magnolia-user] multiple select dialog

OK, I'm starting to wonder if this is really possible.  I took a look at
the info.magnolia.cms.gui.dialog.DialogButtonSet and I figured out how
to set the valueType to multiple (simpler than I thought, I was assuming
magnolia did something).

Here's the problem now: when I save the dialog it doesn't seem to
actually save the data.  The only difference I can see between what my
code generates for html and what the code for the multiple checkboxes
generates is that the multiple checkboxes appends an extra value to the
name of the <input> so that instead of it being 'selection4' for both
checkboxes, it is 'selection4_SETBUTTON_0', 'selection4_SETBUTTON_1',
and so forth.  I don't know where to look to see what it is doing with
those name/value pairs.  With a <select> you will only have one name
possible for the multiple values it contains.  

Could someone please point me to the code that does the actual saving of
a dialog form and how it parses out the information?  

It may just be that what I'm wanting is impossible (for example the
magnolia code may only do a request.getParameter() and not a
request.getParameters()).

Thanks,

Tom

-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 09, 2006 4:55 PM
To: [email protected]
Subject: Re: [magnolia-user] AW: [magnolia-user] multiple select dialog

I've got the select box that I wanted, that is expanded and allows
multiple selections, but now I don't know how to tie this into Magnolia.
I've tried stepping through the source, but without comments it still is
a bit difficult to determine where exactly things are happening and what
I need to hook into.  

I'm wondering if someone could tell me where I need to hook in for two
things: 1) so I can save the values from the select list as individual
properties (or nodes) and 2) how to pull those back out for using when
the dialog loads back up again to have the proper items selected in the
select box. 

It looks like the answer might lie in the
info.magnolia.cms.gui.control.ControlSuper.setValues() and getValues()
methods, is that correct?  If so, is there a property I need to set to
get it to use the values instead of just the value?

Thanks,

Tom

-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED]
Sent: Monday, May 08, 2006 10:08 AM
To: [email protected]
Subject: Re: [magnolia-user] AW: [magnolia-user] multiple select dialog

There's a select box in /features/mailform in the samples.

You'll have to code in the multiple select part as I recall. Shouldn't
be too hard ... let us know if you have problems.

Cheers,
Jay Moskos

...

----------------------------------------------------------------
for list details see
http://www.magnolia.info/en/magnolia/developer.html
----------------------------------------------------------------

----------------------------------------------------------------
for list details see
http://www.magnolia.info/en/magnolia/developer.html
----------------------------------------------------------------

----------------------------------------------------------------
for list details see
http://www.magnolia.info/en/magnolia/developer.html
----------------------------------------------------------------

Reply via email to