I had to change
source = resolver.resolve(uri); //to
source = resolver.resolveURI(uri);

and change context:// to cocoon://

Works Now !!

Thank You

JD


-----Original Message-----
From: Upayavira [mailto:[EMAIL PROTECTED]
Sent: Friday, November 07, 2003 1:37 PM
To: [EMAIL PROTECTED]
Subject: Re: Woody Populate Form with xsp (flow)


JD Daniels wrote:

>I was wondering if it was possible to load an xsp pipeline instead of a
>source xml file..
>
>ex.
>// parse the document to a DOM-tree
>var document = loadDocument("forms/test.xml");
>
>// bind the document data to the form
>form.load(document);
>form.showForm("display-pipeline");
>
>Change to:
>
>// Load DOM-tree From Xsp
>
var uri = "context://formdata.xsp?id=" + cocoon.request.get("id");

var resolver =
cocoon.getComponent(Packages.org.apache.excalibur.source.SourceResolver.ROLE
);
var source = resolver.resolve(uri);
var parser =
cocoon.getComponent(Packages.org.apache.excalibur.xml.dom.DOMParser.ROLE);
var document =
parser.parseDocument(Packages.org.apache.cocoon.components.source.SourceUtil
.getInputSource(source));

form.load(document);

Now that's me taking a bit of a leap - never done it before, but I think
it should work.To explain:
1) Convert your xsp uri into a source using a source resolver
2) Parse that source into a DOM object
3) Load that DOM object into your form.

Hope it works!

Regards, Upayavira

>// bind the document data to the form
>form.load(document);
>form.showForm("display-pipeline");
>
>
>JD
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to