cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nacho Jimenez <>
Subject Re: Trying to get a selectionlist label into a binding
Date Fri, 16 Apr 2004 14:46:00 GMT
Joerg Heinicke wrote:

> On 14.04.2004 20:18, Nacho Jimenez wrote:
>> Hello all,
>>      I've got a (woody) form with lots of widgets. One of them is a 
>> selection list that let's you choose a user, with the full name as 
>> label and the login name as value of the selection list.
>>      I'm binding the form into an xml file, and would like to bind 
>> this information to:
>>      <user id="natz">Nacho Jimenez de Luis</user>
>>    The only idea that springs to my mind is to use a <wb:javascript> 
>> bindng and on the on-save option, access the widget directly, but i 
>> don't know wehre to get the selection's label from, not the widget's 
>> label.
>>    I'm out of ideas here, can someone point the right way?
> To clear up the picture:
> You have a form defined with a field widget and a selection list.
> You want to fill the selection list with an XML.

No, that's easy and I already have taken care of it..

Right now my field widget is already a selection list populated with a 
list of users... (sttatic version, for sake of simplicity)

        <wd:field id="user" required="true">
            <wd:datatype base="string"/>
              <wd:item value="natz">
                <wd:label>Nacho Jimenez</wd:label>
               <!-- etc -->
              <wd:item value="otro">
                <wd:label>Otro Distinto</wd:label>

What i need is to store the selection in an XML as:

    <user id="natz">Nacho Jimenez</user>

    The first binding is simple:

      <wb:value id="user" path="user/@id"/>

    But I just don't know how to do the second.. I guess it could be 
something like:
    <wb:javascript id="user" path="user" direction="save">

    Any idea?

> Another question is where you want to store the value at the end.
> And if you still want to do it via binding, like I did it, but with 
> beans and not for XML, have a look at 
> and search for 
> wb:javascript there.

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

View raw message