AnsweredAssumed Answered

Custom aspetcs

Question asked by fstnboy on Aug 7, 2008
Latest reply on Oct 16, 2008 by fstnboy
Hi guys!

i have come up against a new problem…. I´ve got a .xml file for custom aspects/model, everything is ok. But there is a thing that i need and i don´t know how to do it.

I have a property representing a "combo box" and then some other properties as long as telephone, fax, email, …. What i need is that certain properties to be mandatory only if the selected value in combo is 'Procurador' or 'Abogado'

What I have in libertyAJDmodel.xml



<constraint name="ajd:profesionales" type="LIST">
         <parameter name="allowedValues">
            <list>
               <value>Abogado</value>
               <value>Procurador</value>
               <value>Perito</value>
               <value>Otros</value>
            </list>
         </parameter>
</constraint>
      
<constraint name="ajd:especialds" type="LIST">
         <parameter name="allowedValues">
            <list>
               <value>-</value>
            </list>
         </parameter>
</constraint>

<type name="ajd:espaciocontactos">
         <title>Espacio para expedientes de contactos</title>
         <parent>ajd:eticos</parent>
         <properties>
            <property name="ajd:tipoprof_6">
               <type>d:text</type>
               <mandatory enforced="true">true</mandatory>
               <multiple>false</multiple>
                    <default>Abogado</default>
                    <index enabled="true">
                  <tokenised>true</tokenised>
               </index>
                    <constraints>
                       <constraint ref="ajd:profesionales"/>
               </constraints>
                  </property>
                  <property name="ajd:espe_6">
               <type>d:text</type>
               <mandatory enforced="true">true</mandatory><!– only mandatory when ajd:tipoprof_6 is 'abogado' or 'procurador' –>
               <multiple>false</multiple>
                    <default>-</default>
                    <index enabled="true">
                  <tokenised>true</tokenised>
               </index>
                    <constraints>
                       <constraint ref="ajd:especialds"/>
               </constraints>
                  </property>
                  <property name="ajd:reparto_6">
               <type>d:text</type>
               <mandatory enforced="true">true</mandatory>
               <default></default>
                    <index enabled="true">
                  <tokenised>true</tokenised>
               </index>
                  </property>
                  <property name="ajd:partjud_6">
               <type>d:text</type>
               <mandatory enforced="true">true</mandatory><!– only mandatory when ajd:tipoprof_6 is 'abogado' or 'procurador' –>
                    <default></default>
                    <index enabled="true">
                  <tokenised>true</tokenised>
               </index>
                  </property>
                  
                  <property name="ajd:direcc_6">
               <type>d:text</type>
               <mandatory enforced="true">true</mandatory>
               <default></default>
                    <index enabled="true">
                  <tokenised>true</tokenised>
               </index>
                  </property>
                  <property name="ajd:telf_6">
               <type>d:text</type>
               <mandatory enforced="true">true</mandatory>
               <default></default>
                    <index enabled="true">
                  <tokenised>true</tokenised>
               </index>
                  </property>
                  <property name="ajd:movil_6">
               <type>d:text</type>
               <mandatory enforced="true">true</mandatory>
               <default></default>
                    <index enabled="true">
                  <tokenised>true</tokenised>
               </index>
                  </property>
                  <property name="ajd:fax_6">
               <type>d:text</type>
               <mandatory enforced="true">true</mandatory>
               <default></default>
                    <index enabled="true">
                  <tokenised>true</tokenised>
               </index>
                  </property>
                  <property name="ajd:mail_6">
               <type>d:text</type>
               <mandatory enforced="true">true</mandatory>
               <default></default>
                    <index enabled="true">
                  <tokenised>true</tokenised>
               </index>
                  </property>
                  <property name="ajd:nifcif_6">
               <type>d:text</type>
               <mandatory enforced="true">true</mandatory>
               <default></default>
                    <index enabled="true">
                  <tokenised>true</tokenised>
               </index>
                  </property>
                  <property name="ajd:observs_6">
               <type>d:text</type>
               <mandatory enforced="true">true</mandatory>
               <default></default>
                    <index enabled="true">
                  <tokenised>true</tokenised>
               </index>
                  </property>
               </properties>

         <mandatory-aspects>
           <aspect>ajd:contenedorajd</aspect>
         </mandatory-aspects>            
</type>

Outcomes