Page flow and actions - what am I doing wrong?

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

Page flow and actions - what am I doing wrong?

julian.fawcett
I have a problem regarding page flow and actions.
To illustrate my problem here's a small sample from my page-flow.xpl:

<page id="ics-referral-page1" path-info="/ics/referral/page1" xforms="oxf:/get-xform-data.xpl" model="oxf:/ics/referral/page1.xpl" view="oxf:/ics/referral/view.xpl">
  <action when="/form/action = 'save'" action="oxf:/save-xforms-data.xpl">
        <result>
            <xu:update select="/form/status_message">Save Successful</xu:update>
            <xu:update select="/form/ics">
                <xu:copy-of select="document('oxf:instance')/form/ics/*"/>
            </xu:update>
        </result>
    </action>
    <action when="/form/action = 'next'">
      <result page="ics-referral-page2">
          <xu:update select="/form/status_message">Next Page</xu:update>
          <xu:update select="/form/ics">
              <xu:copy-of select="document('oxf:instance')/form/ics/*"/>
          </xu:update>
       </result>
  </action>
</page>

When I am on this page and submit the form such that /form/action = 'save' I find that it behaves as I would expect, i.e. when the page refreshes I see that /form/status_message has been set to "Save Successful".

But when I submit the form such that /form/action = "next" it doesn't do what I expect. I would have expected /form/status_message to be set to "Next Page", but it isn't.

This leads me to the conclusion that I am missing something fundamental about page flow and actions, but I don't know what it is. Can anyone help me out please?

Joolz

Julian Fawcett
Esprit Ltd
Charlotte House
Wyvern Business Park
Derby



--
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: Page flow and actions - what am I doing wrong?

Alessandro  Vernet
Administrator
Hi Julian,

One difference between those 2 cases is that the first one stays on
the same page while the second one goes to a different page
(ics-referral-page2). Does this other page use the same XForms
instance with a /form/status_message? Can you display the instance
that gets build for that second page by adding a "debug" on the
"instance" input of the epilogue. Has /form/status_message been set
there as expected in the instance?

Alex

On 11/18/05, [hidden email] <[hidden email]> wrote:

> I have a problem regarding page flow and actions.
> To illustrate my problem here's a small sample from my page-flow.xpl:
>
> <page id="ics-referral-page1" path-info="/ics/referral/page1" xforms="oxf:/get-xform-data.xpl" model="oxf:/ics/referral/page1.xpl" view="oxf:/ics/referral/view.xpl">
>   <action when="/form/action = 'save'" action="oxf:/save-xforms-data.xpl">
>         <result>
>             <xu:update select="/form/status_message">Save Successful</xu:update>
>             <xu:update select="/form/ics">
>                 <xu:copy-of select="document('oxf:instance')/form/ics/*"/>
>             </xu:update>
>         </result>
>     </action>
>     <action when="/form/action = 'next'">
>       <result page="ics-referral-page2">
>           <xu:update select="/form/status_message">Next Page</xu:update>
>           <xu:update select="/form/ics">
>               <xu:copy-of select="document('oxf:instance')/form/ics/*"/>
>           </xu:update>
>        </result>
>   </action>
> </page>
>
> When I am on this page and submit the form such that /form/action = 'save' I find that it behaves as I would expect, i.e. when the page refreshes I see that /form/status_message has been set to "Save Successful".
>
> But when I submit the form such that /form/action = "next" it doesn't do what I expect. I would have expected /form/status_message to be set to "Next Page", but it isn't.
>
> This leads me to the conclusion that I am missing something fundamental about page flow and actions, but I don't know what it is. Can anyone help me out please?
>
> Joolz
>
> Julian Fawcett
> Esprit Ltd
> Charlotte House
> Wyvern Business Park
> Derby
>
>
>
>
> --
> 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
>
>
>

--
Blog (XML, Web apps, Open Source): http://www.orbeon.com/blog/



--
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
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet