cancel
Showing results for 
Search instead for 
Did you mean: 

share-config-custom.xml for multiple projects

krups
Champ in-the-making
Champ in-the-making
Hello All,

I need help with creating share-config-custom file.
Actually I have two separate extension for two different custom datalist model in eclipse.
Each extension project has got share-config-custom.xml file.
When I build project and deploy jar files, I can't see changes configured into share-config-custom.xml file which is deployed later.
I saw some forums regarding this, I believe that Alfresco is overriding something.
Can someone please help me out?
I haven't use replace="true" as well in both share-config-custom.xml.

following is 1st  share-config-custom.xml file:
<alfresco-config> <!– Project Management –><config evaluator="model-type" condition="pm:projectManage" >      <forms>         <!– Create item form –>         <form>            <field-visibility>                                   <show id="pm:pmID" />                         <show id="cm:title" />               <show id="cm:description" />            <show id="pm:unit"/>            <show id="pm:location"/>             <show id="cm:latitude" />               <show id="cm:longitude" />            <show id="pm:budget"/>            <show id="pm:ytd"/>            <show id="pm:capital"/>             <show id="pm:account-code"/>             <show id="pm:strategy-objective"/>             <!– <show id="pm:strategy-no"/>–>              <show id="dl:ganttStartDate" />               <show id="dl:ganttEndDate" />             <show id="pm:priority" />                        <show id="pm:status" />            <show id="dl:ganttPercentComplete" />             <show id="pm:projectManager" />              <show id="dl:taskComments" />              <show id="cm:attachments" />              <show id="pm:linked-site" />                         </field-visibility>             <create-form template="/org/alfresco/components/data-lists/forms/dataitem.ftl" />                        <appearance>               <field id="cm:title">                  <control template="/org/alfresco/components/form/controls/textfield.ftl" />               </field>               <field id="dl:taskComments">                  <control template="/org/alfresco/components/form/controls/textarea.ftl" />               </field>            <field id="pm:strategy-objective">                  <control template="/org/alfresco/components/form/controls/textarea.ftl" />            </field>            <field id="pm:location" help="Please enter the place for this project.For Example, Northbridge Piazza, Council House etc."><control-param name="style">width:500px</control-param></field>               <field id="cm:attachments">                  <control>                    <control-param name="startLocation">{doclib}</control-param>                  </control>               </field>               <field id="pm:linked-site">                  <control>                    <control-param name="startLocation">{siteshome}</control-param>                  </control>               </field>                      <field id="pm:status" help="Select relative colour for your project status as 'White' if 'Not Started', 'Green' if 'In Progress', 'Amber' if 'On Hold', 'Red' if 'Stopped' and 'Blue' if 'Completed'" >             <control  template="/status.ftl"/>            <control-param name="style">width:250px</control-param>               </field>            </appearance>         </form>               <!– Data Grid view –>               <form id="datagrid">                     <field-visibility>                                    <show id="pm:pmID" />                         <show id="cm:title" />               <show id="cm:description" />            <show id="pm:unit"/>            <show id="pm:location"/>             <show id="cm:latitude" />               <show id="cm:longitude" />            <show id="pm:budget"/>            <show id="pm:ytd"/>            <show id="pm:capital"/>            <show id="pm:account-code"/>             <show id="pm:strategy-objective"/>         <!–     <show id="pm:strategy-no"/> –>              <show id="dl:ganttStartDate" />               <show id="dl:ganttEndDate" />             <show id="pm:priority" />                        <show id="pm:status" />            <show id="dl:ganttPercentComplete" />             <show id="pm:projectManager" />              <show id="dl:taskComments" />                <show id="pm:linked-site" />                             <show id="cm:attachments" />                               </field-visibility>                              </form>             <form id="filter">            <field-visibility><show id="pm:pmID" />                         <show id="cm:title" /></field-visibility>         </form>         </forms>      </config>      <!– Edit view –>   <config evaluator="node-type" condition="pm:projectManage">      <forms>                 <form>            <field-visibility>                        <show id="pm:pmID" />                         <show id="cm:title" />               <show id="cm:description" />            <show id="pm:unit"/>            <show id="pm:location"/>             <show id="cm:latitude" />               <show id="cm:longitude" />            <show id="pm:budget"/>            <show id="pm:ytd"/>            <show id="pm:capital"/>            <show id="pm:account-code"/>            <show id="pm:strategy-objective"/>         <!–   <show id="pm:strategy-no"/> –>            <show id="dl:ganttStartDate" />               <show id="dl:ganttEndDate" />             <show id="pm:priority" />         <show id="pm:status" />             <show id="dl:ganttPercentComplete" />             <show id="pm:projectManager" />              <show id="dl:taskComments" />              <show id="cm:attachments" /><show id="pm:linked-site" />            </field-visibility>            <edit-form template="/org/alfresco/components/data-lists/forms/dataitem.ftl" />            <appearance>               <field id="cm:title">                  <control template="/org/alfresco/components/form/controls/textfield.ftl" />               </field>               <field id="dl:taskComments">                  <control template="/org/alfresco/components/form/controls/textarea.ftl" />               </field>            <field id="pm:strategy-objective">                  <control template="/org/alfresco/components/form/controls/textarea.ftl" />            </field>               <field id="cm:attachments">                  <control>                    <control-param name="startLocation">{doclib}</control-param>                  </control>               </field>             <field id="pm:location" help="Please enter the place for this project.For Example, Northbridge Piazza, Council House etc." ><control-param name="style">width:500px</control-param></field>                           <field id="pm:linked-site">                  <control>                    <control-param name="startLocation">{siteshome}</control-param>                  </control>               </field>            <field id="pm:status" help="Select relative colour for your project status as 'White' if 'Not Started', 'Green' if 'In Progress', 'Amber' if 'On Hold', 'Red' if 'Stopped' and 'Blue' if 'Completed'" >             <control  template="/status.ftl"/>            <control-param name="style">width:250px</control-param>               </field>          <!–<field id="pm:status">                      <control  template="/status.ftl"/>            <control-param name="style">width:250px</control-param>               </field>–>            </appearance>               </form>      </forms>   </config></alfresco-config>‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

And share-config-custom.xml for another extension project.
<alfresco-config><!– Risks Management –><config evaluator="model-type" condition="rs:riskDatalist" ><forms>   <!– Create item form –>    <form>       <field-visibility>           <show id="dl:issueID" />                    <show id="rs:pmID"/>                <show id="cm:title" />            <show id="dl:issueStatus" />            <show id="dl:issuePriority" />            <show id="dl:issueDueDate" />            <show id="dl:issueComments" />            <show id="dl:issueAssignedTo" />            <show id="cm:attachments" />      </field-visibility>        <create-form template="/org/alfresco/components/data-lists/forms/dataitem.ftl" />        <appearance>           <field id="cm:title">               <control template="/org/alfresco/components/form/controls/textfield.ftl" />            </field>            <field id="dl:issueComments">               <control template="/org/alfresco/components/form/controls/textarea.ftl" />            </field>         <field id="rs:pmID">            <control template="/select.ftl">                   <control-param name="ds">/alfresco/service/ds/autocomplete</control-param>                </control>            </field>           </appearance>   </form>    <!– Data Grid view –>               <form id="datagrid">                     <field-visibility>                                  <show id="dl:issueID" />                     <show id="rs:pmID"/>                 <show id="cm:title" />             <show id="dl:issueStatus" />             <show id="dl:issuePriority" />             <show id="dl:issueDueDate" />             <show id="dl:issueComments" />             <show id="dl:issueAssignedTo" />             <show id="cm:attachments" />                                            </field-visibility>                              </form>                    </forms>      </config>      <!– Edit view –>   <config evaluator="node-type" condition="rs:riskDatalist">      <forms>                 <form>            <field-visibility>             <show id="dl:issueID" />                     <show id="rs:pmID"/>                 <show id="cm:title" />             <show id="dl:issueStatus" />             <show id="dl:issuePriority" />             <show id="dl:issueDueDate" />             <show id="dl:issueComments" />             <show id="dl:issueAssignedTo" />             <show id="cm:attachments" />                         </field-visibility>            <edit-form template="/org/alfresco/components/data-lists/forms/dataitem.ftl" />            <appearance>         <field id="cm:title">               <control template="/org/alfresco/components/form/controls/textfield.ftl" />            </field>            <field id="dl:issueComments">               <control template="/org/alfresco/components/form/controls/textarea.ftl" />            </field>         <field id="rs:pmID">            <control template="/select.ftl">                   <control-param name="ds">/alfresco/service/ds/autocomplete</control-param>                </control>            </field>              </appearance>         </form></forms></config></alfresco-config>‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

Thank you
2 REPLIES 2

krups
Champ in-the-making
Champ in-the-making
Hello,

I found the solution.
I created custommodel-slingshot-application-context.xml as below:
<?xml version='1.0' encoding='UTF-8'?><!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'><beans><bean id="custommodel.config" class="org.springframework.extensions.config.ConfigBootstrap" init-method="register"><property name="configService" ref="web.config"/><property name="configs"><list><value>classpath:alfresco/web-extension/share-config-custommodel.xml</value></list></property> </bean></beans>‍‍‍‍‍‍‍‍‍‍‍‍‍‍
and have changed name of share-config-custom.xml to share-config-custommodel.xml
that's all. I did this for both of my extension projects and have deployed successfully.
Hurray!!

Note: custommodel is name used for my custom models (projectmodel, tendermodel etc.)

batalov
Champ in-the-making
Champ in-the-making
Thanks krups, your post was very helpful. BTW, do you have automated method to update files in tomcat/shared/classes/alfresco? I use AMP to update alfresco.war - where the models reside, but have to update share forms files menually so far.