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

Context-Model binding

Hi experts,

I am having some trouble with the binding between my controller context and the model objects. My context model nodes are the following (imported from a Web Service):

Context

--KES (Model Node)

-


Request (Model Node, singleton, selection 0..1)

-


Metadata (Model Node, singleton, selection 0..1)

-


creator (Model attribute)

In wdDoInit() of the controller, I initialize my model objects as follows:

Request_KeywordEnhancerWSViDocument_generateMetadataComSapMltKesKESRequest req 	 =
new Request_KeywordEnhancerWSViDocument_generateMetadataComSapMltKesKESRequest();
    
wdContext.nodeKES().bind(req);
	
ComplexType_KESRequest request  = new ComplexType_KESRequest();
ComplexType_DCMetadata metadata = new ComplexType_DCMetadata();
request.setMetadata(metadata);
req.setRequest(request);

Furthermore, I have bound the Request model node to my view controller. Setting model attributes for the Request node is no problem, but I cannot access those in the Metadata node. This only works if I add an element to the node collection or explicitly bind my metadata object to the model node. Then, however, the relation between the Request and Metadata model objects is broken and I cannot properly execute the Web Service.

I've been stuck on this matter for hours now and have tried just about everything. I'd appreciate it if someone could give me a hint. Is this a matter validating/invalidating the context node?

Any help would be greatly appreciated! Thanks!

Cheers,

Tim

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jul 29, 2005 at 02:48 PM

    Tim,

    Try to do one of below:

    1. Make request & metadata nodes non-singleton.

    2. First construct object graph (req->request->metadata) then bind req.

    VS

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 29, 2005 at 02:51 PM

    ...and

    3. Verify that supplying relation role is set for nodes Request and Metadata.

    VS

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Valery,

      thanks for the fast response.

      Unfortunately, your suggestions did not have any effect. Even with first creating the object graph and having both nodes as singleton, the Metadata node isn't properly set up.

      The supplying relation roles are set to "request" and "metadata", respectively.

      Tim

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.