cancel
Showing results for 
Search instead for 
Did you mean: 

Upload file as a new association

hbf
Champ on-the-rise
Champ on-the-rise
Hi,

I need to replace the Web Client's standard association component – the one with the Seach text field, the Search button, the Add To List button, and the list of current associations – with a custom one that allows the user to upload a file "in place" (and not associate an existing one).

This would look as follows:
1. Locate content to upload: <Browse button>
2. <Upload button>

Selected Items
Foo <Trash icon>
Bar <Trash icon>

Could somebody give me a high-level advice of what options I have and how best to proceed?

I am using Alfresco Community 2.1 (but could switch to 2.9lab). I see the following options but am not sure whether they indeed all apply:

1. Use JSP/JSF as in this post. But what about the tomahauk thing mentioned there?
2. Use Alfresco Forms (but: can I use this for non-WCM nodes? could I use ECM forms?)

If possible, I would be interested in developing this as an AMP and make it general enough as to

* support child and non-child associations
* allow the programmer to specify which association to use (in contrast to hard-coding it)
* maybe: allow the programmer to specify the (sub)type to which to specialize the newly uploaded file

Many thanks,
Kaspar

P.S. I am not the first with this need. Maybe somebody has already a solution for this that he/she could share?
1 REPLY 1

gavinc
Champ in-the-making
Champ in-the-making
You could certainly use the MyFaces tomahawk upload component, it's been proven to be achievable and as an AMP would be great.

However, if you want to support use within the JBoss Portal you won't be able to use the tomahawk component (hence the reason we have to have a separate r:uploadForm component 😞 ) as to use it you need to define a servlet filter, which are not supported in a portal server.

To create the new component you will need to define a component generator (http://wiki.alfresco.com/wiki/Component_Generator_Framework) as well as the association component itself. The ability to define a component-generator for an association in the configuration was added to the enterprise release of 2.1 so you will need to move to 2.9 to get that feature.

Hope this helps!