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

Check for blank input field returns NullPointerException

Hi

I have used

if(wdContext.currentContextElement().getName()==null){}

this for checking blank input , but it is giving NullPointerException ; any clue.

I am using in it SAP floor plan manager architecture.

Thanks in advance

Ananda

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Mar 24, 2006 at 01:17 PM

    I doubt that. Can you post the complete stacktrace?

    Armin

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Thanks Armin & Rathna

      The cause of error is the IFPM=null;

      I have put the verify() in Component Controller instead of view where FPM is automatically invoked by the framework thru Interface controller thereby eliminating the exception.

      Regards

      Ananda

  • author's profile photo Former Member
    Former Member
    Posted on Mar 24, 2006 at 03:00 PM

    Hi Ananda,

    In your scenario, can you tell me if you are using "name" as model attribute or value attribute in ur context. If it is a simple value attribute, better place a condition before that if statement to check if the (wdContext.currentContextElement() == null).

    Also you can debug on the context element and inspect which attributes exist.

    If possible please reply in details about that attribute if it is a model attribute which is mapped or binded etc..

    Regards

    Praveen

    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.