on 2015 Oct 06 5:20 AM
Hi All,
I have 3 WDA components A, B and C. The comp. A has 2 viewcontaineruielement in one of it's view. Each of these viewcontaineruielement embeds a view from component B and C. So the initial display of component A view has 2 views (one each from B and C). The view of B has an action. Now when I click on this action it displays another view from comp. B. But along with this view it is also displaying the view from comp. C which I don't need.
I want to make view from C invisible. But to do this, I am not able to access the view info either from A or B. Note that, the views are called dynamically called in A.
Any idea on how I can know that I am currently using the component B? If I know it, then I can make the view of comp. C invisible and then achieve the required result.
Regards,
Madan..
Hi Madan,
you can achieve this by using events.
Create an event in the CC of comp. B and declare it as "Interface" Event. This event needs to be fired when your button is clicked.
In comp. A - in the view that contains the view Containers - there you can create an event handler method for this event - within this method you fire the navigation-plug to the emptyview or set the visibility of the viewcontainer to false.
i hope that helps.
regards,
Stefan.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Stefan / Nishant,
Thanks for your suggestions. I tried another approach...
1. Created an interface node in component B. In a view of Comp. B where the action button exist, I capture the action info( GET_CURRENT_ACTION_INFO) in method WDDOBEFOREACTION and bind this to the interface node.
2. I used this interface node of comp. B in comp. A for 'Simple context mapping'. In a view of comp A the view context is mapped to this interface node of comp B. And in WDDOMODIFYVIEW I am reading this context. But the context is empty with no values passed from comp. B.. All the component usages have been properly declared.
Am I doing something wrong here? Maybe if this does not work, I may as well try Stefan's suggestion.
Regards,
Madan..
Hi Madan,
I think your way also work.
But if you can tried the below way. No need to define the node as an interface.
Simple thing
1. Take one class static variable.
2. Update the variable in the Component B with some value that represent that you have clicked on action of component B(That variable is accessible in all the components).
3. After updating the variable when system come into modify view method of component A put the condition in the modify view that if Class variable value = '2' hide the second VIEW UI element,
Thanks
Nishant
Hi Nishant,
Thanks again. I have achieved my requirement using interface node.
The reason I was not getting the data in the using component (A) was because my dynamic navigation parameter values were wrong.
if_wd_view_controller->IF_WD_NAVIGATION_SERVICES_NEW~DO_DYNAMIC_NAVIGATION(
SOURCE_WINDOW_NAME = window name of using comp. A
SOURCE_VUSAGE_NAME = usage name found in window properties
SOURCE_PLUG_NAME = outbound plug from the view in A
TARGET_COMPONENT_NAME = = Used Comp. B
TARGET_COMPONENT_USAGE = Comp. usage name for B in A
TARGET_VIEW_NAME = View name in comp. B
TARGET_PLUG_NAME = Inbound plug in comp. B
TARGET_EMBEDDING_POSITION = View in A/viewcontaineruielement name which embeds view of comp. B
Regards,
Madan
User | Count |
---|---|
62 | |
12 | |
7 | |
7 | |
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.