cancel
Showing results for 
Search instead for 
Did you mean: 

IWDPageService return empty iView

Former Member
0 Kudos

Greetings,

I have WebDynPro Java iView and a non-WebDynPro iView that is attached a portal page. In the the WebDyn Pro Java iView, I have tried execute code to call portal service (page service) in order to get information of how many visible iView in the particular portal page and try to hide the non-WebDynPro iView from the portal page.

Problem:

After the execute the code below, the iView name array contains nothing (length equals to zero). I expected the length be 2 (as it contains 2 iView).

IWDPageService pageService = (IWDPageService)
		WDPortalUtils.getService(WDPortalServiceType.PAGE_SERVICE);
		
	if (pageService!=null){	
		// String array receives iView names
		String[] iViews = pageService.getVisibleIViews();
	
                *// iViews length is 0*
		if (iViews!=null){
                        pageService.hideIView("Details");
		}
	}

Note:

Sharing reference for page service is not set in the WebDynPro component as written in the SAP article.

http://help.sap.com/saphelp_nw2004s/helpdata/en/d2/0357425e060d53e10000000a155106/content.htm

I would like to know why does this happen.

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member192434
Active Contributor
0 Kudos
Former Member
0 Kudos

Your help is really appreciated. However, the links given does not solve my problem because

i) The web dynpro application, non web dynpro application and portal are running in same machine.

ii) The version of SAP Netweaver Portal is version 7

iii) As instructed by SAP, I can ignore the step to set the sharing reference in the web dynpro component.

Since all the IViews are already preset into a page as delta link, I don't see any reason that I cannot obtain all the iviews name that are visible to that portal page via the code below:

IWDPageService pageService = (IWDPageService)

WDPortalUtils.getService(WDPortalServiceType.PAGE_SERVICE);

String[] iViews = pageService.getVisibleIViews();

// iViews length equals to 0 eventhough there are two iviews attached and showed on the page