AnsweredAssumed Answered

d:path type and variable error

Question asked by userfresco on May 31, 2010
Latest reply on Jun 3, 2010 by rbkprod
Hi,

This problem and question is the <type>d:path</type> variable value
Running a rule that adds the above property to a document with the default value of http://localhost/editor/editpage.php results in a error
Failed to run Actions due to error: The property value is not compatible with the type defined for the property: property: Name: {custom.model}EditLink Title: EditLink Description: null Default Value: localhost/edit.aspx DataType Name: {http://www.alfresco.org/model/dictionary/1.0}path ContainerClass Name: {custom.model}EditLink isMultiValued: false isMandatory: false isMandatoryEnforced: false isProtected: false isIndexed: true isStoredInIndex: false isIndexedAtomically: true indexTokenisationMode: TRUE value: localhost/edit.aspx value type: class java.lang.String
My idea is to eventually add the document.url to the end of the  default value to end up looking something like the url below, but the type of property d:path seems to not accept this format
http://localhost/editor/editpage.php?file=http://localhost:8080/alfresco/d/d/workspace/SpacesStore/e17357cf-75ac-4005-a9e3-1f4462961483/AlfrescoFile-115365668093570384.xml

This value is then displayed in the 'view details' page in the property section and the user can click on the link to edit the xml document

Here are the files below

web-client-config-custom.xml
<config evaluator="aspect-name" condition="custom:EditLink">
      <property-sheet>
         <separator name="sepCust4" display-label="EditLink" component-generator="HeaderSeparatorGenerator" />
         <show-property name="custom:EditLink"/>
      </property-sheet>
   </config>
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/customModel.xml</value>
            </list>
        </property>
    </bean>
         
</beans>
customModel.xml
<aspect name="custom:EditLink">
         <title>EditLink</title>
         <properties>
            <property name="custom:EditLink">
               <title>EditLink</title>
               <type>d:path</type>
            <protected>false</protected>
            <mandatory>false</mandatory>
            <multiple>false</multiple>
            <default>http://localhost/editor/editpage.php</default>
            </property>
         </properties>
      </aspect>
    

Any other ideas, references or suggestions appreciated
Thank you in advance.

Outcomes