On Mon, 2006-01-16 at 16:51 +0100, [EMAIL PROTECTED] wrote:
> Hello,
> 
> I have some difficulties accessing the widget values in the flow script. 
> 
> var form = new Form("registration_definition.xml");
> var wid = form.getWidget();
> wid.message.value = cocoon.parameters.defaultMessage;

You need to do:

wid.getChild("message").value = ...

> 
> The last call throws this exception: 
> org.mozilla.javascript.EcmaError: Cannot convert null to an object.
> 
> When I access the same widget in an jscript block in the form_definition
> there is no problem. 
> 
>  <fd:javascript>
>     var msg = this.lookupWidget("../message");
>  msg.value = "Selecting." + + event.newValue ;
> </fd:javascript>
> 
> What is the problem here? 
> I use the sitemap form the simple form example of the user guide.
> 
> cheers,
> 
> Pete
> 
-- 
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]