06-28-2007 08:45 AM
09-26-2007 12:16 PM
<!– add webable aspect properties to property sheet –>
<config evaluator="aspect-name" condition="sc:webable">
<property-sheet>
<show-property name="sc:published" display-label-id="published" />
<show-property name="sc:isActive" display-label-id="isActive" read-only="true" />
<show-association name="sc:relatedDocuments" />
</property-sheet>
</config>
<config evaluator="aspect-name" condition="sc:productRelated">
<property-sheet>
<show-property name="sc:product" display-label-id="product" />
<show-property name="sc:version" display-label-id="version" />
<show-association name="sc:relatedDocuments" />
</property-sheet>
</config>
<!– add someco types to add content list –>
<config evaluator="string-compare" condition="Content Wizards">
<content-types>
<type name="sc:doc" />
<type name="sc:whitepaper" />
</content-types>
</config>
<config evaluator="string-compare" condition="Action Wizards">
<!– The list of aspects to show in the add/remove features action –>
<!– and the has-aspect condition –>
<aspects>
<aspect name="sc:webable"/>
<aspect name="sc:productRelated"/>
</aspects>
<!– The list of types shown in the issubtype condition –>
<subtypes>
<type name="sc:doc" />
<type name="sc:whitepaper" />
</subtypes>
<!– The list of content and/or folder types shown in the specialise-type action –>
<specialise-types>
<type name="sc:doc" />
<type name="sc:whitepaper" />
</specialise-types>
</config>
<config evaluator="string-compare" condition="Advanced Search">
<advanced-search>
<content-types>
<type name="sc:doc" />
<type name="sc:whitepaper" />
</content-types>
<custom-properties>
<meta-data aspect="sc:webable" property="sc:published" display-label-id="published" />
<meta-data aspect="sc:webable" property="sc:isActive" display-label-id="isActive" />
<meta-data aspect="sc:productRelated" property="sc:product" display-label-id="product" />
<meta-data aspect="sc:productRelated" property="sc:version" display-label-id="version" />
</custom-properties>
</advanced-search>
</config>
Sinon dans le someco-model-context.xml, j'ai:<?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>
Et enfin dans mon scModel.xml:<?xml version="1.0" encoding="UTF-8"?>
<!– Definition of new Model –>
<model name="sc:somecomodel" xmlns="http://www.alfresco.org/model/dictionary/1.0">
<!– Optional metadata about the model –>
<description>Someco Model</description>
<author>Optaros</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.someco.com/model/content/1.0" prefix="sc" />
</namespaces>
<types>
<!– Enterprise-wide generic document type –>
<type name="sc:doc">
<title>Someco Document</title>
<parent>cm:content</parent>
<associations>
<association name="sc:relatedDocuments">
<title>Related Documents</title>
<source>
<mandatory>false</mandatory>
<many>true</many>
</source>
<target>
<class>sc:doc</class>
<mandatory>false</mandatory>
<many>true</many>
</target>
</association>
</associations>
<mandatory-aspects>
<aspect>cm:generalclassifiable</aspect>
</mandatory-aspects>
</type>
<type name="sc:whitepaper">
<title>Someco Whitepaper</title>
<parent>sc:doc</parent>
</type>
</types>
<aspects>
<aspect name="sc:webable">
<title>Someco Webable</title>
<properties>
<property name="sc:published">
<type>d:date</type>
</property>
<property name="sc:isActive">
<type>d:boolean</type>
<default>false</default>
</property>
</properties>
</aspect>
<aspect name="sc:productRelated">
<title>Someco Product Metadata</title>
<properties>
<property name="sc:product">
<type>d:text</type>
<mandatory>true</mandatory>
</property>
<property name="sc:version">
<type>d:text</type>
<mandatory>true</mandatory>
</property>
</properties>
</aspect>
</aspects>
</model>
Et puis aller, pour la forme, et pour grossir un peu + inutilement mon post, le webclient.properties #sc:webable
published=Published/Publié
isActive=Active?
#sc:productRelated
product=Product/Produit
version=Version
Alors alors, une ptite idée ? serait-ce simplement un problème de compatibilité avec la 2.1 ? Ou une virgule que j'aurai oublié ? 09-27-2007 09:22 AM
[…]
<type name="sc:doc">
<title>Someco Document</title>
<parent>cm:content</parent>
<associations>
<association name="sc:relatedDocuments">
<title>Related Documents</title>
<source>
<mandatory>false</mandatory>
<many>true</many>
</source>
<target>
<class>sc:doc</class>
<mandatory>false</mandatory>
<many>true</many>
</target>
</association>
</associations>
<mandatory-aspects>
<aspect>cm:generalclassifiable</aspect>
<aspect>sc:webable</aspect>
</mandatory-aspects>
</type>
[…]
<aspect name="sc:webable">
<title>Someco Webable</title>
<properties>
<property name="sc:published">
<type>d:date</type>
<mandatory>false</mandatory>
</property>
<property name="sc:isActive">
<type>d:boolean</type>
<mandatory>false</mandatory>
<default>false</default>
</property>
</properties>
</aspect>
[…]
Le " <mandatory>false</mandatory>" que l'on trouve pour les proprétés de l'aspect permet d'ajouter l'aspect sans avoir forcément une valeur de saisie.<type name="sc:doc">
<title>Someco Document</title>
<parent>cm:content</parent>
<properties>
<property name="sc:prop">
<title>Name</title>
<type>d:text</type>
</property>
</properties>
<associations>
<association name="sc:relatedDocuments">
<title>Related Documents</title>
<source>
<mandatory>false</mandatory>
<many>true</many>
</source>
<target>
<class>sc:doc</class>
<mandatory>false</mandatory>
<many>true</many>
</target>
</association>
</associations>
<mandatory-aspects>
<aspect>cm:generalclassifiable</aspect>
<aspect>sc:webable</aspect>
</mandatory-aspects>
</type>
il faudra alors dans le web-client-config-custom.xml ajouter le paramétrage suivant : <config evaluator="node-type" condition="sc:doc">
<property-sheet>
<show-property name="sc:prop" display-label-id="monLabel"/>
<show-association name="sc:relatedDocuments" display-label-id="monLabel"/>
</property-sheet>
</config>
09-28-2007 04:45 AM
09-28-2007 12:06 PM
09-28-2007 12:36 PM
10-18-2007 04:14 AM
10-18-2007 12:37 PM
02-22-2008 10:07 AM
07-27-2010 08:12 AM
10-19-2012 06:39 AM
12:31:35,418 ERROR [web.context.ContextLoader] Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'extension.dictionaryBootstrap' defined in file [C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\classes\alfresco\extension\example-model-context.xml]: Invocation of init method failed; nested exception is org.alfresco.service.cmr.dictionary.DictionaryException: 09190001 Could not import bootstrap model alfresco/extension/exampleModel.xml
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1401)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:512)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:450)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:290)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:287)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:189)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:557)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:842)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:416)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:261)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:192)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
at org.alfresco.web.app.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:63)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4135)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4630)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:637)
at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:563)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:498)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:445)
at org.apache.catalina.core.StandardService.start(StandardService.java:519)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: org.alfresco.service.cmr.dictionary.DictionaryException: 09190001 Could not import bootstrap model alfresco/extension/exampleModel.xml
at org.alfresco.repo.dictionary.DictionaryBootstrap.onDictionaryInit(DictionaryBootstrap.java:158)
at org.alfresco.repo.dictionary.DictionaryBootstrap.bootstrap(DictionaryBootstrap.java:105)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1529)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1468)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1398)
… 37 more
Caused by: org.alfresco.service.cmr.dictionary.DictionaryException: 09190000 Failed to parse model
at org.alfresco.repo.dictionary.M2Model.createModel(M2Model.java:93)
at org.alfresco.repo.dictionary.DictionaryBootstrap.onDictionaryInit(DictionaryBootstrap.java:147)
… 45 more
Caused by: org.jibx.runtime.JiBXException: Error accessing document
at org.jibx.runtime.impl.XMLPullReaderFactory$XMLPullReader.nextToken(XMLPullReaderFactory.java:269)
at org.jibx.runtime.impl.UnmarshallingContext.advance(UnmarshallingContext.java:333)
at org.jibx.runtime.impl.UnmarshallingContext.parsePastCurrentEndTag(UnmarshallingContext.java:795)
at org.alfresco.repo.dictionary.M2Model.JiBX_root_projects_data_model_source_java_org_alfresco_repo_dictionary_m2binding_unmarshal_1_0(M2Model.java)
at org.alfresco.repo.dictionary.JiBX_root_projects_data_model_source_java_org_alfresco_repo_dictionary_m2bindingM2Model_access.unmarshal()
at org.jibx.runtime.impl.UnmarshallingContext.unmarshalElement(UnmarshallingContext.java:2773)
at org.jibx.runtime.impl.UnmarshallingContext.unmarshalDocument(UnmarshallingContext.java:2916)
at org.alfresco.repo.dictionary.M2Model.createModel(M2Model.java:88)
… 46 more
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.