on 11-22-2007 8:10 AM
Hello all,
I need to implement a direct link to "Add to portal favorites" KM UI from HTMLb portal application.
Another words - after pressing a specific button in HTMLb portal application, "Add to portal favorites" KM UI has to be displayed directly in new browser window.
(This should be done in one step - without loading of KM details or something else the first. Instead of it, we need to emulate KM command "Add to portal favorites" from our application)
The questions:
- Whether it is possible at all or not?
- If yes, would you be able to suggest or point me in a right direction in regards to the implementation of this topic, or to provide some snippet of Java code?
Any help would be greatly appreciated!
Kind regards,
George
Hi George,
sorry, but I have no idea what you are talking about. What do you mean with "Add to portal favorites" KM UI?
What do you want to add? A portal page? A KM resource?
Please describe your issue in more details and maybe find two or three words about the business case.
Greetings,
Carsten
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Carsten,
Thank you a lot for quick answer.
This is no issue, but attempt to usage of functionality, provided by KM.
As you know, KM provides a number of functions for a specified resource, e.g. - "Add to Portal Favorites".
For calling of it from KM browser, it is necessary to view details of resource and choose Actions -> Add to Portal Favorites...
After this apropriated UI is being shown (but in context of details window).
I'm developing a portal application, that maintains documents, physically represented as KM resources.
Application provides some operations with selected document, e.g. - Addition to portal favorites.
And my task - just to show "Add to Portal Favorites" KM UI as responce on click on my own button.
This menu should be displayed as "pure" content WITHOUT other KM controls.
I suspect that KM iview com.sap.km.cm.command can be used for this, but have no idea-which parameter can be set for execution of command, necessary for me.
Kind regards,
George
Hi George,
now I understand. Ok, here's what I think:
- there is a command that allows you to add resource to portal favourites. Normally this command is displayed as menu entry in the details view. But with some minor configuration changes, it is possible to put the command directly in the command flyout of KM browser.
- this command is implementing the ICommand Interface. The Interface is quite simple, so the implementation shouldn't be too complex.
- May you should take a look at the class that implements the "add to favourite command" and reuse the implementation for your portal application.
- Are you using KM resource objects within your application? Or do you have at least the RID of the documents? If yes, it shouldn't be a problem.
- I will take a look at the implementation (and maybe I can give some more hints) when my portal is up and running again ;o)
HTH,
Carsten
ok, this one was easy to find ;o)
If you check out
System Administration -> System Configuration -> Knowledge Mgmt. -> Content Mgmt. -> User Interfaces -> Commands -> UI Commands
you'll find the command I was searching for at very first place.
It is implemented by
com.sapportals.wcm.rendering.uicommand.cm.UIAddToFavoritesRootCommand.java
which is stored in
/usr/sap/<SID>/JC<ID>/j2ee/cluster/serverX/apps/sap.com/irj/servlet_jsp/irj/root/WEB-INF/portal/portalapps/com.sap.km.cm.ui.flex/private/lib/km.appl.ui.flex.uicommand_core.jar
Just decompile and taka a look at the coding.
HTH,
Carsten
Hi George,
this should be my last post on this thread...
As I looked into the coding of the previously mentioned command I found out (and to be honest, I knew before but seemed to be some kind of confused) that the portal favourites are nothing else than entries (internal links) in the KM repository called /userhome.
So just create a new resource link in the corresponding "Favourites" folder.
Please tell if it works.
Greetings,
Carsten
Hello Carsten,
First of all - thank you a lot for your support!!
But my task - just to try to get access from our custom HTMLb application to existing KM form "Add to Portal Favorites" (in order to allow user to append his KM document in portal favorites manually).
Obligatory requirements -
1) The form should be standard, providing by KM;
2) Should appear in new window directly after click on link from my application
3) Should appear without any other KM functionality.
Another words - the logic I'm trying to implement: My application should have a link, where "href" or "onClick" parameter redirects to some KM iView, that implements pure "Add to Portal Favorites".
Unfortunately I didn't find solution so far... There are many KM iViews, but seems nothing provides desired functionality directly.
I think - may be decision would be - to access com.sap.km.cm.uidetails and immediately redirect to "Add to Portal Favorites" pane by Javascript somehow...
May be you can suggest something?
If you used to implement something similar, may I kindly ask you to give me some snippet of Java code?
Kind regards,
George
Hi George,
sometimes it needs some time to understand... But I think I got it now.
What you want is a (the) standard portal application that:
1. shows the UI for bookmarking resources
2. can be launched by URL in a seperat browser window
3. can be called with parameters to set
a) user (maybe the SSO-ticket in your session helps)
b) rid of document that should be bookmarked
Sorry, as far as I know this kind of application does not exist.
But: if you have a HTMLB application (as long as it is an abstract portal component written in Java and not a BSP application) it is very easy to implement the required small form to bookmark documents.
I suggest: forget about the standard details-iView and use KM API to create an internal link within your users "favourites" folder. This should be a no-brainer with less than 20 lines of code.
HTH,
Carsten
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.