cancel
Showing results for 
Search instead for 
Did you mean: 

selectone.ftl no available options in alfresco 5

4535992
Star Collaborator
Star Collaborator

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 ACCEPTED ANSWER

douglascrp
World-Class Innovator
World-Class Innovator

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 answer in original post

2 REPLIES 2

4535992
Star Collaborator
Star Collaborator

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
World-Class Innovator
World-Class Innovator

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>