cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephan Coboos <cromo...@gmx.net>
Subject Re: [CForms] How to iterate other a model?
Date Thu, 02 Dec 2004 07:00:24 GMT
Sylvain Wallez wrote:

> Stephan Coboos wrote:
>
>> Hello,
>>
>> is it possible to iterate other a model object within a flowscript? 
>> The model object was retrieved before by calling form.getModel().
>
>
>
> Yes, you can use lookupWidget() that accepts a path-like syntax (i.e. 
> "a/b/c" or "../d")
>
>> Another question: Is there an API doc available for this object?
>
>
>
> http://cocoon.apache.org/2.1/apidocs/org/apache/cocoon/forms/formmodel/package-summary.html

>
>
> Sylvain
>

Hi Sylvain,

that's why I'am a little bit confused about the documentation because 
model.lookupWidget("age") as well as other methods from type Widget 
doesn't work in my flowscript. I got this exception:

Original Exception: TypeError: lookupWidget is not a function. (file:/E:/container/instances/testsys/webapps/evalsys/app/flows/fillOut.js;
line 13)
	at org.mozilla.javascript.NativeGlobal.constructError(NativeGlobal.java:581)
	at org.mozilla.javascript.NativeGlobal.constructError(NativeGlobal.java:541)



In the listing below you can see the part in my flowscript:

  var form = new Form("cocoon:/formDefinition/" + inquiryName);
  form.showForm("formTemplate/" + inquiryName);

  var model = form.getModel();
  print("Widget: :" + model.lookupWidget("age"));

What's wrong here?
Thank you for your help!

Regards
Stephan



Mime
View raw message