cancel
Showing results for 
Search instead for 
Did you mean: 

Customizing Doclib Filter webscript

pl_componize
Champ in-the-making
Champ in-the-making
In Alfresco 4.0, I'd like to extend Share Doclib Filter webscript to add my own customized filter.

1) Is there a simple way to add my own filter in the share-config-custom.xml?
2) How do I define my the behaviour of my own filter on the repository side?


[img]http://i.stack.imgur.com/2T3WW.png[/img]
5 REPLIES 5

ddraper
World-Class Innovator
World-Class Innovator
Hi,

Have you taken a look through the blog posts at http://blogs.alfresco.com/wp/ddraper/ all but one relate to customization/extension options for v4.0.  There are a number of different ways in which you can approach this problem (all are described in different blogs)… but to summarize you could either:
  • Create a module that replaces the sub-component that defines the filter with your own

  • Create a module that defines a customization for the document library template and remove/replace/add your own filter regions and bind your own WebScripts to them

  • Create a module that defines a customization for any of the JavaScript controller, FreeMarker template or i18n properties file of the WebScript that creates the filter and customize as necessary

  • Copy and paste the WebScript that defines the filter to the web-extensions path and make your customizations there (this is the "old school" approach and is not recommended unless there is no other alternative).
Defining the behaviour on the repository side will be dependent upon how your client side approach works, but I'd imagine it would be a case of either creating new or customizing existing repository WebScripts.

Hopefully this will help you make some progress,

Dave

pl_componize
Champ in-the-making
Champ in-the-making
I've read and implemented most of your blogs yes.

But I was hoping for a simplier extension point I was unaware of.

Thanks 😃

ddraper
World-Class Innovator
World-Class Innovator
No problem…

I'd be interested to know exactly what you'd like to achieve and also any difficulties you might have encountered with the new extensibility features (although we know that there's still some work to do for future releases to add to the feature set to improve it).

Any feedback you can give would greatly assist us improving what we have and helping people achieve their goals more simply,

Regards,
Dave

pl_componize
Champ in-the-making
Champ in-the-making
well in my case, I just wanted to create a filter to have access to all my invalid documents (ie have a certain set of aspects and properties that define them as invalid).


Regarding the difficulties I've met already: I would like to be able to use the status banner mechanic that is implemented with the locked documents to display my own type of validation error message. I was unable to do it without hacking your code too much, so for the moment I just display something similar in the metadata-templates, so it's only in the doclib and not in the doc-details Smiley Sad I would have liked to see more synergy in the configuration beetween the document library and the document details view, like it's done with the actions with actionGroup ids for example. Right now the share-config-custom is mostly oriented toward the library.

btw, I've found what I was looking for here : http://www.slideshare.net/alfresco/apps-2-customizingthedocumentlibrary

ddraper
World-Class Innovator
World-Class Innovator
FYI… Those slides you posted look like the ones from the 2010 DevCon… there's actually been a lot more work done explicitly for DocumentLibrary customization which Mike has documented here http://blogs.alfresco.com/wp/mikeh/2011/09/26/share-document-library-extensions-in-v4-0/ (in case you've not seen it) - I'm not sure if that will have any more up-to-date solutions regarding document library configuration.