on 09-03-2007 10:36 PM
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
}
Hi,
Have you tried debugging to see if the second event is called?
Aviad
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.