cancel
Showing results for 
Search instead for 
Did you mean: 

Change a simple text in Share User Profile page

sselvan
Champ in-the-making
Champ in-the-making
I am trying to update a text in "My Profile" page in Alfresco Share. Basically, I am updating "Company Details" into "Organization Details" in Profile page.

I found out that "Company Details" text is available in <ALF_HOME>tomcat\webapps\share\WEB-INF\classes\alfresco\messages\slingshot.properties.

I copied this file and placed it in <ALF_HOME>\tomcat\shared\classes\alfresco\messages\, restarted the server and even cleared cache to see that the text did not change in Profile page.

After that, I also copied this file and placed it in <ALF_HOME>\tomcat\shared\classes\alfresco\web-extension\messages, restarted the server and even cleared cache to see that the text did not change in Profile page.

However, when I directly change slingshot.properties in <ALF_HOME>tomcat\webapps\share\WEB-INF\classes\alfresco\messages\ (Original Location), I am able to see my changes in the Profile page of Share.

How do I extend slingshot.properties. Am I missing something? Please let me know.
7 REPLIES 7

sselvan
Champ in-the-making
Champ in-the-making
I even tried adding a new file web-extension/custom-slingshot-application-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>

   <!– Override WebScript Messages - add slingshot application messages –>
   <bean id="webscripts.resources" class="org.springframework.extensions.surf.util.ResourceBundleBootstrapComponent">
      <property name="resourceBundles">
         <list>
            <value>alfresco.web-extension.messages.mymessages</value>
         </list>
      </property>
   </bean>

</beans>

And added mymessages.properties file in web-extension/messages/

# Custom My Messages
label.company=Organization
label.companyinfo=Organization Details

I am getting classnotfound on a class -

Caused by: java.lang.ClassNotFoundException: org.springframework.extensions.surf.util.ResourceBundleBootstrapComponent

All I am trying to do is - extend and override the slingshot.properties file with a new message for

label.company=Organization
label.companyinfo=Organization Details

Also I have tried placing slingshot.properties in all places like web-extension\messages, extension\messages and shared\classes\alfresco\messages also. But of no use.

Any help appreciated. What am I missing in terms of extension, though direct edit of the file works!

janhendriks
Champ in-the-making
Champ in-the-making
Try


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

<beans>

   <!– Override WebScript Messages - add slingshot application messages –>
   <bean id="webscripts.resources" class="org.alfresco.i18n.ResourceBundleBootstrapComponent">
      <property name="resourceBundles">
         <list>
            <value>alfresco.messages.webscripts</value>
            <value>alfresco.messages.slingshot</value>
            <value>alfresco.web-extension.messages.knowledgebase</value>
         </list>
      </property>
   </bean>

</beans>

sselvan
Champ in-the-making
Champ in-the-making
We did try this before, but it did not help.
Anyhow, we will try it again!!

Thanks for your response!

ghernando
Champ in-the-making
Champ in-the-making
Did you ever get this working?

I am able to make changes directly to the slingshot.properties file and things are picked up correctly.
But I haven't been able to successfully extend it by putting extensions in another properties file.

It also seems that having to specify the extension properties file by editing and adding it to the file web-extension/custom-slingshot-application-context.xml is not a good general approach.
For multiple customizations to coexist, couldn't the file potentially get overwritten and need to be manually edited to allow for more than one additional customized properties file extension?

michaelc
Champ on-the-rise
Champ on-the-rise
We did try this before, but it did not help.
Anyhow, we will try it again!!
Thanks for your response!

Did you ever resolve this, I seem to have the same issue.

danilobuzar
Champ in-the-making
Champ in-the-making
Just for further information…

For Alfresco Share messages override, put this code in shared\classes\alfresco\web-extension\custom-slingshot-application-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>
  
   <!– Override WebScript Messages - add slingshot application messages –>
   <bean id="webscripts.resources" class="org.springframework.extensions.surf.util.ResourceBundleBootstrapComponent">
      <property name="resourceBundles">
         <list>
            <value>alfresco.web-extension.messages.common</value>
            <value>alfresco.web-extension.messages.slingshot</value>
         </list>
      </property>
   </bean>

</beans>

And be sure that common.properties and slingshot.properties files are in shared\classes\alfresco\web-extension\messages

gmccullough
Champ on-the-rise
Champ on-the-rise
I got
Just for further information…

For Alfresco Share messages override, put this code in shared\classes\alfresco\web-extension\custom-slingshot-application-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>
  
   <!– Override WebScript Messages - add slingshot application messages –>
   <bean id="webscripts.resources" class="org.springframework.extensions.surf.util.ResourceBundleBootstrapComponent">
      <property name="resourceBundles">
         <list>
            <value>alfresco.web-extension.messages.common</value>
            <value>alfresco.web-extension.messages.slingshot</value>
         </list>
      </property>
   </bean>

</beans>

And be sure that common.properties and slingshot.properties files are in shared\classes\alfresco\web-extension\messages

Thanks for this info, I was able to get my aspect names to show up in Share.  Everything else works, but now when I go to the Calendar in Share, I get "undefined 2011"  where the Month and Year should be, and the drop down list to select the month just shows months.long

I've checked my shared\classes\alfresco\web-extension\messages\commons.properties file, and months.long is listed there.

I've got one custom aspect that I added and initially mispelled the label in the property file, but after correcting, it doesn't update either (the other aspects I added are displayed correctly).    Could this be a cache issue? I deleted the work folder, not sure what else to try.

Thanks in advance
gene