cancel
Showing results for 
Search instead for 
Did you mean: 

nwdi-managed access of pcd-objects from java web dynpro

Former Member
0 Kudos

Hi,

im am trying to access portal pcd-objects from a java web dynpro component (namely getting and setting personalized iview properties). for locally managed web dynpro components this works fine with the code below.

when i try the same with a nwdi managed web dynpro component i run into problems regarding references to used dcs. for instance, i need to reference used dc SAP_JTECHS/tc/epbc/pcm/adminapi/java because the build needs tcepbcpcmadminapijava.jar which is inside the mentioned dc. but access permissions of this dc don't allow the dependency. when i try to "add used dc ..." in nwds i get the error message: illegal dependency: access list does not allow use of ...

has someone any solution for this problem? are there other ways of accessing pcd-objects from java web dynpro (nwdi managed!)?

thanks

heiko

private static void savePersonalizationData(String value) {

try {

IAttributeSet attributeSet = (IAttributeSet) getIview(IVIEW);

attributeSet.putAttribute(ATTRIBUTE, value);

attributeSet.save();

} catch (Exception e) {

// ...

}

}

private static Object getIview(String pcdPath) throws Exception {

Hashtable env = new Hashtable();

env.put(

com.sap.portal.directory.Constants.REQUESTED_ASPECT,

com.sap.portal.pcm.admin.PcmConstants.ASPECT_SEMANTICS);

env.put(

Context.SECURITY_PRINCIPAL,

WDClientUser.getCurrentUser().getSAPUser());

env.put(

IPcdContext.PCD_PERSONALIZATION_PRINCIPAL,

WDClientUser.getCurrentUser().getSAPUser());

InitialContext iCtx = new InitialContext(env);

return iCtx.lookup(pcdPath);

}

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Kust,

To access the PCD objects the code you used looks ok for me but your main issues is related to the dc access permissions. This thread discussed about the similar issue. Please review this below thread.

/message/979328#979328 [original link is broken]

Regards

Krishna Reddy