cancel
Showing results for 
Search instead for 
Did you mean: 

popup usage in wdDoBeforeNavigation

former_member190457
Contributor
0 Kudos

Hi everybody,

as per WDJ best practice, I want to centralize error and UI message handling in the wdDoBeforeNavigation of the root component controller.

In my project error handling mandatorily includes popup messages. When I try to open a popup in the wdDoBeforeNavigation I get:

com.sap.tc.webdynpro.services.exceptions.WDRuntimeException: There must be something wrong, phaseLoopCounter: 21 

Can anyone please explain this error and/or suggest a different approach?

Thanks, points will be awarded, Vincenzo

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi!

please refer this thread

Edited by: Vishal Anand on Oct 15, 2008 11:39 AM

former_member190457
Contributor
0 Kudos

hi thanks for your reply.

I have no handlers, I am using the following code:


IWDWindowInfo winInfo = wdComponentAPI.getComponentInfo().findInWindows("DummyPopup");
IWDWindow popUpWindow = wdComponentAPI.getWindowManager().createModalWindow(winInfo);
popUpWindow.setWindowPosition(WDWindowPos.CENTER);
popUpWindow.setTitle("hello");
popUpWindow.show();

I tried to move the same code in wdDoPostProcessing but the same happens.

Unlike the post you mention, actually popups aren't displayed at all.

any suggestion?

thanks, Vincenzo

Edited by: VINCENZO TURCO on Oct 15, 2008 12:04 PM

Former Member
0 Kudos

hi!

instead of creating modal window try with other windows like confirmation window .

you can use this kind of code as it is been done for save .

IWDControllerInfo cntrl_info = wdControllerAPI.getViewInfo().getViewController();

IWDConfirmationDialog confirm = wdComponentAPI.getWindowManager().createConfirmationWindow("data saved", cntrl_info.findInEventHandlers("save"),"save");

confirm.addChoice(cntrl_info.findInEventHandlers"ok"),"Confirm");

confirm.setWindowSize(250,100); confirm.setWindowPosition(100,100);

confirm.show();

former_member190457
Contributor
0 Kudos

Hi thanks for your prompt reply

However, the code you mention can be executed only in a view controller.

On the other hand, view controllers don't have the wdDoBeforeNavigation method.

I would like to use view-based popups as they are much more powerful and can display also warning/error/success images.

Thanks, vincenzo

Answers (2)

Answers (2)

former_member190457
Contributor
0 Kudos

Actually there was a subtler problem.

The popup was triggered if an instance variable was not null, starting a nested ("recursive") phase model execution.

The instance variable was not reset after the first execution and so an infinite recursion would take place.

Thanks, regards

Vincenzo

Former Member
0 Kudos

Hi,

Try this code

IWDWindowInfo winInfo = wdComponentAPI.getComponentInfo().findInWindows("DummyPopup");

IWDWindow popUpWindow = wdComponentAPI.getWindowManager().createModalWindow(winInfo);

popUpWindow.setWindowPosition(300,300);

popUpWindow.setTitle("hello");

popUpWindow.show();

Regards,

Sunaina Reddy T