on 09-02-2010 1:06 PM
Hi experts ,
I am accessing file from KM folder and showing thru String Path as shown below in the code :
try
{
//wdContext.currentContextElement().setCurrentpath("/documents/PublicDocuments/SHAZ/TamilNadu.xls");
wdContext.currentContextElement().setCurrentpath("/documents");
//LoadContent();
KMrep( );
wdComponentAPI.getMessageManager().reportWarning("KM Folder");
}
catch(Exception e)
{
wdComponentAPI.getMessageManager().reportWarning("Problem in getting KM Folder");
}
try{
IWDClientUser wduser= WDClientUser.getCurrentUser();
IUser usr = wduser.getSAPUser();
com.sapportals.portal.security.usermanagement.IUser epusr = WPUMFactory.getUserFactory().getEP5User(usr);
ResourceContext ctx = new ResourceContext(epusr);
RID parent = RID.getRID(wdContext.currentContextElement().getCurrentpath());
RID child = null;
child = RID.getRID( parent.getPath() + "/DhoniSahrukh.jpg");
com.sapportals.wcm.repository.IResource resource = com.sapportals.wcm.repository.ResourceFactory.getInstance().getResource(parent,ctx);
String CompPath = "http://epqas:50000/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs" + child.getPath();
IWDWindow openwin = wdComponentAPI.getWindowManager().createExternalWindow(CompPath, "Resume", true);
// IWDWindow openInwin = wdComponentAPI.getWindowManager().createWindow(CompPath);
openwin.open();
The given File is getting access , but the file is running in external window not in the view.
Can anyone pl. guide how to display the KM folder file in View Assembly rather External Window.
Regards:
Hanif
try
{
wdContext.currentContextElement().setCurrentpath("/documents");
}
catch(Exception e)
{
wdComponentAPI.getMessageManager().reportWarning("Problem in getting KM Folder");
}
try
{
IWDClientUser wduser= WDClientUser.getCurrentUser();
IUser usr = wduser.getSAPUser();
com.sapportals.portal.security.usermanagement.IUser epusr = WPUMFactory.getUserFactory().getEP5User(usr);
ResourceContext ctx = new ResourceContext(epusr);
RID parent = RID.getRID(wdContext.currentContextElement().getCurrentpath());
RID child = null;
child = RID.getRID( parent.getPath() + "/DhoniSahrukh.jpg");
com.sapportals.wcm.repository.IResource resource = com.sapportals.wcm.repository.ResourceFactory.getInstance().getResource(parent,ctx);
String CompPath = "http://epqas:50000/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs" + child.getPath();
IWDWindow openwin = wdComponentAPI.getWindowManager().createExternalWindow(CompPath, "Resume", true);
openwin.open();
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please use tags when posting code.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
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.