Skip to Content
author's profile photo Former Member
Former Member

Validation and exception handling

Dear Experts,

I have quite a few questions when trying out CAF. Please kindly give me some help.

1. I found that it's suggest to return error from Application Service (AS) to Web DynPro using a Log object (GDT) in the response. However, the AS seems also able to throw exceptions (NWDS will create code that throws exception). So, which way should I take, exception or Log object in response?

2. In case I want to use the GDT Log object, how can I reference to it? I found most tutorials teach me to build the BO using caf.core primitive type only. However, shouldn't I use those CDT or GDT instead?

3. Is there any sample that show me how can I validate a Web DynPro input form? e.g. I need to validate 10 fields inside a Web DynPro view. Where should I place the logic and call the logic? I think there're much more consideration. Is there any good reference for that?

4. Is it possible to place a validator message next to an input? I found that it's able to put a summary inside the page. However, it will be much better if the validation message is next to the input control.

Thanks for any help!

Regards,

Alex

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jun 18, 2008 at 08:46 AM

    Did you resolve your problem?.

    Sampath

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 18, 2008 at 03:53 AM

    Hi,

    1. You have to catch the exception in AS and send it to WeDynpro in its response using GDT Log Structure.This is the recomanded way for handling exceptions in AS.You can get more clarity if you go through the [architechtural guidelines |https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/00caf8bd-487a-2a10-36a9-93d840309310]for BO layer.

    2. Most of the Enterprose services use GDT Log structure in their response.So you can import any of the those sevices from SDN into your application and get the Log Structure.Later you can delete that Service.

    These links are usefull for you

    [link1|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/00caf8bd-487a-2a10-36a9-93d840309310]

    [link2|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/c0491a51-0c6d-2a10-3dbc-9069ee2099b4]

    Sampath

    Edited by: Sampath Gunda on Jun 18, 2008 5:53 AM

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.