cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with invalidating a context node

Former Member
0 Kudos

Hi,

Please see the code below:

String s = wdContext.currentSubitemsElement().getBase_Quantity();

wdComponentAPI.getMessageManager().reportWarning(s);

wdContext.nodeSubitems().invalidate();

String s1 = wdContext.currentSubitemsElement().getBase_Quantity();

wdComponentAPI.getMessageManager().reportWarning(s1);

For some reason, the context is not cleared after the invalidate command. Any ideas for this?

Thanks in advance,

Aviad

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Try using this function instead of "invalidate":

wdContext.getContext().reset();

Walter

Former Member
0 Kudos

Thanks! this solves my problem.

Aviad

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Aviad,

Let me guess the origins of problem:

1. As far as you mentioned <b>Sub</b>items node, there should be a parent node, say Items.

2. Subitems node has either supplying relation role or supply function, Items has no supply function.

3. Then, if you invalidate Subitems, supply function is called or supplying relation is used to populate content. When you do contenxt reset, then all controller nodes get invalidated including Items. Hence Subitems has no parent and displayed as empty.

If all the above is true, then you may either to invalidate Items node or make Subitems node with no supplier (i.e. manually bind content instead).

Context reset works here, but, it's a bit "brute force" approach.

Valery Silaev

EPAM Systems

http://www.netweaverteam.com/