cancel
Showing results for 
Search instead for 
Did you mean: 

why Window doesn't appear back ???

Former Member
0 Kudos

Hi

Experts


//get the repository content at runtime of the Web-Dynpro-
// Window “AddressbookWindow”
IWDWindowInfo windowInfo = (IWDWindowInfo)wdComponentAPI
.getComponentInfo()
.findInWindows("AddressbookWindow");
//create the “AddressbookWindow”
IWDWindow window = wdComponentAPI.getWindowManager()
.createWindow( windowInfo, true);
//set the WindowPosition on the screen
window.setWindowPosition(300, 150);
//and show the window
window.open();
// Save WindowInstance in Context
wdContext.currentPopupElement().setWindowInstance(window);

here at saving time i get an error that is

java.lang.NullPnterException

So At present what i do is i write window variable here instread of storing it to context

//@@begin others

IWDWindow window;

//@@end

(Problem & Process Is explained below please try to help me)

Actually what happens is it finds the addressbook window from repository

but when coming back to original window it just display blank screen.

I make one mail window and one addressbook window.

If someone clink on addressbook on to option of mail window,

one small adressbook window get opend.

and when on adressbook window anyone click on button

it fires one event that is in component controller.

and i make it's event handler in the email window.

But problem is that at returning time it just give me blank screen.

Thanking you.

Sunny.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Sunny,

In your first view (ie. email view) are you getting the instance of the window and then closing it.

IWDWindow window = wdContext.currentContextElement().getWindowInstance();

window.close();

If this is the thing you are doing then I think you are doing what is required.

Regards,

Murtuza

Former Member
0 Kudos

Hi

Murtuza

i am not closing it.

I am just leaving it open.

Actually i am following .<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/42af9f90-0201-0010-6099-ba67e5426bdf">Tutorial</a> from sdn

Because Same thig i need to implement in my project.

Thanking You

Sunny Shah

Former Member
0 Kudos

Hi Sunny,

I think the AddressWindow needs to be closed to get back the parent window.

Just try closing it. I am not sure can you work on the parent window and the pop up window opened upon it.

Regards,

Murtuza

Former Member
0 Kudos

Hi

Murtuza

i am not closing it.

I am just leaving it open.

Actually i am following .<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/42af9f90-0201-0010-6099-ba67e5426bdf">Tutorial</a> from sdn

Because Same thig i need to implement in my project.

Thanking You

Sunny Shah

sridhar_k2
Active Contributor
0 Kudos

Sunny,

When you come back from Address Window to your Mail Window, close address window instance like this.

IWDWindow thisWindow = wdThis.wdGetTestController().wdGetContext()

.currentContextElement().getSearchAddressPopUp();

wdThis.wdGetTestController().wdGetContext()

.currentContextElement().setSearchAddressPopUp(null);

//instance closing

thisWindow.destroyInstance();

After this, call fire plug to Mail Window.

Regards,

Sridhar

Former Member
0 Kudos

Hi

Sridhar

Can i mail you my project(gmail).

Will you please find error from it?

Thanking You

Sunny Shah.

sridhar_k2
Active Contributor
0 Kudos

I mailed project to your mail id.

Created one Controller context variable (type - com.sap.tc.webdynpro.services.session.api.IWDWindow) and mapped it to both views.

From Source view, i am calling on select on button this logic.

IWDWindowInfo windowInfo = (IWDWindowInfo) wdComponentAPI.getComponentInfo().findInWindows("PopupWindow");

IWDWindow popupWin = wdComponentAPI.getWindowManager().createModalWindow(windowInfo);

popupWin.setWindowPosition(300, 350);

popupWin.setWindowSize(100,100);

popupWin.setTitle("Search Popup");

wdThis.wdGetPopupCompController().wdGetContext()

.currentContextElement().setSearchPopup(popupWin);

popupWin.show();

"PopupWindow" - is popup window name.

From Popup view Back Button, use this logic.

IWDWindow thisWindow = wdThis.wdGetPopupCompController().wdGetContext().currentContextElement().getSearchPopup();

thisWindow.destroyInstance();

//closing the popup window

Hope it is working for you.

Regards,

Sridhar

Former Member
0 Kudos

Hi

Experts

Problem Get solved

I made one mistake in coding i get and and solve it.

Thanks

Sunny.

Answers (0)