cancel
Showing results for 
Search instead for 
Did you mean: 

retreive document's properties in collabroation room

Former Member
0 Kudos

Hi everyone, I have a few documents in a collaboration room. I need to retrieve the document's author, size, date etc into a string array when I click the document's drop down list box. Can you give me some hints how to implement it. The issue is,I think, how to dynamically identify the document I am selecting. Thanks for early reply.

BR.

Wang

Accepted Solutions (1)

Accepted Solutions (1)

detlev_beutner
Active Contributor
0 Kudos

Hi Wang,

first, the forum is wrong, it would fit into the KMC forum. Doesn't matter.

Accessing documents (document properties) within a collab room doesn't differ from accessing them from any other KM repository, see http://devnetmedia.sap.com/html/submitted_docs/knowledgemanagement/com/sapportals/wcm/repository/IRe...

> the document's drop down list box

Sorry, I don't know of which box you are talking?!

Hope it helps nevertheless

Detlev

Former Member
0 Kudos

Hi, Detlev, thanks for reply. In a collaboration room there is Overview, Documents. Discussion on the right column if some documents have been uploaded in the room and click Documents the document's names can be displayed.

If click the icon at the end of the name there will be a dropdown list (it is not dropdown list box, I do not know what it is called ) and user can copy, move, rename, .... Details. That is the component I am talking about.

BR.

Wang

detlev_beutner
Active Contributor
0 Kudos

Hi Wang,

that is the hover menu for encapsulating commands (Copy, Move, Rename are commands). One of these commands is "Details", from which the Details iView is called. Here you can see the documents properties.

So what do you want to have where? Even in the documents iView you could render these properties (just use the right resource renderer and set in the properties in question).

Hope it helps

Detlev

Former Member
0 Kudos

Hi Delev thanks for reply. In the hover menu we add a customer command under Details. When a user clicks this command it will execute a application that retrieves the document's author, size, type etc into a string array. In order to retrieve these values I need to define a IResource's instance. How can I dynamically get the current document (IResource)'s reference, or document's ID or its path or RID in the implementation ? Thanks for help.

Best regards.

Wang

detlev_beutner
Active Contributor
0 Kudos

Hi Wang,

in general, to find out such things, it is advisable to decompile equivalent commands and look into them how they do - by this, you won't get only the knowledge needed but also often hints and tricks how to implement the desired functionality in a more or less elegant way.

In this case, you'll extend AbstractUICommand, and within this, the following method will set the resource for which the command is called:

public void setTargetParameters(List values, IResourceContext context)
    throws WcmException {
  this.values = values;
  super.context = context;
}

From these two params you will get the resource, commands of the details iView for example often use <i>super.resource = createResource((String)values.get(0));</i> to get the resource. Just look around!

Hope it helps

Detlev

Former Member
0 Kudos

Hi Detlev, thanks a lot for your reply. I am very glad to get the answers from this forum. It is a great help.

BR.

Wang

Answers (0)