on 07-24-2009 7:22 AM
Hi all,
our company has made a WD Component for editing business partners.
My job is to build a WD Component where two business partners (different roles) are edited within the same window.
My idea was to make 2 separate component usages of the Business Partner WD Component within my component.
This just works fine. But there is a problem when mapping the context of both Business Partner-Components into my WD Component. There are always naming conflicts. This is because it is not allowed that there are two nodes with the same name in the context, even if they are in different subnodes. Renaming the nodes after mapping them in my component also doesn't work, because it is not possible to rename nested nodes.
Does anyone know a solution?
Kind regards,
Florian
Hello Florian,
you could delete the mappinfg, rename the subnode and map the context again.
Let me know if it works, Meanwhile i can try to replicate the issue.
Regards
Anurag
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi!
Thanks for your quick reply.
Unfortunatelly this doesn't work. When remapping the context, all renamed subnodes are deleted by WebDynpro.
Is it really not possible to use the same web dynpro component twice in a web dynpro component? We need this functionality, but there are always naming conflicts when mapping the context of the two times used component into the target web dynpro component. No possibilty for renaming sub-nodes of mapped nodes?
Thanks in advance
florian
Hello Florian,
I can confirm, One can use the same component in another component multiple times with different usage names.
I have done it. Moreover there are components like WDR_OVS and one for ALV SALV_WD_TABLE which must be used atleast thousand times.
I can also acknowledge there could be some discrepancy in the metadata generated by the webdynpro framework when you modify the mapping.
Once you declare the usage twice with different names of the same webdynpro component.
You could go to the consumer component and add two nodes Usage1 and Usage 2.
Anurag
Edited by: Anurag Chopra on Jul 27, 2009 7:30 PM
Hi Anurag,
thank you for giving me help. You are right, it is possible to use a component twice within the same webdynpro component.
But the problem is the context mapping in the target component.
Let me give you an example.
This is the context of the twice used component.
CONTEXT
|
|->NODE_1
| |
| |->SUBNODE_1
| | |
| | |->SUBSUB_NODE_1
| | | |
| | | |->ATTRIBUTE_1_1_1
| | | |->ATTRIBUTE_1_1_2
| | |->SUBSUB_NODE_2
| | |->SUBSUB_NODE_3
| | |->ATTRIBUTE_1_1
| | |->ATTRIBUTE_1_2
| |->ATTRIBUTE_1
| |->ATTRIBUTE_2
| |->ATTRIBUTE_3
Now, if i map this context (NODE_1) to the target web dynpro component I have a problem. I have to map it twice (one time for each used component), so that i can access both used components. But WebDynpro only allows me to rename the node NODE_1. Mapped subnodes (SUBNODE_1, ...) cannot be renamed. So i cannot map the context of both used components, because there are always naming conflicts. WebDynpro doesn't allow that there are two nodes with identical names within the context, even if they are in different subnodes.
Is there a solution? We really need one.
Thanks
Florian
Hello Florian,
I am afraid, people in webblogs has accepted this problem in the webdynpro framework.
But guess what, there is a way out.
You could use assistance class for the same or you map the child nodes separetly.
[/people/community.user/blog/2009/05/22/web-dynpro-for-abap-150-thoughts-on-mvc-and-wd4a-observations|/people/community.user/blog/2009/05/22/web-dynpro-for-abap-150-thoughts-on-mvc-and-wd4a-observations]
Anurag
Edited by: Anurag Chopra on Jul 28, 2009 6:50 PM
Hello Anurag,
thanks for all your research. Using an Assistance Class for storing the data instead of the context is no option in our project. Data has to be stored in the context, so that forms can easily be built with the form-assistant.
The second solution (mapping the subnodes) seems not to work. If the lead selection of the parent node is changed, it does not affect the data stored in the child node. Is this a bug?
Thanks for all your effort,
Florian.
The problem is, that subnodes of mapped nodes can not be renamed. Ist there a possiblity to do this?
Kind regards
Florian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Florian,
webdynpro uses declaritive approach for view layout, context etc (it can be done dynamically too )and accordingly meta data is generated.
so if we make changes (declaratively ), previously generated meta data would end up being confused.
You have to name the context nodes differently for different component and you could choose the option of update mapping in the context menu after right clicking on the node which has been renamed which would refresh the meta data and it would do.
Regards
Anurag Chopra
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.