on 12-16-2004 2:43 PM
Hi There,
I have a problem with the Model-handling in WD. I have
a deep Model generated from a Web Service with a lot of Subnodes like the follwing example:
WebService (root node)
WebService - Booking (card: 0...1)
WebService - Booking - pointOfSale (card: 0...1)
WebService - Booking - travelers (card: 0...n)
and a lot of Attributes in every node. These
nodes are the INPUT-parameters for the web service.
I initialize the Model with the follwing Code:
WebService req = new WebService()
wdContext.nodeWebService.bind(req);
How do i have to fill these nodes with data? I tried to
map InputFields with the model attributes, but the
model does not store the data /the input fields are in "readOnly"-Modus and grey. Even if I try to fill the
Context-Model "manual" (e.g. nodeTravelers.addTravelerElement(...)) the values does not reach the web service.
Where can i find a example for handling complex model structures ?
Thanks a lot...
Claus
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Betram,
thank you for your tip. I tried it the following way
in the Init-Method of the View:
//Create Model
ComplexType_pointOfSale pos = new ComplexType_pointOfSale();
pos.setAgencyKey("12345");
ComplexType_Booking booking = new ComplexType_Booking();
booking.setPointOfSale(pos);
//Binding the model to context
WebService req = new WebService();
wdContext.nodeWebService.bind(req);
A InputField is mapped to the AgencyKey-Attribut,
but is empty after i startet the application.
Any idea ?
Thanks a lot for your answer,
Claus
Hi Claus,
looking at the code snippet i guess, that you "overwrite" any request parameters (and/or complex types) with the final
WebService req = new WebService();
wdContext.nodeWebService.bind(req);
This might discard any changes you've done before binding the new (and therefore empty) web service node. Please try it in reverse order, e.g. create a WebService element, bind/add it to the corresponding node, create elements for the sub-nodes, fill them and finally execute() the model object to send the request to the web service.
Hope that helps.
Regards
Stefan
User | Count |
---|---|
81 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.