cancel
Showing results for 
Search instead for 
Did you mean: 

Search for metadata that came from ephesoft in adv. search

future_healthca
Champ in-the-making
Champ in-the-making
Hi everyone,


I am trying to search, in advanced search, for metadata that came from ephesoft (example, city)

I am editing the file: share-form-config.xml like the following:

<config evaluator="model-type" condition="cm:content">
….
    <form id="search">
            <field-visibility>
       <show id="cm:title" force="true" />
               <show id="cm:name" />
            <show id="app:city" />
            <show id="cmis:city" />
            <show id="ephesoft:city" />
            <show id="cm:description" force="true" />
               <show id="mimetype" />
            <show id="cm:name" />
               <show id="cm:modified" />
               <show id="cm:modifier" />
         <show id="ephesoft:city" />   
               
            </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>
      <field id="ephesoft:city" label="City1" description="City" />     
                
                           
            </appearance>


But the form field for the city doesnt even apear in advanced search….

Can somebody help me on this matter?

I am new to alfresco so perharps maybe this is basic i dunno Smiley Happy.
4 REPLIES 4

andy
Champ on-the-rise
Champ on-the-rise

future_healthca
Champ in-the-making
Champ in-the-making
Hi

Have you looked at http://wiki.alfresco.com/wiki/Share_Advanced_Search ?

Andy
Hello Andy,
Yes, i did.

I can add new form items to the advanced search.
My only problem is when i add the ephesoft items.

Maybe the item id cant be called as ephesoft:city .
I tried: cm:city , cmis:city , app:city but doesnt seem to work.

Basicly what happens is, he adds new fiels if from cm namespace but never adds the ephesoft:city field.

For sure i am lacking something (configurations maybe)

On the model that i created to interact with ephesoft i used the namespace "ephesoft:" (that came from cmis).
Alfresco is now able to correctly show the metadata the comes from ephesoft… my only problem is… i cant figure what i need to do search for it in advance search Smiley Frustrated.

Do u have any ideias?

zaizi
Champ in-the-making
Champ in-the-making
Hi,

Can you share your content model?

Ainga

future_healthca
Champ in-the-making
Champ in-the-making
Hi,

Can you share your content model?

Ainga

Hi zaizi

What xml files do u need to inspect ?

are these ones enough?

custom-model-context.xml

<?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.dictionaryBootstrap" parent="dictionaryModelBootstrap" depends-on="dictionaryBootstrap">
        <property name="models">
            <list>
                <value>alfresco/extension/ephesoftModel.xml</value>
            </list>
        </property>
    </bean>
         
</beans>

ephesoftModel.xml


?xml version="1.0" encoding="UTF-8"?>
<!– Custom Model –>
<!– Note: This model is pre-configured to load at startup of the Repository.  So, all custom –>
<!–       types and aspects added here will automatically be registered –>

<model name="ephesoft:demomodel" xmlns="http://www.alfresco.org/model/dictionary/1.0">
<!– Optional meta-data about the model –>
<description>VLC</description>
<author>Tjarda Peelen - VLC</author>
<version>0.1</version>

<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 –>
<!– NOTE: The following namespace custom.model should be changed to reflect your own namespace –>   <namespaces>      <namespace uri="com.ephesoft.demo" prefix="ephesoft"/>   </namespaces>
  <constraints />
  <types>
      <type name="ephesoft:document">
         <title>ephesoft_scan</title>
         <parent>cm:content</parent>
         <properties>
      <property name="ephesoft:state">
        <title>State</title>
             <type>d:text</type>
          </property>
          <property name="ephesoft:city">
        <title>City</title>
            <type>d:text</type>
         </property>
       <property name="ephesoft:nome">
        <title>Nome</title>
            <type>d:text</type>
         </property>
      </properties>
    </type>
  </types>
</model>