You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Tony Edwards <te...@civica.com.au> on 2004/05/14 07:29:52 UTC
Cocoon FOM objects
Hi Cocooners,
I'm a little confused. I'm trying to upload an xml file and process it
through the sitemap using Flow.
I've hacked the file upload example to suit my needs and I've got the
file being uploaded to my 'upload-dir' which I've set in web.xml.
I've got some code from an xsp I had lying around which contextualizes
the file, finds it then processes it. I want to do this processing in
Flow, not xsp.
My issue is this, I'm trying to get access to the methods returned by
the FOM_Cocoon object, namely getRequestURI(), getContextPath() etc but
I keep getting a " getContextPath is not a function" error.
I thought calling the method like this "cocoon.request.getContextPath()"
was all you needed to do. What am I missing??? Is the cocoon.request
object differen from the FOM_Cocoon object? Any help would be gratefully
appreciated.
Thanks a bunch,
Tony
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Cocoon FOM objects
Posted by Bruno Dumon <br...@outerthought.org>.
On Fri, 2004-05-14 at 07:29, Tony Edwards wrote:
> Hi Cocooners,
> I'm a little confused. I'm trying to upload an xml file and process it
> through the sitemap using Flow.
> I've hacked the file upload example to suit my needs and I've got the
> file being uploaded to my 'upload-dir' which I've set in web.xml.
> I've got some code from an xsp I had lying around which contextualizes
> the file, finds it then processes it. I want to do this processing in
> Flow, not xsp.
> My issue is this, I'm trying to get access to the methods returned by
> the FOM_Cocoon object, namely getRequestURI(), getContextPath() etc but
> I keep getting a " getContextPath is not a function" error.
> I thought calling the method like this "cocoon.request.getContextPath()"
> was all you needed to do. What am I missing??? Is the cocoon.request
> object differen from the FOM_Cocoon object? Any help would be gratefully
> appreciated.
flowscript only allows access to a subset of the request object, the api
is documented here:
http://cocoon.apache.org/2.1/userdocs/flow/api.html
As for the FOM_Cocoon class: this is a Java class that defines a
Javascript class/object: only methods whose name start with jsFunction_
are available to flowscript.
I don't know why the particular methods you mention above are not
included in the FOM, you might find more info in the dev list archives.
--
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