on 10-05-2009 12:13 PM
Dear All,
I am using NetWeaver 7.1 sp1 and facing a problem. Actually I want to show a view in popup window. The popup window works fine but i want to get currently popup window. How can i get it in View and controller ??
I found a solution : wdContext.currentPopupElement().getWindowInstacnce();
but in wdContext there is no method like .currentPopupElement(). plz help.
thks all
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can store the popup window in a context attribute of the component controller and map this attribute from any other controller that needs to access the popup. The sample code you gave obviously uses a helper node named "Popup" (probably cardinality=1:1, selection=1:1) that contains this attribute which is named "windowInstance", but you can also add it directly to the context root.
Maybe even better would be to encapsulate the opening and closing of the popup with component controller methods and keep the window instance private to the component controller.
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Armin,
I thought the Component's and View's were treated as Request Bean's and could be destroyed or server thru different requisitions based on server load / demand. Context of course would be Session based. - So I'd not use instance variables unless they were Singletons. Can you confirm?
Otherwise, we would have one instance of a window, one instance of the component for each requisition, or client. That means, 1000 clients, 1000 of the same view being maintained in server memory? - I really hope it's not like this.
Regards,
Daniel
Hi Armin,
In a simple way, I'm recommending using a Context Variable, type IWDWindow to store the reference of the Window in the user Session Context.
Storing instance variables inside a View (which later will be used) is too risk since most View's we use has lifespan "framework_controlled". You can still use them, but in the problem above, best choice is keeping it in the Context.
Regards,
Daniel
Hi
wdContext.currentPopupElement().getWindowInstacnce();
Here PopupElement is a attribute of IWDWindow type where u have to put the window instances (say For close or life control of that popup)
For further plz go through these doc
1. [Dialog|http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/903fed0d-7be4-2a10-cd96-9136707374e1&overridelayout=true]
2. [Popup Window|http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/a04870c5-749b-2b10-06ba-d25515ef39e3&overridelayout=true]
Best Regards
Satish Kumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
please go through this pdf,
Regards,
Ramesh Babu.V
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Check if you have Popup value node in your context hierarchy in NWDS. Also post your context hierarchy.
Chintan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
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.