On Wed, 2004-04-28 at 12:31, [EMAIL PROTECTED] wrote:
> Sorry for the (copy/paste) error. I've corrected the code.
> 
> I'd like initialize a MultiValueFiel with double-listbox style in an action with the 
> values introduced by the user. I'm trying this :
> 
> Definition :
> 
>    <wd:multivaluefield id="data">
>        <wd:label/>
>        <wd:datatype base="string">
>        </wd:datatype>      
>        <wd:selection-list src="cocoon://MySelectionLists/data" dynamic="true"/>
>      </wd:multivaluefield>
> 
> instance :
>  
>  <wt:widget id="data">
>        <wi:styling list-type="double-listbox">
>        <wi:available-label>Select your data:</wi:available-label>
>        <wi:selected-label/>
>        </wi:styling>
>  </wt:widget>
> 
> 
> In the action :
>    "data base connection ..." 
>   
>    MultiValueField Act_data=(MultiValueField)  form.getWidget("data");
>    Act_data.setValue(resultSet_data);
> 
> my intention is that it appears in the selected field (resultSet_data). (so that a 
> user can change his profile, for example)
> 
> but I obtain the following error :
> 
> Error : java.lang.RuntimeException: Cannot set the value of widget data

I cannot understand how you can possibly get that exception, at least
not with cocoon 2.1.4. You could alternatively try calling the setValues
method on the MultiValueField (notice the s on the end).

-- 
Bruno Dumon                             http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
[EMAIL PROTECTED]                          [EMAIL PROTECTED]


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

Reply via email to