嗨,我已经为软件alfresco编写了一个 spring surf 表单扩展,在特定的下拉列表中,我想以动态方式将值放在从alfresco
此处读取值或属性文件的位置myaction-share-amp-actions-extension-modules
:
<extension>
.................................................................
<config evaluator="string-compare" condition="signed">
<forms>
<form>
<field-visibility>
............................................
<show id="my_form_sign_firma.tipo"/>
...................................
</field-visibility>
<appearance>
.....................
<field id="my_form_sign_firma.tipo" label-id="property.form.sign.my_form_sign_firma.tipo">
<control template="/org/alfresco/components/form/controls/selectone.ftl">
<control-param name="options">${value1},${value2},${value3}</control-param>
</control>
</field>
....................
或替代
....................
<field id="my_form_sign_firma.tipo" label-id="property.form.sign.my_form_sign_firma.tipo">
<control-param name="options">${valueX}</control-param>
<!-- where valueX= "value1,value2,value3" -->
</control>
</field>
....................
</appearance>
</form>
</forms>
</config>
...........................................
</extension>
并且在文件上设置了用于加载属性的 bean share-config.xml
:
<bean id="configurazioniBeanCompletoLocale" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations">
<list>
<value>classpath*:it/test/properties/myalfresco.properties</value>
</list>
</property>
<property name="ignoreResourceNotFound" value="true" />
<property name="ignoreUnresolvablePlaceholders" value="true" />
<property name="systemPropertiesModeName" value="SYSTEM_PROPERTIES_MODE_OVERRIDE" />
<property name="propertiesPersister">
<bean class="org.alfresco.config.AlfrescoPropertiesPersister" />
</property>
</bean>
并且在文件上设置了属性share-config.xml
文件:
classpath*:it/test/properties/myalfresco.properties
该文件myalfresco.properties
包含:
value1=hello
value2=hi
value3=goodbye
valueX=hello,hi,goodbye
或者,如果有人知道该怎么做,我可以接受在露天使用特定文件的属性,例如:
Repository/Data Dictionary/configuration.txt
具有方面“配置器”的属性,具有以下属性:
value1=hello
value2=hi
value3=goodbye
valueX=hello,hi,goodbye
有办法做到这些吗?
更新:
我现在将尝试在此链接上写一个完整的解决方案: https ://community.alfresco.com/thread/233246-how-setup-spring-surf-form-with-dinamic-variables-from-a-properties -文件
在这里您可以找到与此案例类似的另一个示例:https ://community.alfresco.com/thread/209460-dynamic-selectone-in-alfresco-share