cancel
Showing results for 
Search instead for 
Did you mean: 

Web Dynpro, Recursive Tree

Former Member
0 Kudos

Hi all,

In my application I have implemented a recursive tree with node types TreeNodeType and TreeItemType.

The context structure is the following:

CONTENT (context node)

COMPANYCONTENT (recursive context node with the reference to CONTENT)

COMPANYITEM (context node)

NAME (attribute)

ID (attribute)

NAME (attribute)

ID (attribute)

CHILDREN_LOADED (attribute)

The 'dataSource' of the Tree-Element and TreeNodeType-Element are bound to CONTENT.

The 'text' of the TreeNodeType-Element are bound to CONTENT.NAME.

The 'dataSource' of the TreeItemType-Element are bound to CONTENT.COMPANYITEM, the 'text' is bound to CONTENT.COMPANYITEM.NAME.

This is working well. But the problem is I have to change (refresh) the context (basis for the tree) all the time if the user changes the select options in the head of the current view. In this case, if I simply delete the context element of CONTENT node, the application goes down with the error message:

'The assert condition is violated'.

And this occurs only if the refreshment is provided at the moment when all tree levels are closed.

My question is: what is the correct way to refresh the context and this recursive tree, respectively?

Kind regards,

Oleksandr

Accepted Solutions (1)

Accepted Solutions (1)

arjun_thakur
Active Contributor
0 Kudos

Hi Oleksandr,

Refer SAP Note Number: 1256744.

Regards

Arjun

Former Member
0 Kudos

Thanks for advice!

Now I defined that if I after expanding the tree navigate to antoher view and then back to the view with the tree, I get the same dump.

Exactly the same problem was posted in

I do not know whether the SAP note helped or not.

Have somebody already solved a similar problem?

Kind regards,

Oleksandr

Former Member
0 Kudos

Hi Arjun,

I installed this Note, without success, however.

Would you have any other ideas?

Kind regards,

Oleksandr

Answers (1)

Answers (1)

former_member40425
Contributor
0 Kudos

Hi,

In order to refresh use invalidate node that is bounded to tree.

Data: l_node type ref to if_wd_context_node.
 
l_node = wd_context->get_child_node(  'NODENAME' ).
l_node->invalidate( ).

I hope it helps.

Regards,

Rohit

Former Member
0 Kudos

Hi Rohit,

Your information help me a lot.

Regards,

Eric