cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to view custom content under companyHome in Webclient

amit_wmw
Champ in-the-making
Champ in-the-making
Hello,

I have created a custom content type Scmodel.xml (C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\classes\alfresco\extension)as below:

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



<!– Optional meta-data about the model –>
<description>Someco Model</description>
<author>Optaros</author>
<version>1.0</version>

<imports>
     
     <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" />
<import uri="http://www.alfresco.org/model/system/1.0" prefix="sys"/>
</imports>


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

</namespaces>


<types>
<type name="sc:scobject">
         <title>Object</title>
         <parent>sys:base</parent>
      
       
      </type>
     
      <!– Enterprise-wide generic document type –>
   <type name="sc:doc">
      <title>Folder</title>
         <parent>sc:scobject</parent>
         <archive>true</archive>

       <properties>
                 
            <property name="sc:description">
               <type>d:text</type>
            </property>
        

      
            <property name="sc:title">
               <type>d:text</type>
            </property>
         </properties>

         <associations>
            <child-association name="sc:contains">
               <source>
                  <mandatory>false</mandatory>
                  <many>true</many>
               </source>
               <target>
                  <class>sys:base</class>
                  <mandatory>false</mandatory>
                  <many>true</many>
               </target>
               <duplicate>false</duplicate>
            </child-association>
         </associations>
      
        
   </type>
</types>

</model>

And then I have configure Scmodel.xml(my custom content model)  in web-client-config-custom.xml(location: C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\classes\alfresco\extension) as below; to view my content nodes in Alfresco web client.

<alfresco-config>

   <!– The config below shows how to incorporate the example model–>
   <!– into the web client, for this to work you will need to –>
   <!– rename example-model-context.xml.sample to example-model-context.xml –>
 
 
<config evaluator="string-compare" condition="Content Wizards">
      <content-types>
         <type name="sc:doc" />
      </content-types>
   </config>
   <config evaluator="node-type" condition="sc:doc">
      <property-sheet>
      <show-property name="mimetype" display-label-id="content_type"
                        component-generator="MimeTypeSelectorGenerator" />
         <show-property name="size" display-label-id="size"
                        converter="org.alfresco.faces.ByteSizeConverter"
                        show-in-edit-mode="false" />
         <show-property name="sc:description" />
         <show-property name="sc:title" />
         <show-child-association name="sc:contains" />
      </property-sheet>
   </config>

  
</alfresco-config>

But I am still unable to view my custom content under company home in the web client. Please suggest, what else modifications are required.

Thanks
Amit.
4 REPLIES 4

jayjayecl
Confirmed Champ
Confirmed Champ
My guess is that you did not edit the ####-model-context.xml, so that your file is not read at bootstrap.

To be sure, make some XML mystake in your scModel.xml, start Alfresco and see if any error is raised.
If not, that means that your model was not registered at bootstrap

pleas see file example-model-context.xml.sample

amit_wmw
Champ in-the-making
Champ in-the-making
Hi,

Thanks for the reply.

Well, I made sure that my custom model is registered at bootstrap. Below is how I did it and have placed it in alfresco/extension:

<?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/scModel.xml</value>
            
            </list>
        </property>
    </bean>
</beans>

And I can even create nodes using my custom content model without any exception (while executing my jcr code) and retriving those nodes programatically. But those created nodes are not at all visible in Alfresco web client! I am not sure whether I did some configuration mistake or do I need to modify some more configuration/s somewhere? If you can please suggest, will be very kind.

Many thanks
Amit.

ut_jorgeluna
Champ in-the-making
Champ in-the-making
did you find a way around this?  I am also faced with the same issue currently.

nikes
Champ on-the-rise
Champ on-the-rise
Hi Amit,

I faced the same issue.

Alfresco Explorer by default displays FOLDER, CONTENT and PERSON types.

In your case if you search your created nodes using Node Browser you will find those nodes, but to display in
advanced search or within companyHome or elsewhere refer below link.

http://forums.alfresco.com/en/viewtopic.php?f=5&t=19401

Thanks,
Nikesh
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.