cancel
Showing results for 
Search instead for 
Did you mean: 

Question about https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/7143

Former Member
0 Kudos

Hello!

This blog explains a method how to start an application in external window.

/people/community.user/blog/2007/08/20/open-views-in-non-modal-external-windows--the-patch-version

The problem what I am having is I dont understand the part with

//let's say the value node Table needs to be mapped

ContextMapper.newInstance().setSupplier(wdContext.nodeTable());

//any time after this the external window can be oopened

and

//This view has also has a value node called Table which contains identically named attributes

ContextMapper.newInstance().map(wdContext.nodeTable());

Suppose I have the applications view what I want to start an secondly the extrnalview.

Where have these above shown coding parts be implemented exactly in my

view and external window. I have already added the ContextMapper class into "src/packages"

path.

Thanks

sas

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

ContextMapper.newInstance().setSupplier(wdContext.nodeTable());

has to be given in the openExternalWindow method before the code

try {

String appUrl = WDURLGenerator.getWorkloadBalancedApplicationURL(wdComponentAPI.getApplication().getDeployableObjectPart());

appUrl = appUrl.concat("?isInExternal=X");

wdComponentAPI.getWindowManager().createNonModalExternalWindow(appUrl,"External").show();

} catch (WDURLException e) {

// TODO Auto-generated catch block

e.printStackTrace();

}

and

ContextMapper.newInstance().map(wdContext.nodeTable());

has to be given in the doInit method of the secondview(view which you want to open in the new window)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi All,

Is there any other way to map the contexts without using the steps of this blog or any other way to pass the context data from View1 to View 2 ?

Former Member
0 Kudos

Hi,

Based on the blog

Let's say we have two views "FirstView" and "SecondView". Firstview is the one which loads by default and when we run in the external window, SecondView is loaded.

FirstView uses the context mapper class like the following:

//let's say the value node Table needs to be mapped

ContextMapper.newInstance().setSupplier(wdContext.nodeTable());

//any time after this the external window can be oopened

Above code is used to store the contextnode("nodeTable") as part of an instance variable("supplier") of Contextmapper class.

SecondView uses the context mapper like this:

//This view has also has a value node called Table which contains identically named attributes

ContextMapper.newInstance().map(wdContext.nodeTable());

Here, previously stored values are restored to the node passed as parameter.

Regards

Ayyapparaj

Former Member
0 Kudos

hi,

really no idea pls help its important!

regards

erdem