Skip to Content
author's profile photo Former Member
Former Member

Update Model with ContextData

Hi There,

does anyone know how I can update my model with

the corresponding context-data ?

With wdcontext.nodexy.invalidate() I can transmit

the data stored in the model to the context node, but

how can i bring the data back to the model ?

Thanks & Greetings...


Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Dec 17, 2004 at 07:55 AM

    Hi Claus,

    first of all, invalidate() on a node does not transport the model data to the context. Depending on which node you call it, it might completely clear the context. The reason is that this method <i>invalidates</i> the context, so that it has to acquire its data again. And if there is a rule telling the node how to get data (it can be either a supply function or a supplying relation role in the model), then the node will fetch these data if needed the next time. And if there is none, like in independent nodes, the context will be empty afterwards.

    The invalidate is sometimes necessary to inform the context about changes in the underlying model. This is especially the case with the response after an execute of adaptive RFC or a web services. We're working on it.

    So how can you bring data back to the model? Well, for properties it's simple. If the context is bound to the model, just write the new value to the corresponding context attribute. This is how user input comes into the model. If you have to modify the structure of the underlying model, then you may switch from the node to the attached model class via the generated method modelInstance(). Once you have this instance you can add, change or remove related objects etc. As told above, it might then be necessary to invalidate some child nodes afterwards.



    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.