On Sat, 30 Oct 2004 14:42:42 +0200, "Jos Vos" <[EMAIL PROTECTED]> said:
> Hi,
>
> When defining a page flow, it seems that at most one action pipeline
> is executed (as only the first action with a when-condition yielding
> "true" is used). Is this correct?
Yes.
>
> What I want to achieve, is to be able to specify a multi-step page
> selection. For example, after a user has submitted a form (page1),
> requesting to add an item to a shopping cart, these are the steps:
>
> - User input is validated. If invalid, show page1 again.
>
> - User input is processed (step1). If the item added is not
> on stock, page2 ("not on stock - proceed or not?") is shown.
>
> - User input is processed (step2). The item is on stock and a
> confirmation is given to the user (page3).
>
> I could give more complex examples, with even more choices, but
> the above example shows the principle.
OK, I I think maybe a more complex example is needed
to demonstrate the problem you see. That is for this example it
seems the pbm is really that you have extra pages. i.e. The user
should remain on the order page until the order is confirmed or
canceled. The view of this single page takes care of reporting
invalid data, out of stock issues, and querying for confirmation.
So, I think the following works for the above case :
o instance should have following field in addition to info on order
item. ( Actually out of stock could be part of info on order item )
valid boolean
out-of-stock boolean
out-of-stock-ok boolean
status unconfirmed,confirmed,canceled
o View would process these flags as so -
valid = false
xforms alerts etc tell user what's wrong
submit and cancel buttons presented
valid = true, out of stock = true, out of stock ok = false
warning presented
proceed anyway and cancel buttons presented
valid = true, out of stock = false
valid = true, out of stock = true, out of stock ok = true
confirm and cancel buttons presented
The page def would be something like
<page path-info='/order' xforms='order.xml' model='order.xpl'
view='order.xsl' >
<action when='/order/status == "canceled"' >
<result page='shop' />
</action>
<action when='/order/status == "confirmed"'
action='add-to-cart.xpl' >
<result page='shop' />
</action>
<page>
As you see until the order is confirmed or canceled they remain on the
same
page. If the order is confirmed add-to-cart.xpl adds the order to the
cart.
-- Regards, Dan S
-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
_______________________________________________
orbeon-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/orbeon-user