Extender listas en shared

cancel
Showing results for 
Search instead for 
Did you mean: 
lazaro
Member II

Extender listas en shared

Buenas, Hasta ahora he creado nuevas listas editando directamente el "datalistmodel.xml" y "share-datalist-form-config.xml", todos sabemos que no son buenas practicas… por eso ahroa estoy intentando crearlas por shared
lo que creo es
1º "prueba-model-context.xml" –> shared/classes/extension
2º "pruebamodel.xml" –> shared/classes/extension
3º "share-config-custom.xml" –> shared/classes/web-extension


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

prueba-model-context.xml
<beans>
    <bean id="extension.dictionaryBootstrap" parent="dictionaryModelBootstrap" depends-on="dictionaryBootstrap">
        <property name="models">
            <list>
                <value>alfresco/extension/pruebamodel.xml</value>
            </list>
        </property>
    </bean>
</beans>


pruebamodel.xml

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

<!– Definition of new Model –>

<!– The important part here is the name - Note: the use of the my: namespace
     which is defined further on in the document –>
<model name="my:mynewmodel" xmlns="http://www.alfresco.org/model/dictionary/1.0">

   <!– Optional meta-data about the model –>  
   <description>Example custom Model</description>
   <author></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"/>
      <import uri="http://www.alfresco.org/model/datalist/1.0" prefix="dl"/>
   </imports>

   <!– Introduction of new namespaces defined by this model –>
   <!– NOTE: The following namespace my.new.model should be changed to reflect your own namespace –>
   <namespaces>
      <namespace uri="my.new.model" prefix="my"/>
   </namespaces>
  
   <types>
      <!– Definition of new Content Type: Standard Operating Procedure –>
      <type name="my:sop">
         <title>funciona</title>
         <parent>dl:datalist</parent>
         <properties>
            <property name="my:publishedDate">
            <title>uno</title>
            <type>d:datetime</type>
            </property>
            <property name="my:authorisedBy">
            <title>dos</title>
            <type>d:text</type>
            </property>
         </properties>
    </types>
</model>


share-config-custom.xml


<config evaluator="node-type" condition="my:sop">
      <forms>
         <form>
            <field-visibility>
               <show id="my:publishedDate" />      
               <show id="my:authorisedBy" />   
            </field-visibility>
            <create-form template="/org/alfresco/components/data-lists/forms/dataitem.ftl" />
            <appearance>
            </appearance>
         </form>
      </forms>
   </config>
         
   <config evaluator="model-type" condition="my:sop">
      <forms>
         <form>
            <field-visibility>
               <show id="my:publishedDate" />      
               <show id="my:authorisedBy" />   
            </field-visibility>
            <edit-form template="/org/alfresco/components/data-lists/forms/dataitem.ftl" />
            <appearance>
            </appearance>
         </form>
      </forms>
   </config>



que es lo que he echo mal para que no funcione?
un saludo y gracias
2 Replies
cristinamr
Advanced

Re: Extender listas en shared

Pero qué error te da? Puedes adjuntarnos el log con el fallo?

Un saludo.
--
VenziaIT: helping companies since 2005! Our ECM products: AQuA & Seidoc
lazaro
Member II

Re: Extender listas en shared

Ya lo solucioné, creo que era que no puse los archivos en su sitio.

un saludo