selectone.ftl no available options in alfresco 5

cancel
Showing results for 
Search instead for 
Did you mean: 
4535992
Senior Member

selectone.ftl no available options in alfresco 5

Jump to solution

In relation to a old question https://community.alfresco.com/thread/211781-selectoneftl-no-available-options i have a surf extensions with the configs tag, now i want to build my form:

<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">PADES,CADES,DETACHED</control-param>
 </field>

....................

                            </appearance>
                        </form>
                    </forms>
                </config> 

this return the message "no options are aviable" when i "popup" the form.

I dont't want to build a model with a type and set a constraint for make it work, like suggested on the old topic, there is a more easy solution like customize the selectone.ftl for avoid this issue? if is a issue and not a bad configuration by me.

1 Solution

Accepted Solutions
douglascrp
Advanced II

Re: selectone.ftl no available options in alfresco 5

Jump to solution

Hello.

The XML you are using is invalid, and that is why it is not working.

You should not be closing the <control> tag before adding the <control-param> one

Thy this one instead

<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">PADES,CADES,DETACHED</control-param>
   </control>
</field>

View solution in original post

2 Replies
4535992
Senior Member

Re: selectone.ftl no available options in alfresco 5

Jump to solution

UPDATE: The problem is in the selectone.ftl template the control field.control.params.options?? && field.control.params.options != "" fail so it's just show me the else alternative but in theory i set the control-param-options like in the official documentation , this is all standard code of alfresco, it's must not fail and i don't understand where is the error.

douglascrp
Advanced II

Re: selectone.ftl no available options in alfresco 5

Jump to solution

Hello.

The XML you are using is invalid, and that is why it is not working.

You should not be closing the <control> tag before adding the <control-param> one

Thy this one instead

<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">PADES,CADES,DETACHED</control-param>
   </control>
</field>