cancel
Showing results for 
Search instead for 
Did you mean: 

Customize error page

Former Member
0 Kudos

Hi,

We have a requirement to show customized error page when there is a exception in web dynpro program.

We want to catch web dynpro framework exceptions(Eg: JCO) and show the customized error page.

Has anybody implemented this or any suggestions?

Thanks & Regards,

Vijith

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Santosh,

Thanks.

There is no issue with the way I am using WDPortal navigation, have tested this thoroughly.

The problem is that whenever I get a exception from web dynpro framework I am unable to catch it and navigate to the custom built error page using WDPortalNavigation.

Thanks & Regards,

Vijith

Former Member
0 Kudos

Hi,

If you catch the exception, can't you test if it is a custom or a framework exception?

E.g.

try {

} cartch (Exception e) {

if (e instanceof WDUMException.class) {

navigate to standard page

}

if (e instanceof WDResourceNotFoundExceptionclass) {

navigate standard page

}

etc. for JCO and other WD exceptions

}

Good luck, Roelof

former_member201361
Active Contributor
0 Kudos

Hi Vijith,

try in this way ,

place the code in the Try and catch block . based on the exception, navigate to the corresponding page uisng wdPortalNavigation.

please check whether u have the page in the role.

Thanks and Regards

Answers (1)

Answers (1)

former_member201361
Active Contributor
0 Kudos

Hi Vijith,

U can put ur code in try and catch block and catch the exception and display ur custom message from message pool.

in message pool editor , u can declare the exception with customized message .

u can use these message, when some exception occurs.

Thanks and regards

chander_kararia4
Contributor
0 Kudos

Hi Fazal,

Thats fine. But that will result in both types of messages. The one customized by the user & the one standard. Coz as per my info, we cannot catch the default exceptions generated by web dynpro whic are linked to the properties of UIs.

Regards

Chander Kararia

Former Member
0 Kudos

Hi Fazal,

Thanks for that.

I need to naviagte to a customized error page when the exception is raised. I am using WDPortalNavigation but I am unable to get that working.

I guess we cannot control the web dynpro framework.

Have you tried this scenario?

Regards,

Vijith

former_member197348
Active Contributor
0 Kudos

Hi Vijith,

I have tried this scenario once. Just put all the code of the wdDoInit() in component controller (i.e. the data about model definition and binding to Context) in a try/catch block.

In the catch block, you can write your code like

wdComponentAPI.getMessageManager().reportException();

Regards,

Siva

Former Member
0 Kudos

Hi Siva,

Thanks for this.

Report exception is not going to help me because I need to navigate to a eror page when a exception occurs.

Regards,

Vijith

Former Member
0 Kudos

Hi,

Whats the issue you are facing with WDPortalNavigation.navigateAbsolute().This should work

Try with the syntax provided in the url below and post the error if any

http://help.sap.com/saphelp_nw04s/helpdata/en/c3/235a428a1e9041e10000000a1550b0/content.htm

Regards,

Santhosh

Edited by: Santhosh Edla on Feb 16, 2009 4:22 PM

Former Member
0 Kudos

Ensure the iView or page you are calling exists in any Role.

WDNavigation does not work if the iview is not added with in a role.

You can hide the iView even after adding to the role by setting the Invisible In Navigation to true

Hope it helps