Skip to Content
avatar image
Former Member

Content of Node after Roundtrip?

Hi All,

my application fills modified rows of a table into a context node. Subsequently, the content of this node is sent to a Back End System using RFC. It works fine with the first round trip. However, with the second round trip there are the old elements still in that context. I have tried to remove all elements and to invalidate the node, but still there are undwanted elements in that node.

I have tried:

for (int i = 0; i < wdContext.nodeModifiedCustomers().size(); i++){
	wdContext.nodeModifiedCustomers().
          removeElement(wdContext.nodeModifiedCustomers().getElementAt(i));
}

and

wdContext.nodeModifiedCustomers().invalidate();

but in the second round trip there still are elements in the node.

I guess I need to make the node having the intial content (the first roundtrip works fine).

Whats wrong?

Thanks, Johannes

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Sep 04, 2008 at 09:27 AM

    Hi,

    Write this invalidate line in your execute() method or right after the executing your RFC.

    wdContext.nodeModifiedCustomers().invalidate();

    PradeeP

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 04, 2008 at 11:08 AM

    Hi Johannes,

    Try this code to delete old elements:

     for (int i = wdContext.nodeModifiedCustomers().size(); i>=0 ; i--)
    {
    	wdContext.nodeModifiedCustomers().
              removeElement(wdContext.nodeModifiedCustomers().getElementAt(i));
    }

    No need to invalidate() if it is model node.

    Regards,

    Siva

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Finally, this solved the problem:

      			for (int i = wdContext.nodeModifiedCustomers().size() - 1; i >= 0; --i) {
      				
      				wdContext.nodeModifiedCustomers().removeElement(
      						wdContext.nodeModifiedCustomers().getElementAt(i));
      			}