on 02-10-2006 8:48 AM
Hello,
i want to check authorization for my WebDynpro-Components.
I want to use an Authorization component, so that other components can use this component. If authorization is ok, the authorization component should fire an out plug for the using component. The out plug is created in the interface view, because the using components can plug this component only via the interface view (am i wrong?). I find no way to fire the out plug of the authorization component, because i cannot access the interface view from inside the component. Can anyone helps me?
Thanks and regards,
Matthias
Hello,
thank you for your answers.
Ok, i cannot fire the out plug from the child component.
I prefer the solution from Bharathwaj:
My child component has a default view for unauthorized users. If the child component checks, that the authorization is ok, it fires an event for the parent component.
But where i can fire the out plug from the child component in the parent component. Its a general question:
Where i can fire the out plug of a child component (the plug of the interface view)?
Thanks and regards,
Matthias
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Matthias,
Inside the parent DC's window, you may embedd the interfaceviews of the child DCs. Then you can create plugs from the parentview (autherization view) to these interfaceviews and then whenever required you can fire the corresponding plug from the parentview in the normal way.
Hope this helps,
Best Regards,
Nibu.
Hi Bharathwaj,
i solved it with your answer. Thank you!
My solution:
1. Create inbound plug for authorization component.
2. Write a method in my authorization component (see Valery's help above).
3. Use the authorization component as child component from a parent component.
4. Create a navigation link from default view of parent component to the inbound plug of the authorization component.
5. In wdInit() of default view asks the authorization component if authorization is ok.
6. If not, fire plug to authorization component's view
Regards,
Matthias
Hi Matthias,
I think the best way is to organize ur project in following way...
MainDC
usedDC----AuthorizationDC
-
component1
-
component2
-
component3
means u call the interface view of authorization in mainDC if it is okay then from the MainDC control the creation and destruction of component1,2,3 means what component u want to show from the maindc .....if authorization is failed then in the authorization DC display that authorization is failed user has to relogin ........I think it is clear to u.
Regards,
yashpal
Message was edited by: Yashpal Gupta
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Matthias,
I guess using method on "Authorization" component would be mush simpler. Just declare method on "Authorization" component interface controller and implement it.
Then add usage of "Authorization" to main component, add reference to necessary controller and call something like wdThis.wdGetAuthorizationCompUsage().isAuthorized(...).
VS
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I dont think you can fire a plug from the child component to some view of the parent component.
What you can do is, create an event in Child component. which has a authrization parameter (boolean).
After the authorization check is done , raise the event from the child component with authorization status (success(true)or failure(false)) as the parameter to this event.
Read this in the parent component.. and then fire the plug to the approprite view from the parent component itself.
<a href="http://help.sap.com/saphelp_nw04/helpdata/en/24/243ca46e1c334f8a6f8b0792656bc7/content.htm">Check this for more details on implementation</a>
Regards
Bharathwaj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.