嗨,我已经写了一个软件alfresco的春天冲浪形式扩展,在具体的下拉列表中,我想把值的动态读取值从alfresco
或属性文件在这里myaction-share-amp-actions-extension-modules
:如何安装春天冲浪形式Alfresco与属性文件中的动态变量共享
<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
有办法做到这些吗?
UPDATE:
现在我会尽量写在纸上的这个环节上完整的解决方案: https://community.alfresco.com/thread/233246-how-setup-spring-surf-form-with-dinamic-variables-from-a-properties-file
在这里,你可以找到类似这样的情况下,另外一个例子:https://community.alfresco.com/thread/209460-dynamic-selectone-in-alfresco-share
是的,我已经试过了,但我可以检索.ftl文件中的属性文件?我的意思是我没有找到一个工作的JavaScript代码来检索从我的template.ftl文件属性,如果你能告诉我一个例子,可以是完美的解决方案。 – 4535992