cancel
Showing results for 
Search instead for 
Did you mean: 

ContextException problem

Former Member
0 Kudos

Hi Experts,

Need your help.

I have the following context structure:

UserInfo : node, singletone=true

****UserMachines : node, singletone=true

*********MachinesInformation : node, singletone=false ( there is a supply function for this node)

*********locale : attribute

*********version : attribute

****name : attribute

****type : attribute

UserMachines node is bound to Table. MachinesInformation is bound to TextView elements.

When there is at least 1 element in UserMachines node everything works OK. But when there are no machines to enter to the node ( UserMachines is empty) i get the following exception:

com.sap.tc.webdynpro.progmodel.context.ContextException: Node(SingleUserCompView.UserInfo.UserMachines): no child node 'MachineInformation' at index -1

at com.sap.tc.webdynpro.progmodel.context.Paths.followPath(Paths.java:880)

at com.sap.tc.webdynpro.progmodel.context.Paths.followPath(Paths.java:852)

at com.sap.tc.webdynpro.progmodel.context.Paths.createAttributePointer(Paths.java:91)

at com.sap.tc.webdynpro.progmodel.view.UIElement.getVisible(UIElement.java:619)

at com.sap.tc.webdynpro.clientserver.uielib.standard.uradapter.MatrixLayoutAdapter$Cells.doNext(MatrixLayoutAdapter.java:362)

.....

I could not understand what is wrong. Please help me.

Regards,

Slavik.

Edited by: Stanislav Lvovsky on Jul 2, 2009 4:47 PM

Edited by: Stanislav Lvovsky on Jul 2, 2009 4:49 PM

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Looks like you have bound the "visible" property of some UI element to some context attribute inside node "MachineInformation". The runtime tries to compute the property value before it renders the UI element. To do so, it follows the lead-selections of all parent nodes and finds that node "UserMachines" has no selection (-1) because it is empty.

Armin

0 Kudos

Hi Armin,

You were right. I have moved "visibility" attributes from the node to other place and it started to work.

Regards,

Slavik.

Answers (2)

Answers (2)

Former Member
0 Kudos

whats on Paths.java line 880?

It could be cardinality, but also with a "for" loop over the MachinesInformation node ...could be the supply function

have on mind that if you put nothing on the node and the cardinality its 1-n then there is gonna be one empty record

are you using some of this?

numXVal.bindValue("xxxxxxxx");

Former Member
0 Kudos

Set the cardinality of node UserMachines to 0..n