Use association.ftl in customization (not selectable)

Showing results for 
Search instead for 
Did you mean: 
Member II

Use association.ftl in customization (not selectable)

I just wont point repository file (like browse file in windows). For this porpues I have used association.ftl 

in Share my_module.xml

        <show id="selectedFile"/>
        <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>

In Alfresco 

.... extends ActionExecuterAbstractBase {
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? 


1 Reply

Re: Use association.ftl in customization (not selectable)

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.