cancel
Showing results for 
Search instead for 
Did you mean: 

Expand site content model

janaka1984
Star Contributor
Star Contributor
hi

i need to add extra property when create new site. when open edit form that extra property should be able to show

how can i do it?

Regards
janaka
10 REPLIES 10

janaka1984
Star Contributor
Star Contributor


Hi,

i used my own model and register it on context. also bind onCreateNode with JS file


<bean id="onCreateRatingNode" class="org.alfresco.repo.policy.registration.ClassPolicyRegistration" parent="policyRegistration">
        <property name="policyName">
            <value>{http://www.alfresco.org}onCreateNode</value>
        </property>
        <property name="className">
            <!– <value>{http://www.someco.com/model/ratings/1.0}rating</value> –>
         <value>{http://www.alfresco.org/model/site/1.0}site</value>
        </property>
        <property name="behaviour">
           <bean class="org.alfresco.repo.jscript.ScriptBehaviour" parent="scriptBehaviour">
                        <property name="location">
                                <bean class="org.alfresco.repo.jscript.ClasspathScriptLocation">
                                <constructor-arg>
                                   <!– <value>alfresco/module/behavior-tutorial-repo/scripts/onCreateRating.js</value> –>
                           <value>alfresco/module/behavior-tutorial-repo/scripts/onCreateSite.js</value>
                        </constructor-arg>
                               </bean>
                        </property>
           </bean>
        </property>
    </bean> 

How listens to onCreateNode without modifying original source

thanks