cancel
Showing results for 
Search instead for 
Did you mean: 

Confirmation dialog not showing

Former Member
0 Kudos

Hi!!!

I have some confirmation dialogs already working, but one of them doesn't show and the application stops with the loading clock spining.

I the view i have a button with an associated event (onActionGuardarSolicitud). This event handler calls another event handler called onActionConfirmarSolaparViaje(wdEvent); This second is the one that invokes the dialog that is not showing.

I also have a class which has the texts inside called Mensajes.java

Does anyone have an idea why it's not working?

Thanks a lot!!

-


my code to show the dialog is as follows:

public void onActionGuardarSolicitud(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )

{

//@@begin onActionGuardarSolicitud(ServerEvent)

//wdThis.wdGetDatosGeneralesController().recalcularAnticipos();

boolean ok = true;

ok &= checkFields();

ok &= wdThis.wdGetDatosGeneralesController().determinarViajeSolapa();

if (ok && wdContext.currentSolicitudesViajeElement().getSolapa()) {

onActionConfirmarSolaparViaje(wdEvent);

} else if (ok && !wdContext.currentSolicitudesViajeElement().getSolapa()) {

wdThis.wdGetDatosGeneralesController().trimTablaOtrosDestinos();

wdThis.wdGetDatosGeneralesController().guardarSolicitudViaje();

wdThis.wdGetDatosGeneralesController().completarTablaOtrosDestinos();

}

//@@end

}

public void onActionConfirmarSolaparViaje(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )

{

//@@begin onActionConfirmarSolaparViaje(ServerEvent)

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

String dialogText = Mensajes.SOLAPAR_VIAJE;

IWDConfirmationDialog dialog =

wdComponentAPI.getWindowManager().createConfirmationWindow(

dialogText,

controllerInfo.findInEventHandlers("onActionConfirmarSolaparViajeSi"),

Mensajes.SOLAPAR_VIAJE_SI);

dialog.addChoice(

controllerInfo.findInEventHandlers("onActionConfirmarSolaparViajeNo"),

Mensajes.SOLAPAR_VIAJE_NO);

dialog.show();

//@@end

}

public void onActionConfirmarSolaparViajeSi(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )

{

//@@begin onActionConfirmarSolaparViajeSi(ServerEvent)

//(some code here)

//@@end

}

public void onActionConfirmarSolaparViajeNo(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )

{

//@@begin onActionConfirmarSolaparViajeNo(ServerEvent)

//No hace nada

//@@end

}

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Have you tried debugging to see if the second event is called?

Aviad

Former Member
0 Kudos

Yeah, it's called and it stops working on dialog.show().

Former Member
0 Kudos

Hi Alenjandro,

Now it seems that it stops because of some code in WDDoModifyView(). Please copy your WDDoModifyView() code over here so that we can get some hint.

Regards,

Murtuza

Former Member
0 Kudos

> Yeah, it's called and it stops working on

> dialog.show().

Have you checked if <dialog> is instaniated ok?

If it has all actions assigned to it?

Aviad

Answers (5)

Answers (5)

Former Member
0 Kudos

Thanks to all.

The problem was another one... I had another event that implied a change in the view and apparently this was causing a conflict. I deleted the fireEvent and the poblems was solved.

Anyway, does enayone know why was the problem generated for?

Thanks!!

Former Member
0 Kudos

I think I got the reason... there was another event that changed the view design. What I think is that the threads blocked each other, so the application kind of stopped in a infinite cycle.

Former Member
0 Kudos

hi

u had written .............dialog.show().

insted of try dialog.open().

as ur error is coming in that line......try this it may work

with regards

Former Member
0 Kudos

Hi,

Check with the String Dialog Text that you are passing.probably its trying to find that .java class and taking time to open.

-np

Former Member
0 Kudos

Hi Alejandro,

Goto Methods tab and say new and select eventhandler and create this two new eventhandlers onActionConfirmarSolaparViajeSi and onActionConfirmarSolaparViajeNo. Right now you are creating an action and these are the default event handlers created for them.

Just give it a try.

Regards,

Murtuza

Former Member
0 Kudos

The methods exist already! However I tried to create them againg but it didn't work

Former Member
0 Kudos

Hi Alejandro,

Try writing the code of your second event that opens a dialog box in the first event that is fired on the click of a button itself.

Regards,

Murtuza

Former Member
0 Kudos

Thanks a lot for the idea!! However it didn't solved the problem!

Any other ideas? Is there any prerequisite to use the confirmation dialog box?

Thanks!!