Hi,
We have Orbeon PE with 2 environments(intranet and internet), and we have two properties to difference them: *<property as="xs:string" name="intranet" value="http://localhost:8181/o/service/services/intranet"/> <property as="xs:string" name="internet" value="http://localhost:8181/o/service/services/internet"/>* The thing is that we want to hide always the button save-draft when we are in the environment intranet. But in the internet it´s going to appear always. It´s possible to do some way, hide only the button 'save-draft' in the intranet environment? And if is so, how will be the way to do it? We try using this property, to be visible only in the internet: *<property as="xs:string" name="oxf.fr.detail.button.save-draft.visible.*.*"> uri= xxf:property('internet') </property>. * But we don´t find the way to do it. Thank you so much, Iñigo. -- 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]. |
Administrator
|
Hi Iñigo,
You're correct to say that you'll want to use the `oxf.fr.detail.button.save-draft.visible.*.*` property. However, the XPath should go either as text between the opening and closing `property` tags, or as the value of the `value` attribute (in your message you used the `uri` attribute, which I assume is a typo). You're saying that you have those 2 properties, `intranet` and `internet`. But what differentiated the 2 environments? Do you have only 1 property defined in each environment? If so, and if you want the button to only be visible in the "Internet environment", you'd write something like: <property name="oxf.fr.detail.button.save-draft.visible.*.*"> xxf:property('internet') != '' </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 |
Hi Alessandro,
This hasn´t worked for me. The objective is to take the URL of the web browser and compare it with the value of the Internet property, so that it is visible only in the Internet environment. Is there no XPATH Formula or Form Runner function to take the value of the URL to compare it with the property? Thank you, Iñigo -- 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]. |
Administrator
|
Hi Iñigo,
I see; we've just implemented in the XForms engine functions to deal with the current URL based on the recent work done by the XForms working group. You can see the functions that are implemented in the section linked below, and I think the one you're looking for is `xf:uri-host(xf:location-uri())`. So this will be coming in Orbeon Forms 2019.1. https://github.com/orbeon/orbeon-forms/issues/1771#issuecomment-466486805 ‑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 |
Free forum by Nabble | Edit this page |