on 06-21-2006 2:23 PM
Hi,
How to perform this validation.
I am having a input field. when user does not enter any value, i have to check this and raise a message. How do i do this in web dynpro's.
I tried by using the length() method but i am getting "Null Pointer Exception".
Example:
String abc = object.getABC();
if( abc.length() != 0 )
{
// here i will pop up the error window.
}else{}
Any help is highly appreciated.
Thanks
Rg/Venkat
if (abc == null || abc.length() == 0)
{
/* abc is not set or empty string */
}
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Venkatesan,
Instead of abc.length() != 0, try "abc.length < 1".
best regards
Shyam.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi
In the web dynpro explorer expand the dictionary and select local dictionary and then data type and right click the simple type and create simple type. give simple type name and package.
open the simple type and give bulid in type, maximum length and minimum length.
go the value attribute of input field and in the property tab set this type(simple type)
u try this too
in the action of any button
String x=wdContext.currentContextElement().getVA_<value attribute name>();
if(x.length() == 0)
{
wdComponentAPI.getMessageManager().reportWarning("Please enter the Name");
}
hope this helps,
regards,
Arun
Message was edited by: Arun
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.