on 06-06-2005 10:55 AM
Hello,
I hava a DynPro application that contains search filed and a button. Pushing the button opens a result table which resides in another view below the search filed.
I would like that pressing the searcg button will open this result view in an independent window. Is it possible and how do I do that?
Hi Roy,
Create another window and place the result view inside it.
On click of teh button In the action of teh button write the code to open teh result window.
IWDWindowInfo winInfo = wdComponentAPI.getComponentInfo().findInWindows(strCommentsWindow);
IWDWindow window = wdComponentAPI.getWindowManager().createWindow(winInfo, true);
wdContext.currentVnWindowDetailsElement().setVaCommentsWindow(window);
window.setWindowPosition(WDWindowPos.CENTER);
window.setWindowSize(windowWidth,windowHeight);
window.open();
Regards,
Sowjanya.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
On the action of ur Button write the above code .
Specify ur windowname as parameter(strCommentWindow).Store the instance of the window(IwdWindow) so that u can destroy the window at a later point of time.(say on click of a button in ur popup window call another another method to destroy the window.)
IWDWindow window = wdContext.currentVnWindowDetailsElement().getVaCommentsWindow();
window.close();
window.destroy();
Regards,
Sowjanya.
Hi
If u want to open a external window u have to use
IWDWindow window = wdComponentAPI.
getWindowManager().createExternalWindow("URL", "Title",false);
Follow the below steps
1.Create a different application(application2) and component(component2) linking to the window2 in the same project
2.Deploy the application2.
3.Go to ur view implementation in the window 1 .
4.write the below code snippet to get the url
String applicationURL = WDURLGenerator.getApplicationURL(ProjectName, Application2);
5.Open external window using
IWDWindow window = wdComponentAPI.
getWindowManager().createExternalWindow(applicationURL, "Title<< For ur Window>>",false);
window.open();
Now ur window 2 will be opened in the new I.E
Hope this solves ur problem
Hey krish,
The problem that there is a Context mapping between the Result View and other views in component1. When I transfer the View to window2 at application2 this mapping will be lost. My guess is to transfer the parameters through URL instead of mapping but how Do I do that using your code?
Hi
I think Mappings Are not POssible
but u can append the required Paramters to the URl and say that as a QueryString like http://.....?Name=krish
Now
u can read that URL in the Other Application Using wdWebContextAdapter and request the Parameter and get the VAlue
WDWebContextAdapter web = null;
String Name = web.getWebContextAdapter().getRequestParameter("Name");
then U will get the Value as krish.
Hi
u can use this Link to know abt URL Generator
http://help.sap.com/saphelp_nw04/helpdata/en/9e/a073001903c9419592b14c2aa63669/frameset.htm
WDURLGenerator.getApplicationURL("local/<<ProjectName>>","<<Application Name");
Hi Aviad,
1. Create a value attribute (eg.vaParentContext) of type IWDNodeElement in the interface controller of your pop-up component.
2. Create one more attribute (eg. vaParentAttrName) of type String.
3. Write a method in the interface controller to open the pop-up window (eg. openWindow).
4. Use this component in your parent component and add the interface controller to the parent component's controller.
5. Bind the attributes to your component controller.
6. Before invoking the "openWindow()" write the following line of code
wdContext.currentContextElement().setVaParentContext(wdContext.current<<Value Node name>>Element());
wdContext.currentContextElement().setVaParentAttrName(<<attribute to which the data to be set back>>);
7. In the close event handler of the pop-up window, write the following code.
//getting the context element
IWDNodeElement nodeElt = wdContext.currentContextElement.getVaVaParentContext();
//setting the data to the parent context element
nodeElt.setAttributeValue(wdContext.currentContextElement.getVaParentAttrName(), "the value you want to set");
Hope this is clear for you.
Regards,
Santhosh.C
Dear All,
I have followed the same steps for which the solution works, but the same is not working in my case. The window, View and the application which i have created in WebDynpro exists in the same component, however i am unable get any value which has been binded to the controller.
I Tried sending the values through URL which works fine, but After all the Code is executed and the window.open() executes, a new window opens, but a nullpointer exception is displayed, which i am unable to trace in any of the method's catch statement.
I am unable to know what has been missed out. Kindly let me know if any additional settings needs to be made in the code or the design of the Window. Or is there any session problem when a new window is opened?????
Regards,
Poojith MV
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Roy,
You dont have to create a external window. YOu have to create another window for your component.
Embed this view in that window and use createWindow option to open that window.
Regards
Bharathwaj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You need to write "Window" name not View Name
IWDWindowInfo winInfo = wdComponentAPI.getComponentInfo().findInWindows(strCommentsWindow);
Where you need give window name in "strCommentsWindow"
Regards, Anilkumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you place only result view in the Window by default it will open the view only.
Just makesure that the Default as true for the resultview
Regards, Anilkumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Roy,
Did u mean that result view should open in another browser or in the same as popup?What I have written is only for popup.
Regards,
Sowjanya.
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 use wdComponentAPI.getWindowManager().createExternalWindow() with necessary parameters
The Parameters are URL , Title for the Window and true or false depending on the Modal Window.
The Above Code works only for Window which opens in new Browser
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 | |
9 | |
7 | |
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.