01-27-2017 01:26 PM
I just wont point repository file (like browse file in windows). For this porpues I have used association.ftl
in Share my_module.xml
<form>
<field-visibility>
<show id="selectedFile"/>
</field-visibility>
<appearance>
<field id="selectedFile" label-id="Select Template">
<control template="/org/alfresco/components/form/controls/association.ftl">
<control-param name="startLocation">{parent}</control-param>
<control-param name="compactMode">true</control-param>
<control-param name="showTargetLink">true</control-param>
<control-param name="forceEditable">true</control-param>
</control>
</field>
</appearance>
</form>
In Alfresco
.... extends ActionExecuterAbstractBase {
@Override
protected void addParameterDefinitions(List<ParameterDefinition> list) {
list.add(new ParameterDefinitionImpl("selectedFile", DataTypeDefinition.ANY, false, getParamDisplayLabel(selectedFile)));
}
But for some reason I can browse File and Folders but cannt select one.
I wont get nodeRef of jast String with ID for selected object in my alfesco costomization backend.
Who knowe what is wrong? Why selection in association.tfl do not work?
Thanks!
03-02-2017 08:32 AM
Your parameter definition appears to be incorrect - you want a NodeRef, not just ANY so use the corresponding DataTypeDefinition. The form fields are very sensitive to the data types and may not work correctly if used in combination with the wrong ones.
Explore our Alfresco products with the links below. Use labels to filter content by product module.