on 12-12-2012 12:16 PM
Hello,
we intend to write a reusable web dynpro component, but we face some problems with it:
the component has several views, and depending how it is called different views should be accessed. We already are that far that we know that probably we have to fire different outbound plugs, but we don't find the correct location in the component to include them. Are there some exemples on how to do this?
There is also the possibility to instantiate a component. Does this mean that an application can be called without instantiating all components immediately?
Thanks for any advise.
Regards.
Kris
1. Define the component in the the component use tab in component.
2. Goto view controller define in properties tab in used controller.
3. Use the View container UI element in Layout tab and Contextual panel UI element under View switch UI element display selected view in application.
4. Embed the used Component Views in View container.
5. Based on View switch UI element create Navigation links in Window tab Window controller.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
One idea is to create a window with an inbound plug that has a parameter (or a set of parameters). Then, in the inbound plug of the window you can write code to fire different outbound plugs. Then, link each outbound plug to a different view.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am as far as firing the outbound plug to the correct view in the WDDOBEFOREACTION action method of my main view. But I have no idea how I can tell my used component where it comes from. So I have no 'condition' to check. Is it possible to 'raise' some action I can check in this method when coming from out main component?
Thanks for helping anyway.
You can create an "interface" method in the comp controller that sets a comp controller context or attribute. Call this method from the outside application before you actually open the window. In the window, check for this value and see if it is set then it means your application has been called from the outside world.
If you are using Portal, you can do it using OBN. First, define an input parameter in the default inbound plug of the window. Then, define an application that calls this window. Then, create an OBN object and operation. In the default handler of the inbound plug, you can write code to fire outbound plugs based on the input paramter value.
In the external component that will call this applicaion, call it using navigation to OBN passing the parameter value.
Problem not yet solved.
I am as far firing the correct view the first time:
The second time I try to invoke the used component I don't go through the WDDOAFTERACTION of the MAIN_VIEW ... so the plug ot the view is not fired in this case.
Can anyone tell me where I have to put this plug so it should work?
Hi Kris,
Check out demo component WDR_TEST_CMPUSAGE in your system. There are others as well if you do a search for components named *usage*.
Cheers,
Amy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
before calling component which view needs to be called is decided?
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.