cancel
Showing results for 
Search instead for 
Did you mean: 

Custom metadata display

cloisel
Champ in-the-making
Champ in-the-making
Hi everyone,

-Alfresco Labs 3 (Full-Setup.exe)
-Windows Vista

I just installed Alfresco Labs 3 and performed custom aspect creation (author details). It worked ok (input & display).
However, when I created a test site for the Share plateform, I couldn't see these new created metadatas for the corresponding document (on the document details page).
I've seen a post where this is supposed to be performed in a couple of months…
Could anyone explain how to add these custom metadatas to the document details page, please?
I'm new at Alfresco so be as clear as possible (paths,files,methods…)

Thanks in advance.

Good afternoon everyone.

Christophe
6 REPLIES 6

msvoren
Champ in-the-making
Champ in-the-making
I would like to know that too. It seems like you can display only defined document properites in document-info.js.

      onDocumentDetailsAvailable: function DocumentInfo_onDocumentDetailsAvailable(layer, args)
      {
         var docData = args[1];
         // render the core metadata values
         Dom.get(this.id + "-meta-name").innerHTML = $html(docData.fileName);
         Dom.get(this.id + "-meta-content-type").innerHTML = $html(this._getMimetypeLabel(docData.mimetype));
         //Dom.get(this.id + "-meta-encoding").innerHTML = $html(docData.encoding);
         Dom.get(this.id + "-meta-title").innerHTML = $html(docData.title);
         Dom.get(this.id + "-meta-description").innerHTML = $html(docData.description);


I can see that  args[1] is document NodeRef.
So, how to get other, custom properties from my custom models, applied to that document?
simple
 $html(docData.properties["custom:someproperty"]); 
- won't work.

And also - where are those ".fileName", ".mimetype", "createdOn" properties defined?
Those are not "classic" alfresco properties..

mikeh
Star Contributor
Star Contributor
Viewing and editing metadata is going through a complete refactor on HEAD currently, as part of the new Forms service.

If you can wait until the next Labs release around April, this should all be much easier to configure.

Thanks
Mike

msvoren
Champ in-the-making
Champ in-the-making
Hi Mike, thanks for the info.
I successfully updated my application from the latest source and i can see and edit custom meta-data.

I was wondering if there is some sort of documentation on what arguments can i use with "web-framework-config-custom.xml", like how to display properties as "read-only" or "textarea". It's a bit different in alfresco's web-client-config-custom.xml configuration.

Also, I woud like to know what API are available with document nodes in Share. I can use "fileName" and "nodeRef", "location.site", "location.url"… What are the rest of them? How do i get "parent" node of current node, for example?

Thanks, any help, advice, i would highly appreciate!

mikeh
Star Contributor
Star Contributor
I was wondering if there is some sort of documentation on what arguments can i use with "web-framework-config-custom.xml", like how to display properties as "read-only" or "textarea". It's a bit different in alfresco's web-client-config-custom.xml configuration.
There's some documentation here: http://wiki.alfresco.com/wiki/Forms_Temp2 but I wouldn't rely on it yet, as the new code is still be actively developed.

Also, I woud like to know what API are available with document nodes in Share. I can use "fileName" and "nodeRef", "location.site", "location.url"… What are the rest of them? How do i get "parent" node of current node, for example?
There's no API, as such because the documents don't exist in the Share web application. I think you're referring to the JSON object returned by the main doclist data webscript:
   http://<server>:<port>/share/proxy/alfresco/slingshot/doclib/doclist/documents/site/<siteId>/documentLibrary/?filter=path&filterData=%2F&size=50&pos=1

In which case it's easier just to throw that URL at a browser and see the response yourself.

Thanks,
Mike

msvoren
Champ in-the-making
Champ in-the-making
Hi Mike,
Thanks for your answers, finally figured out that JSON part..

One more question: what would be the easiest way to display edit-metadata form, directly on Document-details page? i want to replace document-details (readonly), with edit-metadata webscript (now accessed via "edit metadata" button on document-details page).

I tried to edit document-details.ftl template, and I added "edit-metadata" <@region> part. but it wont' display "Save" and "Cancel" buttons..
That "Submit" button, displays return message from alfresco slinghot webscript, displaying message about successful saving to node..

baby77
Champ in-the-making
Champ in-the-making
Hi
i can add my own metadata on document.i configure next files document-info.js,document-info.get.html.ftl,document-info.get.properties.
I can see added metadata,but the problem is i can't edit it and the values aren't filled like default are.For my metadata values are empty.

Can someone who successfully add metadata on document help me?Please.
Do i need to configure some other file,what is with web-framework-config-custom.xml.i don't know what i should put in this file,is there some example for me.
In Alfresco in web-client-config-custom.xml i add my metadata to be seen in client.I know the web-framework-config-custom.xml.is for share to add metadata to be seen,but i can't find no example to see how is right.

Need help.