on 2006 May 26 10:38 AM
Hi, is possible to read the properties of iviews from the layout?
I am trying to develope a own tray for the iviews of my portal, where on the righ hand of the try I will show a link with a specific url. For that I have created my own layout, there I can reference to the iview title with the layout tag library, but I want read properties of the iview to buil the url of the link. Is possible?
Thanks in advanced.
Regards.
Hi Optima,
it is possible to read the properties of IViews please have a look on the codes, I use these codes to get read properties.
Hashtable env = new Hashtable();
try {
env.put(Context.INITIAL_CONTEXT_FACTORY, IPcdContext.PCD_INITIAL_CONTEXT_FACTORY);
env.put(Context.SECURITY_PRINCIPAL, WDClientUser.getCurrentUser().getSAPUser());
env.put(Constants.REQUESTED_ASPECT, PcmConstants.ASPECT_SEMANTICS);
InitialContext ic = new InitialContext(env);
IiView result = (IiView) ic.lookup(Path);
Enumeration eN = result.getAttributeIds();
while (eN.hasMoreElements()) {
}
}
catch()
{
}
Regards
Yasir Noman
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, thanks for the code, I want to use the code in my own layout in a jsp page, some questions:
- What references are needed to use the code? Context,WDClientUser...
- Finally How do I get the property "eN????"?
- How I know the name of the property? perhaps something like "com.sap.portal.pcm.Title".
Thanks again.
REGARDS.
you do not need WDClientUser you need if you are working with Web Dynpro, please use request.getUser() instead.
you need to look at the properties of the ivew in the portal there you will find property name and id.
use this id to look, please have a look on this link
http://help.sap.com/saphelp_nw04/helpdata/de/e6/e8a04267deb211e10000000a155106/frameset.htm
you need com.sap.portal.ivs.api_iview_api.jar, com.sap.portal.ivs.iviewservice_api.jar, com.sap.portal.pcm.admin.apiservice_api.jar and prtjndisupport.jar.
Regards
Yasir Noman
User | Count |
---|---|
73 | |
10 | |
8 | |
7 | |
7 | |
6 | |
6 | |
6 | |
6 | |
6 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.