on 09-11-2008 12:29 PM
Here I am trying to see if the date field is emptyor not. I am taking it in "usrData" and assigning "usrData" to a string "s" and checking whether c is empty or not. but it is giving null pointer error
please help
Date usrDate =(Date) wdContext.nodePerson().currentPersonElement().getAttributeValue(field);
// Get field properties of attribute under investigation
IWDAttributeInfo personAttr = wdContext.nodePerson().getNodeInfo().getAttribute(field);
// Check if date is valid
String s;
s= usrDate.toString();
if (s.length()==0) {
// If date is not valid: report error message
msgMan.reportContextAttributeMessage(
wdContext.nodePerson().currentPersonElement(),
personAttr,
IMessageSub_comp.DATA_IS_NOT_VALID,
new Object[] { field, usrDate },
true);
}
Hi,
You need to add this check too
If (usrDate != null) ........
Aviad
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
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.