Clearer, but, I am not sure I have all the information I need.

First, Do page A and page B have to declare the same xform instance
document for this your xupdate example to work? (as in your wizard
example)

If page B does not declare a static xform, but builds one dynamically
using and xpl what would the xupdate in the result of page A be updating
into?

Could this explain why I am seeing the xform XPL of page B executing
before the page is actually called?

It sounds like for my purposes using input from page A to build the
instance for page B, I will have to use the session...do you agree?

Peter





 

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Erik Bruchez
Sent: Tuesday, March 30, 2004 1:09 PM
To: OXF Users
Subject: Re: passing information between pages

Peter,

The model is very simple: all pages are completely separate, unless you
pass 
information between them ;-) This can be done, as you suggested, through
the 
session. The other way is through the XForms instance.

In general, if you go from page A to page B, no information is passed to
page 
B through the instance, i.e. the XForms instance for page B is as
defined in 
your XForms model for page B.

With XUpdate, in the controller, you can say that when going to page B
from 
page A, the instance of page B must be updated with some information,
which 
can be pretty much arbitrary since you have access at that point to the 
instance of page A, as well as to the result of the action, if any,
performed 
on page A.

So to "pass the updated XForms instance from one page to another", you
can use 
XUpdate in the controller. It is not page B accessing instance of page
A, but 
rather your XUpdate code, in the controller, copying the instance of
page A 
into the instance of page B.

I hope this is clearer.

-Erik

Peter Charles wrote:

> Erik,
> 
> I am not sure that I understand you.  I would like to pass the updated
> xform instance from one page to another.  This is the xml 'instance'
for
> page one accessed some how from page two.
> 
> For instance My second page's xform is an xpl file.  Can I declare an
> input on the xform xpl that captures the 'instance' from the first
page.
> 
> If this is not possible, how can I access page one's instance from
page
> two's xform and or model?
> 
> What I am not getting is where (and how) in page two, I can access the
> instance from page one.  Also must xupdate be called for the instance
to
> be passed?
> 
> Thanks
> 
> Peter
> 
> 
> 
> 
> 
> 
> 
> 
> -----Original Message-----
> From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
> On Behalf Of Erik Bruchez
> Sent: Tuesday, March 30, 2004 12:03 PM
> To: OXF Users
> Subject: Re: passing information between pages
> 
> Peter,
> 
> Using the session is in general not recommended, as that has some
> issues, so you are right to look for alternatives.
> 
> You can definitely pass information from instance to instance using
> XUpdate in the controller, for example:
> 
> <action when="/form/action = 'dothis'"
action="oxf:/action/dothis.xpl">
>      <result when="/result-data">
>        <xu:append select="/form/data"><xu:copy-of 
> select="document('#action')/result-data/*"/></xu:append>
>      </result>
> </action>
> 
> The XUPdate code has access to document('#action') which is the
> document output by the action, as well as document('#instance') which
> is the instance of the initial page. The XUpdate code works on the
> newly constructed instance of the destination page.
> 
> Also, typically in the case of wizards, or multiple-page spanning data
> entry forms, you can use the approach of having a large instance
> progressively filled-out as the user navigates from page to page. This
> works well until you redirect to a page to another page, because
> redirects use GET, and OXF passes the instance on the URL in that
> case. If the instance is very large, this won't work because browsers
> have limitations on the size of URLs.
> 
> So with OXF 2.2, for large instances, you are stuck either using the
> session, or avoiding redirects (which also means avoiding <result
> page="..."> in the controller). OXF 2.5 solves this by providing a
> built-in way of passing large instances between pages.
> 
> -Erik
> 
> Peter Charles wrote:
> 
>  > Hello,
>  >
>  > Is there any method other than using the session to pass
information
>  > between pages?
>  >
>  > For instance, have the updated xform from page one, be the sent as
an
>  > input to an xpl in page two.
>  >
>  > Thanks
>  >
>  > Peter
> 
> _______________________________________________
> oxf-users mailing list
> [EMAIL PROTECTED]
> http://mail.orbeon.com/mailman/listinfo/oxf-users
> 
> _______________________________________________
> oxf-users mailing list
> [EMAIL PROTECTED]
> http://mail.orbeon.com/mailman/listinfo/oxf-users

_______________________________________________
oxf-users mailing list
[EMAIL PROTECTED]
http://mail.orbeon.com/mailman/listinfo/oxf-users

_______________________________________________
oxf-users mailing list
[EMAIL PROTECTED]
http://mail.orbeon.com/mailman/listinfo/oxf-users

Reply via email to