You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Mark Lundquist <ml...@wrinkledog.com> on 2004/03/10 07:21:04 UTC

Trouble w/ woody v2 (was Re: Need help w/ (and flowscript)

On Mar 9, 2004, at 6:04 PM, Christopher Oliver wrote:

> There is a "v2" version of the Woody flowscript API that allows you to 
> do this:
> <..snip..>

Man, I could sure use some expert help getting this v2 form API going, 
because I'm just having a miserable time.

I'm loading 
resource://org/apache/cocoon/woody/flow/javascript/v2/Form.js, just 
like in the sample.

All the expected properties of my widget to correspond with its 
children are coming up "undefined".  I tried dumping some dumpage like 
this:

     var form = new Form ("Profile/forms/main.wd");
     var wd = form.getWidget();
     print (form);
     print (form.formWidget);
     print (wd);

Here's what it prints:

[object Object]
[object Widget]
org.apache.cocoon.woody.formmodel.Form@5b0ff7

When I add the same kind of scaffolding to the 
samples/woody/v2/woody_flow_example.js, it prints this:

[object Object]
[object Widget (form)]
[object Widget (form)]

What could be causing the difference?  I'm just totally stumped. :-(
~ Mark





---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Trouble w/ woody v2 (was Re: Need help w/ (and flowscript)

Posted by Christopher Oliver <re...@verizon.net>.
That's correct. In V2 the widgets are real JS objects so you can set 
arbitrary properties on the form widget itself or any other widget and 
these will be accessible in your pipeline.

Chris

Mark Lundquist wrote:

>
> On Mar 10, 2004, at 6:50 AM, Christopher Oliver wrote:
>
>> It looks like the Form object from woody2.js is being loaded in your 
>> case. Make sure you remove all references to "woody2.js" from your 
>> sitemap and scripts.
>
>
> That was it!  Thanks, man...  Yeah, I had another flowscript that was 
> loading woody2.js.
>
> Now I'm getting a lot further along.  My current trouble is that 
> sendForm() is different in v2 — no bizdata parameter!  So the bizdata 
> parameter I'm passing in is being treated as the 
> postPipelineProcessing function.
>
> OK, so... apparently the v2 sendForm( ) passes the widget tree as the 
> the 'bizdata' to sendPageAndWait().
>
> What do I do if I have other bizdata not related to the widgets?
>
> Ahh — I think I see it, from the v2 sample — just attach it/them as 
> (a) property/ies to the form widget!
>
> Thanks!
> Mark
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Trouble w/ woody v2 (was Re: Need help w/ (and flowscript)

Posted by Mark Lundquist <ml...@wrinkledog.com>.
On Mar 10, 2004, at 6:50 AM, Christopher Oliver wrote:

> It looks like the Form object from woody2.js is being loaded in your 
> case. Make sure you remove all references to "woody2.js" from your 
> sitemap and scripts.

That was it!  Thanks, man...  Yeah, I had another flowscript that was 
loading woody2.js.

Now I'm getting a lot further along.  My current trouble is that 
sendForm() is different in v2 — no bizdata parameter!  So the bizdata 
parameter I'm passing in is being treated as the postPipelineProcessing 
function.

OK, so... apparently the v2 sendForm( ) passes the widget tree as the 
the 'bizdata' to sendPageAndWait().

What do I do if I have other bizdata not related to the widgets?

Ahh — I think I see it, from the v2 sample — just attach it/them as (a) 
property/ies to the form widget!

Thanks!
Mark


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Trouble w/ woody v2 (was Re: Need help w/ (and flowscript)

Posted by Christopher Oliver <re...@verizon.net>.
It looks like the Form object from woody2.js is being loaded in your 
case. Make sure you remove all references to "woody2.js" from your 
sitemap and scripts.

Chris

Mark Lundquist wrote:

>
> On Mar 9, 2004, at 6:04 PM, Christopher Oliver wrote:
>
>> There is a "v2" version of the Woody flowscript API that allows you 
>> to do this:
>> <..snip..>
>
>
> Man, I could sure use some expert help getting this v2 form API going, 
> because I'm just having a miserable time.
>
> I'm loading 
> resource://org/apache/cocoon/woody/flow/javascript/v2/Form.js, just 
> like in the sample.
>
> All the expected properties of my widget to correspond with its 
> children are coming up "undefined".  I tried dumping some dumpage like 
> this:
>
>     var form = new Form ("Profile/forms/main.wd");
>     var wd = form.getWidget();
>     print (form);
>     print (form.formWidget);
>     print (wd);
>
> Here's what it prints:
>
> [object Object]
> [object Widget]
> org.apache.cocoon.woody.formmodel.Form@5b0ff7
>
> When I add the same kind of scaffolding to the 
> samples/woody/v2/woody_flow_example.js, it prints this:
>
> [object Object]
> [object Widget (form)]
> [object Widget (form)]
>
> What could be causing the difference?  I'm just totally stumped. :-(
> ~ Mark
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Trouble w/ woody v2 (was Re: Need help w/ (and flowscript)

Posted by Christopher Oliver <re...@verizon.net>.
The object returned from form.getWidget() in V2 is a JavaScript wrapper 
of the woody widget that has a different API than the Java class (see 
the sample js file for a description of how to use it).

HTH,

Chris

Mark Lundquist wrote:

>
> On Mar 9, 2004, at 6:04 PM, Christopher Oliver wrote:
>
>> There is a "v2" version of the Woody flowscript API that allows you 
>> to do this:
>> <..snip..>
>
>
> Man, I could sure use some expert help getting this v2 form API going, 
> because I'm just having a miserable time.
>
> I'm loading 
> resource://org/apache/cocoon/woody/flow/javascript/v2/Form.js, just 
> like in the sample.
>
> All the expected properties of my widget to correspond with its 
> children are coming up "undefined".  I tried dumping some dumpage like 
> this:
>
>     var form = new Form ("Profile/forms/main.wd");
>     var wd = form.getWidget();
>     print (form);
>     print (form.formWidget);
>     print (wd);
>
> Here's what it prints:
>
> [object Object]
> [object Widget]
> org.apache.cocoon.woody.formmodel.Form@5b0ff7
>
> When I add the same kind of scaffolding to the 
> samples/woody/v2/woody_flow_example.js, it prints this:
>
> [object Object]
> [object Widget (form)]
> [object Widget (form)]
>
> What could be causing the difference?  I'm just totally stumped. :-(
> ~ Mark
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org