cancel
Showing results for 
Search instead for 
Did you mean: 

Custom share datalists

eddie
Champ in-the-making
Champ in-the-making
Hi,

Just a post to explain my experiences, as I can tell other newbies have struggled with creating custom data lists. Well, maybe it's just me, but then I'm posting this for my own future reference 🙂

I wanted to create a custom datalist. Google told me to go to

http://ecmarchitect.com/archives/2010/04/25/1156

In my experience, if you're using Alfresco 3.4, that example will probably not work very well - it seems to reference templates (eg. row-new.ftl)  that are no longer found in 3.4.

I had more luck with the following sample

http://code.google.com/p/share-extras/downloads/detail?name=share-sample-datalists-0.1.jar&can=2&q=
http://code.google.com/p/share-extras/wiki/DataLists

However, I had to tweak tomcat configuration a little, to have it pick up jar files from tomcat/shared/lib. I used the instructions given here:
http://wiki.alfresco.com/wiki/Install_Tomcat6

I really just executed step 4, namely
"Change the value of shared.loader= to the following:
shared.loader=${catalina.base}/shared/classes,${catalina.base}/shared/lib/*.jar"

Part of my troubles were figuring out how to deploy the data list (as I said, I'm new at this 🙂 ). I think this is due to the necessity of making both the repository (alfresco.war) aware of the model, and to let the Share UI (share.war) know how to display it. I think that deploying the above as a jar file and use tomcat's shared/lib folder is a nice solution, as it eliminates the need for both deploying an amp file (with the model) and a jar file (for customizing Share UI) to 2 different applications running under tomcat.

However, this won't work if you have separate tomcat installations for running the repository (alfresco.war) and Share UI (share.war). Any thoughts on this topic are appreciated.

Hope this helps someone.

Regards, Søren
2 REPLIES 2

jpotts
World-Class Innovator
World-Class Innovator
I know this is an old thread…

If you get a chance, please let me know specifically what doesn't work in that ecmarchitect.com data list example. The code provided does not include any FTL files so it is a bit puzzling why it didn't work for you.

In any case, Share Extras is a great resource, so glad you found that.

I would say that AMPs are the standard we are trying to get people to use for deploying customizations. As you point out, deploying using a single JAR only works when you are running Alfresco and Share in the same container and it does not work for all types of customizations.

The step you mentioned about having to configure the shared classloader is something that is commonly done for all Alfresco implementations and is not related specifically to data lists. Many people use the Shared class loader to store server-specific configuration files and alfresco-global.properties.

Thanks for sharing your experience and welcome to the community!

Jeff

rjohnson
Star Contributor
Star Contributor
Jeff

Found this post when I was having the same issue. The download code from ecmarchitect.com does not contain a file row-new.ftl and row-edit.ftl which are referenced in the file fdk-common-custom.xml as the templates for the forms for adding and editing a row. replacing these references with

<create-form template="/org/alfresco/components/data-lists/forms/dataitem.ftl" />

and

<edit-form template="/org/alfresco/components/data-lists/forms/dataitem.ftl" />

respectively solves the issue (or at least is does in 4.0a)

Best

Bob