Cannot find input "data"
Is it possible to
use a request-parameter in an xforms:submission like this:
xforms page called
like this: http://localhost:8080/ops/valueeditor/edit?foo=bar
<xforms:submission
id="sample-data-submission"
serialize="false" method="get" action="<A href="http://localhost:8080/exist/{request-parameter('foo')}/db/testlimits/test.xml">http://localhost:8080/exist/{request-parameter('foo')}/db/testlimits/test.xml" replace="instance" instance="testspec-instance"/> Thanks in advance,
Teun
-- The information contained in this communication and any attachments is confidential and may be privileged, and is for the sole use of the intended recipient(s). Any unauthorized review, use, disclosure or distribution is prohibited. Unless explicitly stated otherwise in the body of this communication or the attachment thereto (if any), the information is provided on an AS-IS basis without any express or implied warranties or liabilities. To the extent you are relying on this information, you are doing so at your own risk. If you are not the intended recipient, please notify the sender immediately by replying to this message and destroy all copies of this message and any attachments. ASML is neither liable for the proper and complete transmission of the information contained in this communication, nor for any delay in its receipt. -- 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 |
Administrator
|
That would be nice, but we don't have such a function in Orbeon Forms
yet. For now this is a little more complicated. You can use a default-submission attribute with setvalue elements in the page flow to extract request information. See some doc here: http://www.orbeon.com/ops/doc/reference-page-flow#url-extraction Or you can use a page model that uses oxf:request to extract parameters, and then passes that data to the page view. In both cases, you need to initialize an XForms instance with the result, using the input:data or input:instance URIs. See some doc here: http://www.orbeon.com/ops/doc/reference-xforms-ng#xforms-instance-initialization -Erik Teun van Eijsden wrote: > Is it possible to use a request-parameter in an xforms:submission like this: > > xforms page called like this: > http://localhost:8080/ops/valueeditor/edit?foo=bar > > <xforms:submission id="sample-data-submission" > serialize="false" > method="get" > action="http://localhost:8080/exist/{request-parameter('foo')}/db/testlimits/test.xml" > replace="instance" > instance="testspec-instance"/> > > > Thanks in advance, Teun Orbeon Forms - Web Forms for the Enterprise Done the Right Way http://www.orbeon.com/ -- 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 |
In reply to this post by Teun van Eijsden
Teun,
If you want to access the parameters, one way is to have a model for your page that uses the request-processor to create an instance that you pass to your view page. In page-flow.xml <page id="test" path-info="/mypath" model="oxf:amodel.xpl" view="oxf: aview.xhtml"/> In model file: <p:input name="config"> <config> <include>/request/parameters</include> </config> </p:input> <p:output name="data" id="data"/> </p:processor> in the View file: <xforms:instance id="request-params" src="input:data"/> Hopefully, the code does not conflict with the default xforms submission, if you have one. --Hank UCSB On Sep 20, 2007, at 5:03 AM, Teun van Eijsden wrote:
Hank Ratzesberger NEES@UCSB Institute for Crustal Studies, University of California, Santa Barbara 805-893-8042 -- 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 |
Thanks for the elaborate response. However, if i follow
your steps literally, i get this error:
Error Message
Cannot find input "data" Then if i change <xforms:instance id="request-params" src="input:data"/> to <xforms:instance
id="request-params" src="input:instance"/>
there is no error but
<xforms:output ref="instance('request-params')"/> is
empty.
What
am i doing wrong?
Teun
From: Hank Ratzesberger [mailto:[hidden email]] Sent: Thursday, September 20, 2007 19:39 To: [hidden email] Subject: Re: [ops-users] using request parameter in xforms:submission If you want to access the parameters, one way is to have a model
for
your page that uses the request-processor to create an instance
that you pass to your view page.
In page-flow.xml
<page id="test" path-info="/mypath"
model="oxf:amodel.xpl"
view="oxf: aview.xhtml"/>
In model file:
<p:processor
name="oxf:request" xmlns:p="http://www.orbeon.com/oxf/pipeline">
<p:input
name="config">
<config>
<include>/request/parameters</include>
</config>
</p:input>
<p:output
name="data" id="data"/>
</p:processor>
in the View file:
<xforms:instance id="request-params" src="input:data"/>
Hopefully, the code does not conflict with the default xforms
submission,
if you have one.
--Hank
UCSB
On Sep 20, 2007, at 5:03 AM, Teun van Eijsden wrote:
Hank Ratzesberger
NEES@UCSB
Institute for Crustal Studies,
University of California, Santa Barbara
805-893-8042
-- The information contained in this communication and any attachments is confidential and may be privileged, and is for the sole use of the intended recipient(s). Any unauthorized review, use, disclosure or distribution is prohibited. Unless explicitly stated otherwise in the body of this communication or the attachment thereto (if any), the information is provided on an AS-IS basis without any express or implied warranties or liabilities. To the extent you are relying on this information, you are doing so at your own risk. If you are not the intended recipient, please notify the sender immediately by replying to this message and destroy all copies of this message and any attachments. ASML is neither liable for the proper and complete transmission of the information contained in this communication, nor for any delay in its receipt. -- 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 |
Teun,
I am not sure. Please post your model (xpl) file. My strategy is to to use the Request processor, but Erik suggested using the XForms submission (and more likely the best strategy). But before I can understand what is missing in your view, I need to see what your model is attempting. --Hank On Sep 21, 2007, at 7:14 AM, Teun van Eijsden wrote:
Hank Ratzesberger NEES@UCSB Institute for Crustal Studies, University of California, Santa Barbara 805-893-8042 -- 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 |
Here's my model.
<?xml
version="1.0" encoding="utf-8"?>
<p:config xmlns:p="http://www.orbeon.com/oxf/pipeline" xmlns:oxf="http://www.orbeon.com/oxf/processors"> <p:processor name="oxf:request" xmlns:p="http://www.orbeon.com/oxf/pipeline">
<p:input name="config"> <config> <include>/request/parameters</include> </config> </p:input> <p:output name="data" id="data"/> </p:processor> </p:config>
Does that help?
Teun
From: Hank Ratzesberger [mailto:[hidden email]] Sent: Friday, September 21, 2007 17:37 To: [hidden email] Subject: Re: [ops-users] using request parameter in xforms:submission I am not sure. Please post your model (xpl) file. My strategy
is to
to use the Request processor, but Erik suggested using
the
XForms submission (and more likely the best strategy).
But before I can understand what is missing in your view, I
need to see what your model is attempting.
--Hank
On Sep 21, 2007, at 7:14 AM, Teun van Eijsden wrote:
Hank Ratzesberger
NEES@UCSB
Institute for Crustal Studies,
University of California, Santa Barbara
805-893-8042
-- The information contained in this communication and any attachments is confidential and may be privileged, and is for the sole use of the intended recipient(s). Any unauthorized review, use, disclosure or distribution is prohibited. Unless explicitly stated otherwise in the body of this communication or the attachment thereto (if any), the information is provided on an AS-IS basis without any express or implied warranties or liabilities. To the extent you are relying on this information, you are doing so at your own risk. If you are not the intended recipient, please notify the sender immediately by replying to this message and destroy all copies of this message and any attachments. ASML is neither liable for the proper and complete transmission of the information contained in this communication, nor for any delay in its receipt. -- 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 OW2 mailing lists service home page: http://www.ow2.org/wws |
Oh wait it works.
For future reference:
in page-flow.xml
<page path-info="/valueeditor/edit"
default-submission="default-submission.xml"
view="oxf:view.xhtml">
<setvalue ref="/submission/first" parameter="first"/> <setvalue ref="/submission/count" parameter="count"/> </page> in
model.xpl
<p:processor name="oxf:request" xmlns:p="http://www.orbeon.com/oxf/pipeline">
<p:input name="config"> <config> <include>/request/parameters</include> </config> </p:input> <p:output name="data" id="data"/> </p:processor> in
default-submission.xml
<submission>
<testname>APMP</testname> <version>1.0</version> <level>ATP</level> <usagecontext>assy</usagecontext> </submission> in
view.xhtml
<xforms:instance id="request-params"
src="input:instance"/>
... <xforms:output
ref="instance('request-params')/testname"/>
Teun
From: Teun van Eijsden [mailto:[hidden email]] Sent: Friday, October 12, 2007 11:49 To: [hidden email] Subject: RE: [ops-users] using request parameter in xforms:submission Here's my model.
<?xml
version="1.0" encoding="utf-8"?>
<p:config xmlns:p="http://www.orbeon.com/oxf/pipeline" xmlns:oxf="http://www.orbeon.com/oxf/processors"> <p:processor name="oxf:request" xmlns:p="http://www.orbeon.com/oxf/pipeline">
<p:input name="config"> <config> <include>/request/parameters</include> </config> </p:input> <p:output name="data" id="data"/> </p:processor> </p:config>
Does that help?
Teun
From: Hank Ratzesberger [mailto:[hidden email]] Sent: Friday, September 21, 2007 17:37 To: [hidden email] Subject: Re: [ops-users] using request parameter in xforms:submission I am not sure. Please post your model (xpl) file. My strategy
is to
to use the Request processor, but Erik suggested using
the
XForms submission (and more likely the best strategy).
But before I can understand what is missing in your view, I
need to see what your model is attempting.
--Hank
On Sep 21, 2007, at 7:14 AM, Teun van Eijsden wrote:
Hank Ratzesberger
NEES@UCSB
Institute for Crustal Studies,
University of California, Santa Barbara
805-893-8042
-- The information contained in this communication and any attachments is confidential and may be privileged, and is for the sole use of the intended recipient(s). Any unauthorized review, use, disclosure or distribution is prohibited. Unless explicitly stated otherwise in the body of this communication or the attachment thereto (if any), the information is provided on an AS-IS basis without any express or implied warranties or liabilities. To the extent you are relying on this information, you are doing so at your own risk. If you are not the intended recipient, please notify the sender immediately by replying to this message and destroy all copies of this message and any attachments. ASML is neither liable for the proper and complete transmission of the information contained in this communication, nor for any delay in its receipt. -- The information contained in this communication and any attachments is confidential and may be privileged, and is for the sole use of the intended recipient(s). Any unauthorized review, use, disclosure or distribution is prohibited. Unless explicitly stated otherwise in the body of this communication or the attachment thereto (if any), the information is provided on an AS-IS basis without any express or implied warranties or liabilities. To the extent you are relying on this information, you are doing so at your own risk. If you are not the intended recipient, please notify the sender immediately by replying to this message and destroy all copies of this message and any attachments. ASML is neither liable for the proper and complete transmission of the information contained in this communication, nor for any delay in its receipt. -- 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 OW2 mailing lists service home page: http://www.ow2.org/wws |
Free forum by Nabble | Edit this page |