on 01-10-2008 7:16 AM
hi,
i hv 2 views in my appln.
the 1st 1 is the default view which has a btn "to".
nw i want to see my 2nd view as a popup when i click on "to".
and i want to create it DYNAMICALLY.
plz help.
are there any pdfs for dynmic creation of popup menus?
thanx.
regards,
ankita
I've a window containing 4 views. I want to popup a view based on some condition. So that I can show each view as a popup based on some condition... Can anybody explain how can I do this?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi u can follow like below.
u can create another windowIn that window u can embed one view.
In the default view u can create a button and create one action and attach this action to the buuton.
In the above action u can write the following code,
IWDWindowInfo winfo=wdcomponentapi.getcomponentInfo().findinwindows("windowname");
IWDWindow win=wdcomponentAPI().getWindowManager().createWindow(winfo,false);
win.open();
Regards
Hazrath.G
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey if you want to close the pop-up window in the pop-window itself then declare the above code in the component controller.create two methods open and close.in the open you write the above code.in the close method
win.close();
also declare the wininfo,win in the global space.(between start and end of others).
so that you can call the methods open ad close from any of the views as the instance is available for any of the views.
Hi Ankita,
First embed your SecondView in some window say 'SecondWin'
In Your Controller write this code::
==========================================
public void PopUpFunction(){
IWDWindow window;
IWDWindowInfo windowInfo;
try{
windowInfo = (IWDWindowInfo)wdComponentAPI.getComponentInfo().findInWindows("SecondWin");
window = wdComponentAPI.getWindowManager().createModalWindow(windowInfo);
IWindow wnd=(IWindow)(window);
wnd.setTitle("Second View");
//Can Set various other properties of window. like WindowSize, removeWindowFeature
wnd.open();
}
catch(Exception e){
IWDMessageManager msgMrg = wdThis.wdGetAPI().getComponent().getMessageManager();
msgMrg.reportException(e.toString());
}
}
========================
Finally, on action of 'to' button write ::
wdThis.wdGet<component Name>Controller().PopUpFunction();
Hope this code will help you to create dynamically popup window. This will open the Second View which is embedded into SecondWin
Let me know, if problem still exists.
Regards,
Nittin Garg
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi Nittin,
thanx for ur help;
actually i hv created my appln dynamically.
i hv only 1 event handler that controls all my btn actions.
nw in that hanndler i check for the reqd btn and write the comlete code there.
As:
else if(Command.equals("to"))
{
IWDWindowInfo win = wdComponentAPI.getComponentInfo().findInWindows("Address_Win");
IWDWindow window = wdComponentAPI.getWindowManager().createWindow(win,true);
window.setWindowPosition(300,300);
window.open();
}
nw my prob is im nt able to get my dynamically created node.
so i dont understand what to write after: window.open();
plz help.
regards,
ankita
Hi Ankita,
try to use the same code (for win popup) in controller (as popup function) instead of view.
else if(Command.equals("to"))
{
wdThis.wdGet<component Name>Controller.PopUpFunction();
}
one more thing declare window varaibles as mentioned below (In the Component Controller), instead of PopUpFunction...
//@@begin others
IWDWindow window;
IWDWindowInfo windowInfo;
//@@end
Nothing else is required after window.open();
btw what do you mean by 'not able to get my dynamically created node'.
Hope this will help!!
I have been able to Open the Popup window using the above mentioned. I have used code in the Action of 'to' button. **
Regards,
Nittin Garg
Edited by: Nittin Garg on Jan 10, 2008 1:55 PM
Hi,
It seems that you want to create popup windows. Check the link below:
[https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/user-interface-technology/webdynpro/wd%20java/wdjava%20tutorials%20and%20articles%20archive/dialog%20boxes%20in%20web%20dynpro%20applications.pdf]
thanks & regards,
Manoj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You can create a window and embed the second view to it and call the window from the button from first view.
Kind Regards,
Saravanan K
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.