Hello,
I'm trying to use the error handling mechanism using com.backbase.bjsf.ERROR_HANDLER parameter in web.xml. I've defined my own method and it fits the requirements. In this method I'm creating a "serverdelta" to change a component innerHTML.
When an exception is thrown, it is captured and the code in my method is executed, but I get this error in the browser.
1: failed "http://localhost:8080/siniestros/pages/wtw/workplace/wtwInicio.jsf" status=500
This is the error handler method:
public static void errorHandler(String message, Throwable throwable) throws Throwable
{
BackbaseContext context = BackbaseContext.getCurrentInstance();
UIBackbaseOutputText destComp =
(UIBackbaseOutputText)ComponentUtils.findComponent(
context.getViewRoot(),
"wtwPrincipalS:login_page:login_form:wtw_messages_output");
String clientId = destComp.getClientId(FacesContext.getCurrentInstance());
String command = "var oGrid = document.getElementById('"+ clientId +"');oGrid.innerHTML='¡¡¡¡ERROR!!!!';";
DeltaActionJavaScript jsAction = new DeltaActionJavaScript(destComp, command);
context.addDeltaAction(jsAction);
return;
}
{
BackbaseContext context = BackbaseContext.getCurrentInstance();
UIBackbaseOutputText destComp =
(UIBackbaseOutputText)ComponentUtils.findComponent(
context.getViewRoot(),
"wtwPrincipalS:login_page:login_form:wtw_messages_output");
String clientId = destComp.getClientId(FacesContext.getCurrentInstance());
String command = "var oGrid = document.getElementById('"+ clientId +"');oGrid.innerHTML='¡¡¡¡ERROR!!!!';";
DeltaActionJavaScript jsAction = new DeltaActionJavaScript(destComp, command);
context.addDeltaAction(jsAction);
return;
}
I've tested this code in a backing bean and it works perfectly. ¿Why it doesn't work in the error handler?
Thanks

Is anybody there? Could you
12 May, 2008 - 10:06 — DavidIs anybody there?
Could you check this issue, please?
Thanks and kind regards.
David
Hi David, First of all,
15 May, 2008 - 17:05 — AlexanderHi David,
First of all, thank you for your feedback. After creating a test case and investigating your snippet we found out that it is an issue. We added the problem in our bug tracking system. I'm sorry for the inconvenience.
Kind regards
Alexander
Thank you, Alexander. If I
16 May, 2008 - 10:25 — DavidThank you, Alexander.
If I could help you to fix it, please let me know.
And in any case, if you could give me some kind of workaround I would be grateful to you.
Kind regards.
David
On this moment we do not
16 May, 2008 - 13:51 — AlexanderOn this moment we do not have a workaround, it requires more investigation.
If we find one it will be posted here.
Alexander