on 04-22-2010 4:11 PM
Hi,
I have created a faceless Web Dynpro model component (DC1) and an UI Component (DC2).
DC1 is an used component in DC2.
After mapping the model node from the interface controller of DC1 to DC2 it says "Referenced model class is missing".
I asume, I should add the model as used model to DC2 as well.
But when I proceed this way I am wondering why you should create a seperate model Web Dynpro DC? Where are the Pros?
Can anybody tell my how to proceed with this issue?
Are there any best practices how to use a central model DC in Webdynpro and access the data via interface mapping from other DCs?
Thanks ahead
Hi Bernd,
See you created two DC's DC1 as model DC and DC2 as UI DC. In DC1 you created a public part say for ex. PP_Model
There are two way to resolve this issue..
One way is...
just delete the public part from DC1 and build. Then create the public part and do the DC build. Add the component to the public part the again do the DC build. It will resolve the problem.
Another way is...
Open the DC1 in Web Dynpro Explorer, Select the Model -> Right click -> select Add To Public Part. Then do the DC build for both the DC's and it will resolve the issue
Regards,
Amol
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Amol,
thanks for your answer.
Is it correct, that I have to add the model (adaptive web service model) itself and the component in DC1 to the Public part of DC1?
After doing so and mapping the the context from the interface of DC1 in DC2 it says that the context elements cannot be resolved to a type.
Can anybody provide a best practive how to retrieve the context of my model DC (DC1) in my UI component (DC2)? What are the exact steps to do so? I am using CE 7.11.
Any help would be appreciated.
Thanks,
Bernd
Edited by: Bernd Speckmann on Apr 23, 2010 3:09 PM
Hi Brend,
Lets Take it step by step
1. The mapping between component controller and model is fine by this way you can execute model request node and get the response in respective response node.
2. to expose the response node in public part you just copied the respective node from component controller to interface controller.
3. while accessing the exposed node in different DC it'll show the problem all the attributes in value node will be red crossed and will show the problem.
in above scenario have you thought why you need model node mapping in interface controller...? actually you don't need model binding in interface node and only context mapping from component controller to interface controller will be enough because there is already one to one mapping between component controller and interface controller.
And here is the cure simply go to interface controller and right click on nodes and delete the model binding. and its done access the node with value in any of the dc's where you are using the used component of this DC.
Let me know if you need any further assistance.
Regards
Jeetendra Choudhary
Hi,
thanks for your answer. I think it works.
One additional question:
What is the best way to provide my components with the data?
Import all models in one component and manage their execution in only one component controller? Or is it better to split the different models in many components (controller)?
Is it better to copy the values before and after model execution to seperate value nodes in the component controller and expose this nodes?
Thanks ahead
Hi Bernd,
In my suggestion you should create a different DC if you have more models then one and in that dc there should be different custom controller to execute different model. so that you can use each component as different public part. By this way the Model would be separate from ui which will increase performance and the dependency would be less.
P.S use componantisation concept for better understanding.
Regards
Jeetendra
Hi Bernd,
For reusability, model component and functional components are seperated. In model component, all the model created which are used for all func components. and In Func component usage model component based on the requirement to use number of model that web dynpro componetization
>But when I proceed this way I am wondering why you should create a seperate model Web Dynpro DC? Where are the Pros?
Can anybody tell my how to proceed with this issue?
For seperation of business logic model component from visual component.
Componentization, resualbilty, easy to maintain etc
Are there any best practices how to use a central model DC in Webdynpro and access the data via interface mapping from other DCs?
Please refer to [Here |http://www.williamcui.com/blog/resources/principles_patterns_and_practices_in_web_dynpro_for_java.swf] and go through [Articles|http://www.sdn.sap.com/irj/scn/articles-webdynpro-all?startindex=161] and [Blogs|http://www.sdn.sap.com/irj/scn/weblogs?blog=/weblogs/topic/43] and [Wikkies|http://wiki.sdn.sap.com/wiki/display/WDJava/WelcometoWebDynproJava%21]
Hope it helps
Regards
Arun
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.