Feb 26, 2014, 2:02 PM
[CLOSED] Info/Suggestion on ExtJS listener exception management and client page/event lifetyme
Hello,
I am experiencing the following behavior of the listeners, and I would like to understand better if we're doing it wrong or if this is by "design".
See the attached script.
Let's assume the following:
- we have a complex page that dynamically loads different parts through AJAX (modules) PartialViewResults,
- suppose we would like to track the "added" event of the container itself (a subclasses Panel).
- the function attached on the "added" listener breaks for some unhandled exception
I verified that the behavior on the page is absolutely unexpected. The complete page composition is broken (nothing is displayed).
It seems that firing listeners, when exceptions aren't managed with a try/catch block... it breaks the entire rendering/layout logic...
Is there any workaround apart adding a try/catch to any listener implementation? I am concerned about breaking an entire portal when a single module throws an exception in one of its handlers.
Thank you!
I am experiencing the following behavior of the listeners, and I would like to understand better if we're doing it wrong or if this is by "design".
See the attached script.
Let's assume the following:
- we have a complex page that dynamically loads different parts through AJAX (modules) PartialViewResults,
- suppose we would like to track the "added" event of the container itself (a subclasses Panel).
- the function attached on the "added" listener breaks for some unhandled exception
I verified that the behavior on the page is absolutely unexpected. The complete page composition is broken (nothing is displayed).
It seems that firing listeners, when exceptions aren't managed with a try/catch block... it breaks the entire rendering/layout logic...
Is there any workaround apart adding a try/catch to any listener implementation? I am concerned about breaking an entire portal when a single module throws an exception in one of its handlers.
Thank you!
Last edited by Daniil; Mar 11, 2014 at 6:38 AM.
Reason: [CLOSED]