on 03-31-2008 8:37 AM
Hi,
I am trying to create one application to display messages on the input field according to the input given.
But when i am giving value in name field then first time it is working fine but next time when i erase the value of the name field and press submit button then istead of giving internal error message it is showing 500 internal error in which it is showing null pointer excetion error.
Can anybody help it out.
Thanku.
hi,
try the following code:
the node struvture is :
Node
--Id
--Name
String val1 = wdContext.currentUserElement().getId();
int length = (val1==null)?0:val1.length();
if(length==0)
{
//raise message
msg1.raiseMessage(IMessageCompNullpoint.ID,new Object[] {""},true);
}
regards,
pinki
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you are accepting the input value (from inputField) to an attribute under a node, check the cardinality of that node (node properties).
Once you execute it, the node becomes invalidated. i.e. it contains no instance during runtime. Thats is why the null pointer exceptions is.
You have create the node element before executing it for the second time.
e.g.
code:
IPrivate<your>View.I<node>Element element =
wdContext.create<node>Element();
wdContext.node<node>.add(element);
[/code]
give this code where you want to refresh current node.
regards,
nikhil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
25 | |
12 | |
9 | |
7 | |
6 | |
5 | |
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.