cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joe Latty" <joe.la...@tias.com.au>
Subject Re: Populate Woody Form from request in Flow Script
Date Mon, 03 Nov 2003 05:55:00 GMT
For anyone (apart from myself) who is interested.

Inside the function I put:

var sessionManager =
cocoon.getComponent(Packages.org.apache.cocoon.webapps.session.SessionManage
r.ROLE);
var documentFragment = sessionManager.getContextFragment("context", "path");
...

----- Original Message ----- 
From: "Joe Latty" <joe.latty@tias.com.au>
To: <users@cocoon.apache.org>
Sent: Monday, November 03, 2003 11:20 AM
Subject: Re: Populate Woody Form from request in Flow Script


> Bruno,
>
> Thanks for the advice. However I now have a question.
>
> How do I get a contextFragment from the SessionManager Object in
javascript.
> Normally I would use the ServiceManager to get a handle to the
> SessionManager?
>
> We store session information needed for the SOAP call in a
contextFragment.
>
> Joe
>
> ----- Original Message ----- 
> From: "Bruno Dumon" <bruno@outerthought.org>
> To: <users@cocoon.apache.org>
> Sent: Friday, October 31, 2003 9:38 PM
> Subject: Re: Populate Woody Form from request in Flow Script
>
>
> > On Fri, 2003-10-31 at 01:13, Joe Latty wrote:
> > > We have a pipeline much the same as the Woody Example (form1) where on
> > > the GET request method we are initializing our form in a java class
> > > (there are some prefill form values obtained through a SOAP call).
> > >
> > > When the form is POSTed (submitted) it calls our flow script, a method
> > > (in this instance called airAvail).
> >
> > I think it would be better to start immediately from the flowscript,
> > create the form in the flowscript (so that you have the
> > javascript-wrapper object around it), and then call the class that does
> > the soap call from flowscript. In flowscript you can do
> > myform.getWidget() to get the original Java Form object, which you can
> > then pass on to your class.
> >
> > If the soap call returns an XML-document or a Java bean, then you might
> > also be able to use the binding to fill up the form.
> >
> > >
> > > Now in all the binding examples, inside the javascript functions, the
> > > form is populated from a bean. In this situation we want to populate
> > > the form from the request object using our binding.
> >
> > Populating the form from the request doesn't need a binding (the binding
> > is for binding the form data to your business data, not for processing
> > the incoming request). In flowscript, just call myform.showForm(...) and
> > everything will go automatic from there. (If you look into the woody2.js
> > source file you'll see what all this methods do).
> >
> > Feel free to ask further questions if there's still confusion about
> > something.
> >
> > -- 
> > Bruno Dumon                             http://outerthought.org/
> > Outerthought - Open Source, Java & XML Competence Support Center
> > bruno@outerthought.org                          bruno@apache.org
> >
> >
> > ---------------------------------------------------------------------
> > 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
>


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


Mime
View raw message