Hello all,
I am searching for a simple way to access a global property (defined in 'properties-form-runner.xml' for example) inside an XPL file but I tried all sorts of approaches with no success. In a nutshell, I want to define a URL for a REST service in the properties file and then use it inside xforms:submission@action in my xpl and xform pages instead of hardcoding it everywhere. I am sure there is a simple way to do that. For example, the property 'oxf.fr.persistence.service.exist.uri' is used below but this does not work as expected. If I put a constant (string) for the value of the @action attribute, things work fine. Are XPath functions supported at all in the xforms:submission@action attribute ? If so, is there anything special I need to do to get it to work? <p:processor name="oxf:xforms-submission"> <p:input name="submission"> <xforms:submission method="get" xxforms:username="guest" xxforms:password="guest" action="concat(p:property('oxf.fr.persistence.service.exist.uri'), '/foo.xml')"/> </p:input> <p:input name="request"> <parameters/> </p:input> <p:output name="response" ref="data"/> -- 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 |
Administrator
|
Laurent,
On Mon, Apr 13, 2009 at 6:54 AM, Laurent Gauthier <[hidden email]> wrote: > For example, the property 'oxf.fr.persistence.service.exist.uri' is used > below but this does not work as expected. If I put a constant (string) for > the value of the @action attribute, things work fine. Are XPath functions > supported at all in the xforms:submission@action attribute ? If so, is there > anything special I need to do to get it to work? > > <p:processor name="oxf:xforms-submission"> > <p:input name="submission"> > <xforms:submission method="get" > xxforms:username="guest" xxforms:password="guest" > > action="concat(p:property('oxf.fr.persistence.service.exist.uri'), > '/foo.xml')"/> that this is an XPath expression. You might also want to use the attribute name resource=... instead of action=... (action has be deprecated in favor of resource in XForms 1.1). So your code should read: resource="{concat(p:property('oxf.fr.persistence.service.exist.uri'), '/foo.xml')}" Alex -- Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise Orbeon's Blog: http://www.orbeon.com/blog/ Personal Blog: http://avernet.blogspot.com/ Twitter - http://twitter.com/avernet -- 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 |