Hello *,
suppose I have a web service (or any other compatible data source) with a getter and setter method for a simple string value.
How would I design the context and bind it to the model?
What are the general steps to retrieve the string from the model and write it back (e.g. after it has been changed by the user)?
Is a different approach necessary for multi-row data (i.e. a table)?
I'm a bit confused from the examples since there is only a single execute method and a 1-to-1 relationsship from context node/value to a model function.
Thanks for any help!
Regards
Martin
Hi Martin,
This would be content for a two hour hands-on workshop at TechEd ðŸ˜Š
I would say, start with the Model and bind the controller context. Please take the email web service tutorial - this one should be the right one to start with.
If you have further questions, let me know!
Best regards,
Karin
Karin,
I can imagine that a comprehensive answer would be very long indeed.
Unfortunately, the examples and docs I've found so far (including the email example) couldn't solve my question.
In the email example the communication is one-way (data is written to the model but not retrieved from it).
Is there any further documentatione/example/forum-thread on the fundamental steps "get data from model" - "manipulate it" - "write it back to model"?
Maybe I'm stuck here with my Java background of getter and setter methods, but how then is the WD approach to these basic steps?
Just a few hints would be very, very helpful.
Hello Stefan,
many thanx for your reply.
So the bottom line is, if I have 2 different methods in my web service to get and to set the data, I must eventually copy data in the context. This is because context nodes / values can only be bound to a single model method.
Hope I've got it right now. Or are there any alternatives?
Regards
Martin
Add a comment