Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Error Handler in page Fragment render response

santiago_ncJun 13 2016 — edited Jun 14 2016

I want to add a global error handler for Bounded TaskFlows which is page fragments based, to prevent runtime exception for common runtime errors (NullPointerException)

In this case, I will redirect the page Fragment to error pageFragment activity.

To test the Error Handler i put in a managed bean a get method with:

public String getValueFireNullPonterException() {

  List<String> list = null;

  System.out.println("Element: "+list.get(0));

  return "ERROR";

}

Which is referenced in a inputText:

<af:inputText label="Getter error NullPointer"

  value="#{backingBeanScope.testPageFragmentBean.valueFireNullPonterException}" id="it6"/>

PS: Another test is with f:event of prerenderComponent.

I have checked this post already:

Bounded Taskflow Exception Handler not working with Page Fragements

I have tried with declarative component but I couldn't catch the exception.

https://blogs.oracle.com/jdevotnharvest/entry/extending_the_adf_controller_exception_handler

If I extends Adf Controller Exception Handler, is too late, since Exception is out of Region, then I only could redirect all page.

I am searching another alternative, like put a common method to catch all methods of Java Class but I don't found it.

Log exception

<UIXRegionTemplate> <UIXRegionTemplate> <_warn> <Error al procesar viewId: /test_common.jsf URI: /test_common.jsf URI real: /fragments_testers/test_menu.jsff.>

javax.el.ELException: //C:/Oracle/AppData_122100/system12.2.1.0.42.151011.0031/o.j2ee/drs/Common/ViewControllerWebApp.war/fragments_testers/test_menu.jsff @96,106 listener="#{backingBeanScope.testPageFragmentBean.onPageLoad}": java.lang.NullPointerException

In this log can check that exception is queue from page fragment, but I cant get real context to do navigation outcome.

jdeveloper: 12.2.1.0.0

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Jul 12 2016
Added on Jun 13 2016
2 comments
305 views