AnsweredAssumed Answered

Alfresco Share ricerca su custom aspect

Question asked by amatellini on Jan 12, 2012
Latest reply on Oct 24, 2013 by fabiocilento
Ciao a tutti,

sto provando a fare delle ricerche da Alfresco Share su dei custom aspect che ho sviluppato.
Nonostante riesca a visualizzare nella ricerca avanzata i campi dell'aspetto, gli stessi non
vengono presi in considerazione dalla ricerca.

Premetto che usando alfresco Explorer la ricerca avanzata mi funziona.

Questo è il mio file share-config-custom.xml. L'aspetto su cui mi interessa fare le ricerche è ge:data.
Potete dirmi dove sbaglio? Grazie!


<alfresco-config>
   <!– NOTA: i testi dei label e delle form in genere vengono recuperati dal file geModel.properties –>

   <!– Abilito il debug di Javascript. Nota: usare solo in fase di sviluppo –>
   <config replace="true">
      <flags>
         <!–
         Developer debugging setting to turn on DEBUG mode for client scripts in the browser
         –>
         <client-debug>true</client-debug>
         <!–
         LOGGING can always be toggled at runtime when in DEBUG mode (Ctrl, Ctrl, Shift, Shift).
         This flag automatically activates logging on page load.
         –>
         <client-debug-autologging>false</client-debug-autologging>
      </flags>
      
      <aspects>
         <!– Aspects that a user can see –>
         <visible>
            <aspect name="ge:data" />
         </visible>
         
         <!– Aspects that a user can add. Same as "visible" if left empty –>
         <addable>
         </addable>
         
         <!– Aspects that a user can remove. Same as "visible" if left empty –>
         <removeable>
         </removeable>
      </aspects>
   </config>
   
   <!– Personalizzazione della Ricerca avanzata –>
   <!– Questa sezione sovrascrivere il default di Alfresco con replace="true" –>
   <!– Vengono inseriti due tipi di ricerca: su cartella e su contenuto. –>
   <!– La ricerca su contenuto &egrave personalizzata per includere anche l'aspetto ge:data–>
   <config replace="true" evaluator="string-compare" condition="AdvancedSearch">
      <advanced-search>
         <content-types>
         </content-types>
         <!–custom-properties>
            <meta-data aspect="ge:data" property="ge:created" />  
            <meta-data aspect="ge:data" property="ge:origin" /> 
            <meta-data aspect="ge:data" property="ge:class" />  
            <meta-data aspect="ge:data" property="ge:coveredarea" />             
         </custom-properties–>
         <!– Forms for the advanced search type list –>
         <forms>
            <form labelId="search.form.label.cm_content" descriptionId="search.form.desc.cm_content">cm:content</form>
            <!–form labelId="search.form.label.cm_folder" descriptionId="search.form.desc.cm_folder">cm:folder</form–>           
         </forms>
      </advanced-search>
   </config>
   
   <!– Visualizzazione della form associata all'aspetto ge:data–>
   <config evaluator="aspect" condition="ge:data">
       <forms>
          <form>
              <field-visibility>
                   <show id="ge:created" />
                   <show id="ge:origin" />
               <show id="ge:class" />
                   <show id="ge:coveredarea" />
              </field-visibility>
              <appearance>                
                 <field id="ge:created" label-id="prop.ge_created" />
                 <field id="ge:origin" label-id="prop.ge_origin" />
               <field id="ge:class" label-id="prop.ge_class" />
                 <field id="ge:coveredarea" label-id="prop.ge_coveredarea" />
               </appearance>
          </form>
      </forms>
   </config>
  
   <!– Personalizzazione della form di ricerca avanzata per il contenuto cm:content –>
   <config evaluator="model-type" condition="cm:content">
      <forms>
         <!– Search form –>
         <form id="search">
            <!– Lista dei campi da visualizzare nella form –>
            <field-visibility>
               <show id="cm:name" />
               <show id="cm:title" force="true" />
               <show id="cm:description" force="true" />
               <show id="mimetype" />
               <show id="cm:modified" />
               <show id="cm:modifier" />
               <!– ge:data–>
               <show id="ge:created" />
               <show id="ge:origin" />
               <show id="ge:class" />
               <show id="ge:coveredarea" />
            </field-visibility>
            
            <!– Specifica in che modo visualizzare i campi configurati in field-visibility –>
            <appearance>
               <field id="mimetype">
                  <control template="/org/alfresco/components/form/controls/mimetype.ftl" />
               </field>
               <field id="cm:modifier">
                  <control>
                     <control-param name="forceEditable">true</control-param>
                  </control>
               </field>
               <field id="cm:modified">
                  <control template="/org/alfresco/components/form/controls/daterange.ftl" />
               </field>
               <!– ge:data–>
               <field id="ge:created" label-id="prop.ge_created">
                  <control template="/org/alfresco/components/form/controls/daterange.ftl" />
               </field>
               <field id="ge:origin" label-id="prop.ge_origin">
                  <control template="/org/alfresco/components/form/controls/textfield.ftl" />
               </field>
               <!– Visualizzo una combo popolata da dati predefiniti –>
               <field id="ge:class" label-id="prop.ge_class">
                  <control template="/org/alfresco/components/form/controls/selectone.ftl">
                     <control-param name="options">,Hazard,Vulnerability,Law and regulations,Administrative</control-param>
                  </control>
               </field>              
               <field id="ge:coveredarea" label-id="prop.ge_coveredarea">
                  <control template="/org/alfresco/components/form/controls/textfield.ftl" />
               </field>
            </appearance>
         </form>
      </forms>
   </config>
</alfresco-config>

Outcomes