AnsweredAssumed Answered

add event to component

Question asked by tavvolley on Sep 12, 2013

into the share-config file (ric-share-config.xml) there is a code to a form that allow to insert an invoice.

I must add an event on a combobox. The combobox has only two value. When user select the first value into the form must disactivate a checkbox.

I post partial code of ric-share-config.xml page:

<create-form template="../data-lists/forms/dataitem.ftl" />


               <set id="generic" label="Imposta Registro" appearance="panel" />

               <set id="fattura" label="Imposta Fattura" appearance="panel" />

               <set id="marca" label="Impostazioni Marca" appearance="panel" />

               <set id="answer" label="Rispndi" appearance="panel" />

               <field id="cm:name" label="Tipo Fattura" set="generic" />

               <field id="fat:accountFatt" set="generic" />

               <field id="fat:accountUsername" set="generic" />

               <field id="fat:accountPassword" set="generic" >


                     <control-param name="password">true</control-param>



               <field id="fat:tipoFattura" set="fattura" >

         <control template="/org/alfresco/components/form/controls/selectone.ftl">

         <control-param name="options">acc|Accredito,add|Addebito</control-param>



               <field id="fat:partitaIva" set="fattura" />

               <field id="fat:regioneSociale" help-id="" set="fattura" />

               <field id="fat:descrizioneRegioneSociale" help-id="" set="fattura" />

               <field id="fat:descrizioneDaFatturare" label-id="fat.form.daFatt.label" set="fattura" />

               <field id="fat:descrizioneAcconto" label-id="fat.form.acconto.label" set="fattura" />

               <field id="fat:accountInbox" set="fattura">

                  <control template="/org/alfresco/components/form/controls/association.ftl">

                     <control-param name="startLocation">{doclib}</control-param>



               <field id="fat:accountFattAttibs" set="marca" />

               <field id="fat:accountFattEmessa" set="marca" help-id="" />

               <field id="fat:accountAnswerText" set="marca">

                  <control template="/org/alfresco/components/form/controls/richtext.ftl">

                     <control-param name="editorAppearance">custom</control-param>

                     <control-param name="editorParameters">

                        theme_advanced_resizing: true,

                        theme_advanced_buttons1: "bold,italic,separator,bullist,numlist,separator,forecolor,backcolor",

                        theme_advanced_buttons2: null,

                        theme_advanced_buttons3: null






the combobox is the field with  id fat:tipoFattura . When "Accredito" is selected in the combo box i want to  disactivate a checkbox. How can do it? I must create a custom template content javascript for the combobox?
where I can define onChange event of combobox? thanks