on 05-16-2007 7:05 AM
hi Friends ,
I am getting runtime error that lead selection has not been set .At times I am able resolve it .I will be happy if one can tell me Possible cases when such errore occurs and what solutions to it in those cases .
Another thing When to set Single ton ?When to not ?
Answers will be rewarded .
Cheers
Parry
Hi Parry,
The error comes if the node has the cardinality 1..n and the lead selection is not set to the results which you bind to the node.
One of the option is to set the cardinality to 0..n or to set the lead selection of the node explicitly.
and also
if the UI element is bound to a context node or attribute on a node , where this
node is defined as : cardinality 0..n or 0..1. The framework will not create a default empty element in this case. When the view is to be rendered, its source content doesnt exist. AS the node has no elements. rendering fails....
Singleton:
The property singleton can be explained as the way to store dependent internal tables in the classical ABAP world. The dependent table could be the content of a cell in each table line (singleton=false <-> nested internal tables) or the dependent table could be an independent element, containing the dependent data of only one line of the parent table (singleton=true <-> independent internal tables).
i.e. If a Node A has child node B, which is having cardinality 0..n then
if singleton=false then for every element in the parent node collection (A in this case), there will be a distinct instance of the child node B.
Best regards,
Suresh
Message was edited by:
Suresh Honnappanavar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No I have not set that flag as my nodes are not containing data initially.
Second thing I am getting error on load of another view where I have used around 4 item list boxes and I have binded them single node individually .
like for item list box of cost center I have bind ND_COSTCENT and I have made its cardinality 0..n and selection 0..1 and lead_selection_flag is not set .Is it fine .
Last day it was working fine i don know after adding new node this error come .i m nt able to trace mistake i did .
Hi,
Go in debugging mode and check what is the lead selection. If the value is -2 then the lead selection is not set for the node. Then you can set it programatically using the method "set_lead_selection_by_index" at appropriate place.
Hope it helps.
Regards
Sagar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
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.