cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Manuel Mata <>
Subject RE: get selectionList for widget?
Date Wed, 07 Mar 2007 07:56:25 GMT
I did it using flowscript. I have not the code here
but it is something like.

var w = event.source.parent.lookupWidget("theWidget");
var items = [];
var items[0] = { value : "1", label : "One"};
var items[1] = { value : "2", label : "Two"};

With this you can set all the items of the selection
list. To set the values (i mean, to show some values
selected in a checkbox styling), you could do
something like:

var values = {1,2};//Array initializing

With this you should get the item with those values

To recover the selection list use:

var sl = w.getSelectionList();

I think the SelectionList object should have some
methods to get the values, or even it should return
some kind of value/label pair object and recover it
from that object.

I hope this helps.

--- Gary Larsen <> escribió:

> I'm trying to get the selection list for a widget
> from within an
> ActionListener.  The goal is to select all/none for
> a MultiValueField (or
> Field for that matter) widget.
> From the listener I can use setValues() on the
> widget, but the possible
> values need to be hard-coded.  I would like to set
> the values using the
> selection list of possible values.
> Is this possible somehow?  It does not seem obvious
> from the API.
> Thanks,
> gary

LLama Gratis a cualquier PC del Mundo. 
Llamadas a fijos y móviles desde 1 céntimo por minuto.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message