Getting request parameters from XForms

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Getting request parameters from XForms

Erik Bruchez
Administrator
All,

With the Page Flow Controller, you can extract request parameters and
elements of the request path quite easily:

   http://www.orbeon.com/ops/doc/reference-page-flow#url-extraction

This is sometimes optimal, sometimes maybe a little heavy, but it works.

Now would it make sense to make it easier to access request parameters
directly from the page? I see two ways of doing it:

1. Hooking up oxf:request to the XForms page so that you can access a
    full request document with input:request, e.g.:

    <xforms:instance src="input:request"/>

    in the same way you access input:data or input:instance.

2. Use the XPath approach and define XPath functions to access
    different request values, very much like eXist does:

    http://demo.exist-db.org/xquery/functions.xq#N10B33

Or maybe both?

The main drawback I see in #2 is that if in the future we want to
perform more aggressive caching of pages, we will need to determine
dependencies based on the use of request functions. This is a little
harder to implement than #1, which allows free caching capabilities
based on the pipeline engine.

Any thoughts?

-Erik

--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/




--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Getting request parameters from XForms

Alessandro Vernet
Administrator
On 5/25/07, Erik Bruchez <[hidden email]> wrote:
> 1. Hooking up oxf:request to the XForms page so that you can access a
>     full request document with input:request, e.g.:
>
>     <xforms:instance src="input:request"/>
>
>     in the same way you access input:data or input:instance.

Having to create an XML document with all the request-related
information we have every time you want to read a simple request
parameter seems a little heavy. Also I feel that using an XPath
function is a more natural way to extend XForms.

> 2. Use the XPath approach and define XPath functions to access
>     different request values, very much like eXist does:
>
>     http://demo.exist-db.org/xquery/functions.xq#N10B33

My preference goes for this second option. Even if there are cases
where you will need more than request parameters and having access to
the whole request document could be convenient.

Alex
--
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
http://www.orbeon.com/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws