cancel
Showing results for 
Search instead for 
Did you mean: 

read properties ivews from layout

Former Member
0 Kudos
62

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.

View Entire Topic
0 Kudos

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

Former Member
0 Kudos

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.

0 Kudos

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

Former Member
0 Kudos

Hi again, I am using the code to create a own layout for a own tray of the iviews; for that I am not reading a specific iview, in the code "IiView result = (IiView) ic.lookup(Path)" the path I do not know, I would put the actual iview.

Any idea?

Regards.