How to use property file (e.g. properties-local.xml) to get the value.

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

How to use property file (e.g. properties-local.xml) to get the value.

akmishra
Is there a way to read the value of customs variable from the property file.

In submission tag, I want to get the value from property file for the
resource attribute.

<xf:submission resource=".." />

So it could be easily manage in case of environment change.

Thanks,
AK




--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Reply | Threaded
Open this post in threaded view
|

Re: How to use property file (e.g. properties-local.xml) to get the value.

Alessandro  Vernet
Administrator
Hi AK,

You can use something like this:
<xf:submission resource="{xxf:property('your.property')}/a/b"/>

Note the `{…}` syntax, called "XPath Value Template", which allows you to
make the value of an attribute dynamic, using XPath. And we're using the
`xxf:property()` function to refer to the value of a property (see link
below).

https://doc.orbeon.com/xforms/xpath/extension-functions/extension-core#xxf-property

You'll let me know if this works for you,

-Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: How to use property file (e.g. properties-local.xml) to get the value.

Alessandro  Vernet
Administrator
Hi AK, did you get a chance to try using `xxf:property()` and an in XPath
Value Template? If so, did it work for you? -Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: How to use property file (e.g. properties-local.xml) to get the value.

akmishra
Yes, it is worked - thanks



--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Reply | Threaded
Open this post in threaded view
|

Re: How to use property file (e.g. properties-local.xml) to get the value.

Alessandro  Vernet
Administrator
Excellent AK, I'm glad that `xxf:property()` in the properties worked, and
thank you for the update. -Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet