cancel
Showing results for 
Search instead for 
Did you mean: 

Model component uses View component??

Former Member
0 Kudos

Hi,

I am using a 3 component model (1 each for Model, view and controller--Main).

In my model component, I have a user defined search help component providing input help for an attribute in the context which too, resides (is owned) by the model component. This context node is shared across several other view components. To have the input help on the context attribute in the model, I need to have defined, the component usage of the custom webdynpro search help "view" component, which would, in theory violate the design principles.

"View can use model and not vice versa."

PS: Mapping association of the custom search help component at the individual view component level cannot be performed as the context needs to be shared across all view components through my model component.

Kindly suggest if there's an alternate approach/interpretation to the same.

Thank you.

Accepted Solutions (1)

Accepted Solutions (1)

thomas_szcs
Active Contributor
0 Kudos

Hi Adithya,

Using a single Web Dynpro already allows you to make use of the MVC concept. Even a view controller in itself features MVC to some extend by having a ui tree, a context, actions, plugs and offering the possibility to define your own method or call methods on the assistance class. So if your application was not very complex, my suggestion is to move everything to a single component.

Best regards,

Thomas

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Ashish, Thomas,

Thanks for your replies. My idea of asking this question was to find out if there was any option to change properties of attributes of a node at a level where they are not OWNED. This logically does not make too much sense, too. But my requirement was to try and eliminate the mandate that model component must have component usage of a (so-called view component) search help component.

Guess there's no way out.

Also we had adopted the 3 component architecture as the service being designed is huge plus also eases development as two colleagues can get to work parallelly on different components without worrying about the other 'locking' the WDC.

Thanks again,

Adithya

Former Member
0 Kudos

Hi Adithya,

For your Comment "In my model component, I have a user defined search help component providing input help for an attribute in the context which too, resides (is owned) by the model component" i would like to impart more knowledge.

The User Defined Search help is always a different component, which is created by the developer and is used as a search help in some other component. It cannot be the same component. in this case you have to declare the usage of the Child component( in your case User Defined Search Help Component ).

Also we would like to know more about what are you aiming at.

Thanks.

Ashish.