05-31-2010 06:56 AM
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.StringMy 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
http://localhost/editor/editpage.php?file=http://localhost:8080/alfresco/d/d/workspace/SpacesStore/e...
<config evaluator="aspect-name" condition="custom:EditLink">custom-model-context.xml
<property-sheet>
<separator name="sepCust4" display-label="EditLink" component-generator="HeaderSeparatorGenerator" />
<show-property name="custom:EditLink"/>
</property-sheet>
</config>
<?xml version='1.0' encoding='UTF-8'?>customModel.xml
<!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>
<aspect name="custom:EditLink">
<title>EditLink</title>
<properties>
<property name="custom:EditLink">
<title>EditLink</title>
<type>dath</type>
<protected>false</protected>
<mandatory>false</mandatory>
<multiple>false</multiple>
<default>http://localhost/editor/editpage.php</default>
</property>
</properties>
</aspect>
06-02-2010 04:25 AM
06-03-2010 08:28 AM
This functionality can be accomplished by making the following changes:
1. File CustomModel.xml
<type>d:text</type>
2. File web-client-config-custom.xml
<show-property name="custom:EditLink" component-generator="LinkGenerator" />
var ref = document.properties["custom:ref"];
if (ref == "Test")//user enters test in the text field
{
var refFolder = companyhome.childByNamePath("/Files/Test.txt");
ref = refFolder.url;
document.properties["custom:ref"] = ref; //change it to the test.txt url
}
document.save();
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.