Return-Path: Delivered-To: apmail-cocoon-users-archive@www.apache.org Received: (qmail 71809 invoked from network); 3 Nov 2003 05:55:21 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 3 Nov 2003 05:55:21 -0000 Received: (qmail 44756 invoked by uid 500); 3 Nov 2003 05:54:51 -0000 Delivered-To: apmail-cocoon-users-archive@cocoon.apache.org Received: (qmail 44724 invoked by uid 500); 3 Nov 2003 05:54:51 -0000 Mailing-List: contact users-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: users@cocoon.apache.org Delivered-To: mailing list users@cocoon.apache.org Received: (qmail 44703 invoked from network); 3 Nov 2003 05:54:51 -0000 Received: from unknown (HELO terminus.netxsurance.com.au) (203.56.122.250) by daedalus.apache.org with SMTP; 3 Nov 2003 05:54:51 -0000 Received: from Apollo.netxsurance.com.au (Not Verified[192.168.120.19]) by terminus.netxsurance.com.au with NetIQ MailMarshal (v5.5.4.17) id ; Mon, 03 Nov 2003 16:55:19 +1100 Received: from W2DEV03 ([192.168.1.169]) by Apollo.netxsurance.com.au with Microsoft SMTPSVC(5.0.2195.6713); Mon, 3 Nov 2003 16:55:19 +1100 Message-ID: <018101c3a1cf$04b37d80$a901a8c0@tias.com.au> From: "Joe Latty" To: References: <003301c39f43$dea5f830$a901a8c0@tias.com.au> <1067596684.26509.43.camel@yum.ot> <015e01c3a1a0$5acd2920$a901a8c0@tias.com.au> Subject: Re: Populate Woody Form from request in Flow Script Date: Mon, 3 Nov 2003 16:55:00 +1100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-OriginalArrivalTime: 03 Nov 2003 05:55:19.0101 (UTC) FILETIME=[0FBF66D0:01C3A1CF] X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N 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" To: 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" > To: > 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