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!
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.
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.