W3C home > Mailing lists > Public > www-forms@w3.org > July 2005

Re: Calculated xf:load

From: Alessandro Vernet <avernet@orbeon.com>
Date: Tue, 19 Jul 2005 12:27:08 -0700 (PDT)
Message-ID: <20050719192708.34765.qmail@web54506.mail.yahoo.com>
To: www-forms@w3.org

--- Alexander Berezhnoy <alexander.berezhnoy@splc.ru> wrote:
> I need to have load action, which redirects to the URL which is 
> dynamically calculated by form current instance attributes.
> What is the common solution?

Hi Alexander,

(1) You can use a <xforms:model nodeset="/to/url" calculate="..."/> to
create the URL with an XPath expression based on other values in the
instance. Then you can refer to that node in your <xforms:load

(2) Alternatively, you might want to leave the page navigation logic
outside of the XForms code. In this scenario, the XForms code will submit
the instance to a URL which is always the same. Then on the server you
figure out based on the content of the instance what the next page should
be and respond with a redirect to that page.

This is an architectural choice, and it might influenced by the complexity
of the server-side code you have to write to implement the second method.
The Orbeon PresentationServer (OPS) Ajax implementation of XForms comes
with a component (which is outside of the scope of the XForms
specification) that lets you declare the page navigation logic in an XML
file, so we tend to prefer the second method.


Blog (XML, Web apps, Open Source): http://www.orbeon.com/blog/
Received on Tuesday, 19 July 2005 19:27:13 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:36:15 UTC