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
}