我想构建几个自动完成组件来查询我的应用程序的用户可以轻松使用的外部服务。为此,我想在组件中定义相对服务路径,并且我希望绝对外部服务URL是可配置的。
我想在properties-local-prod.xml
中创建一个自定义配置值,类似于<property as="xs:string" name="oxf.custom.service-ur">http://localhost</property>
,然后在自动完成的资源字段中使用它,例如:
<fr:autocomplete
ref="county"
labelref="@label"
resource="{$config('oxf.fr.custom.service-url')}/counties?search={$fr-search-value}"
max-results-displayed="4">
Orbeon有可能这样吗?
我认为xxf:property()
function完全符合您的要求。