on 04-19-2011 10:40 AM
Hi ,
I am trying to set values to model object field as below
Zsproposal zsProposal=new Zsproposal();
if (wdContext.nodeUsersNode().getLeadSelection()!= -1)
{
zsProposal.setZz_Requested_By(wdContext.currentUsersNodeElement().getUserId());
}
here,
Zsproposal - structure of a BAPI
Zz_Requested_By - a field in Zsproposal
On executing the applcaition. it throws the following error
Exception cause in method executeXXXModel() method : null
Exception message in method executeXXXModel() method : -1
Exception in method executeXXXModel() method : java.lang.ArrayIndexOutOfBoundsException: -1
Could anyone help me to find where the problem is?
Regards,
Manchari
This issue is resolved by invalidating method
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Manchari,
Please use like the below code and use the message manager to report the message after the satement to see where exatly the problem is.
Zsproposal zsProposal=new Zsproposal();
if(wdContext.nodeUsersNode().size > 0)
{
if (wdContext.nodeUsersNode().getLeadSelection()!= -1)
{
zsProposal.setZz_Requested_By(wdContext.currentUsersNodeElement().getUserId());
}
}
Hope it will helps
Regards, Arun Jaiswal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
the exception is because if u try to access a value which is not there in the Array or list.
in this case try to m,ake the coordninality fo node : userdetails to 1-n and then check .
Regards,
Govindu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Zsproposal zsProposal=new Zsproposal();
if (wdContext.nodeUsersNode().getLeadSelection()!= -1)
{
zsProposal.setZz_Requested_By(wdContext.currentUsersNodeElement().getUserId());
}
Try to put print statement and check whether UserId() contains any value or not...
Whether you want to put Current Login Portal ID or you already have the list of users in a node UsersNode.
wdComponentAPI.getMessageManager().reportWarning(""+wdContext.currentUsersNodeElement().getUserId());
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.