cancel
Showing results for 
Search instead for 
Did you mean: 

Replace an iView dynamically by another one by portal navigating service

Former Member
0 Kudos

Hi all,

A portal page to integrate several kinds of contents is in general the best way.

But how can you handle dynamic replacement of an iView of a page (the page contains more than one iView) by another one by using the Portal navigation service of the WebDynpro Runtime? If I navigate to the target application with mode WDPortalNavigationMode.SHOW_INPLACE, the content of the page at all is replaced by the target iView. Is there a possibility to access/replace only the desired iView of the page?

Thanks.

Cemal

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Really would like to knwo this too

My current code is :

EPCM.doNavigate('IVIEWS://portal_content/STIBMIVB/com.stibmivb.SPC_F_Communication/SPC_F_IViews/SPC_I_Content',0);

Former Member
0 Kudos

Hi Laurent,

this is no possible with WebDynpro except the IFRAME - UI - Element of the webdynpro. But the iframe ui-element is declared as deprecated for future releases.

The solution is a portal component with an embedded html-iframe. The src - attribute of this iframe can be filled dynamically by the portal eventing.

You create a dynpage as a event receiver. This fills the src-attribute of the html-iframe by the event param dataObject.

The code below can help you:

/**

  • Create output. Called once per request.

*/

public void doProcessBeforeOutput() throws PageException {

Form myForm = this.getForm(); // get the form from DynPage

IPortalComponentRequest request = (IPortalComponentRequest)this.getPageContext().getRequest();

String Output =

"<iframe id='LauncheriFrame' src='' width='100%' height='100%' margin='0' padding='0' frameBorder='0'></iframe>"

+ "<script>"

+ "function <eventhandler>(eventObj){"

+"document.getElementById('LauncheriFrame').src = eventObj.dataObject;"

+ "}"

+ "EPCM.subscribeEvent('<namespace>', '<Eventname>', <eventhandler>);</script>";

this.getPageContext().write(Output);

}

I hope that helps you.

Cemal