AnsweredAssumed Answered

Configering the aspect property in advance search

Question asked by srik on Feb 3, 2014
Latest reply on Feb 3, 2014 by jpotts
Hi team,

I am stuck up with displaying of the aspect property in advance search .I am using alfresco enterprise 4.

I am to display the field in drop down but when I click on that the text field doesn't appear in the adv searh screen.

so far my code.

share custom config.

<config evaluator="string-compare" condition="AdvancedSearch">
      <advanced-search>
         <!– Forms for the advanced search type list –>
         <forms>
         <form labelId="Record ID" descriptionId="produst">cm:content</form>
         </forms>
      </advanced-search>
   </config>
  
   <!– cm:content type (existing nodes) –>
   <config  evaluator="node-type" condition="cm:content">
      <forms>
         <!– Default form configuration used on the document details and edit metadata pages –>
      <form id="doclib-simple-metadata">
            <field-visibility>
               <show id="kb:documentRef" force="true" />
            </field-visibility>
         




         <!– Document Library pop-up Edit Metadata form –>
       
          <appearance>
               <field id="kb:documentRef" label="Record ID" >
      <control template="/org/alfresco/components/form/controls/space.ftl" />
      </field>
            </appearance>
         
           
       
</form>
        
      </forms>
   </config>
</alfresco-config>



kb-model.file.

<?xml version="1.0" encoding="UTF-8"?>

<!– Definition of Knowledge Base Model –>

<model name="kb:knowledgebase" xmlns="http://www.alfresco.org/model/dictionary/1.0">

   <!– Optional meta-data about the model –>
   <description>Knowledge Base Model</description>
   <author>Will Abson</author>
   <version>1.0</version>

   <!– Imports are required to allow references to definitions in other models –>
   <imports>
      <!– Import Alfresco Dictionary Definitions –>
      <import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d"/>
      <!– Import Alfresco Content Domain Model Definitions –>
      <import uri="http://www.alfresco.org/model/content/1.0" prefix="cm"/>
   </imports>

   <!– Introduction of new namespaces defined by this model –>
   <namespaces>
      <namespace uri="http://www.alfresco.com/model/knowledgebase/1.0" prefix="kb"/>
   </namespaces>

    <aspects>
      <!– Definition of new Content Aspect: Knowledge Base Document –>
      <aspect name="kb:referencable">
         <title>Knowledge Base Referencable</title>
         <properties>
            <property name="kb:documentRef">
               <type>d:text</type>
            </property>
         </properties>
      </aspect>
   </aspects>

</model>



kb-model-context.file



<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>

<beans>

    <!– Registration of new models –>
    <bean id="extension.kb.dictionaryBootstrap" parent="dictionaryModelBootstrap" depends-on="dictionaryBootstrap">
        <property name="models">
            <list>
                <value>alfresco/extension/kb-model.xml</value>
            </list>
        </property>
    </bean>

     <bean id="extension.kb.resourceBundle" class="org.alfresco.i18n.ResourceBundleBootstrapComponent">
       <property name="resourceBundles">
          <list>
             <value>alfresco.messages.knowledgebase</value>
          </list>
       </property>
    </bean>

</beans>


A complete working example to start up is also appreciated.


Thanks
Srikanth S

Outcomes