on 10-21-2009 4:39 AM
HI ,
i have a requirement like this :
i have an input field with button.
if i enter value in the input filed and click on the button it working correctly.
if i enter value in the input field and delete the value and click on the button it is java null pointer exception.
Pls provide some inputs on this.
Thanks in advance.
Regards,
Pavani
Hi,
Try using this condition as
if ((wdContext.currentContextElement().getVa_Input().trim().equalsIgnoreCase(" ")) ||
(wdContext.currentContextElement().getVa_Input()!=null)||
(wdContext.currentContextElement().getVa_Input().trim().equalsIgnoreCase(""))){
//Your code here
}
Regards.
Rajat
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
What happens if you do not enter the value and then hit the button?
Regards.
Rajat
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
if i dont enter value and hit the button it gives a message like" please enter some value " and will not allow user to goahead.
if (wdContext.currentContextElement(). .getVa_comments().equalsIgnoreCase(" ")) {
wdComponentAPI.getMessageManager().reportWarning(
"please enter valid reason");
}
Regards,
Pavani
User | Count |
---|---|
94 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.