On May 8, 2008, at 8:49 AM, Jim Logan wrote:
> Alessandro Vernet wrote:
>> Hi Jim,
>>
>> On Mon, May 5, 2008 at 4:26 PM, Jim Logan <
jim-l@...>
>> wrote:
>>
>>> For example, let's say I have a customer form that lists
>>> hyperlinks to
>>> outstanding customer orders. I'd like to be able to click on a
>>> customer
>>> order and go to an XForm to edit it. How can I formulate a
>>> hyperlink to load
>>> a particular order with an XForm?
>>>
>>
>> Let's say the path of the page to view an order is /order/view. You
>> first map that this path to the XHTML+XForms in the page flow (<page
>> path-info="/order/view" view="view-order.xhtml"/>). Then let's say
>> you
>> pass the order ID on the URL with ?order-id=123. In your XForms, on
>> xforms-model-construct-done, you load the instance for that ID. You
>> can access the ID in XPath with
>> xxforms:get-request-parameter('order-id'). You will typically load
>> the
>> order document with a submission that calls an XPL, or a call to some
>> other service. Does this help?
>>
>> Alex
>>
> Alex,
>
> Is it possible to use a RESTful URL that has the instance ID
> embedded in it, like "
http://modeldriven.org/orders/order/1234"? I
> don't see a way to get at the original URL.
>
> Thanks,
> -Jim
>
Hi Jim,
You can fashion a <page> element in page-flow.xml to use the
'matcher' attribute, and have
one xpl that handles all path-info="/orders/order(.*)" documents.
The matches are
available in the pipeline in a way similar to xforms model.
It's been a while since i used...you use <setvalue> to put the
captured results in
the instance input of your pipeline.
HTH,
Hank
>
> --
> You receive this message as a subscriber of the
ops-users@...
> mailing list.
> To unsubscribe: mailto:
ops-users-unsubscribe@...
> For general help: mailto:
sympa@...?subject=help
> OW2 mailing lists service home page:
http://www.ow2.org/wwsHank Ratzesberger
NEES@UCSB
Institute for Crustal Studies,
University of California, Santa Barbara
805-893-8042
--
You receive this message as a subscriber of the
ops-users@... mailing list.
To unsubscribe: mailto:
ops-users-unsubscribe@...
For general help: mailto:
sympa@...?subject=help
OW2 mailing lists service home page:
http://www.ow2.org/wws