on 04-10-2007 1:31 PM
Hi,
I was just following the Help Document - '<i><b>Using Knowledge Management Functionality in Web Dynpro Applications</b></i>'. Everything work fine. I am able to navigate the Folder structure in KM. Now I am trying to give one more link in the Table which will launch the document and enable the user to view the contents of the documents. Can anyone help me out on how we can generate a link that will open up the referred KM Docs.
Regards
Murali
Hi,
Do the steps as given:
1 Create TableCellEditor of type LinkToAction.
2 onAction of the element create an Action, say ReadObj
3 Then write following code:
wdContext.currentContextElement().setCtx_va_path("/documents/<ur folder name>");
try {
ResourceContext ctx = new ResourceContext(usrEP5);
RID parent = RID.getRID(wdContext.currentContextElement().getCtx_va_path());
RID child = null;
child = RID.getRID( parent.getPath() + "/" + wdContext.currentCtx_vn_ResultElement().getCtx_va_object());
IResource res = ResourceFactory.getInstance().getResource(parent, ctx);
String CompPath = "http://<host>:<port>/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs" + child.getPath();
IWDWindow openwin = wdComponentAPI.getWindowManager).createExternalWindow(CompPath, "Resume", true);
openwin.open();
} catch (ResourceException e) {
// TODO Auto-generated catch block
e.printStackTrace();
wdComponentAPI.getMessageManager().reportException("Resource Exception : " + e.getLocalizedMessage(),true);
}
This will open the documet in new window and you can see the contents of it.
Hope it helps.
Regards:
Abhinav Sharma
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.