on 01-14-2009 3:07 PM
How is it possible to set the position of an non modal external window?
I've tried it over
window.setWindowPosition(new WDCssSize(500,WDWindowUnitOfLength.PX),new WDCssSize(200, WDWindowUnitOfLength.PX));
and also over
window.setWindowPosition(500,200);
The result is always the same, the window is shown on the top left.
Best regards,
Thomas
Hi Thomas,
I set window position for a modal window and it worked for me. But you are using this for non modal external window. I am not sure that we can set position for external window too.
Have a trial like this.
Set the window size first then set position like
window.setWindowSize(500,200);
window.setWindowPosition(100,200);
Check your browser options too to open in a new window.
Regards,
Siva
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
i think i know what the problem is.
Before i show the pdf in the window, i get it from the server and store is as an CachedResource.
I've tried now to show the pdf directly from the server url and now i can control the layout of the window.
Problem is, i need to show the file from the cache for security and performance reason.
Any idea 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 Thomas,
I guess this is some compatibility issue. Try the following things:
1) Check with the following code on your side:
IWDWindow pop1=wdComponentAPI.getWindowManager().createNonModalExternalWindow("http://www.google.com","google");
pop1.setWindowSize(512,600);
pop1.setWindowPosition(50,100);
pop1.show();
Make changes in position and size. See if its working.
2) Try to check it on IE 6.0 or lesser or Mozilla 4.0. May be some compatibility issue is there.
I do not have any particular reason for your question. Some minor thing is missing here.
As you wrote its working for Inteenet Address may be something to do with the compatibility issue.
Regards.
Rajat
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
With an internet adress it is working. I've tested this allready.
Question is now, why it doesn't work in my case when i want to show an pdf file that is stored on an server?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Thomas,
I tried the same. The code I tried is:
IWDWindow pop1=wdComponentAPI.getWindowManager().createNonModalExternalWindow("http://www.google.com","google");
pop1.setWindowSize(512,600);
pop1.setWindowPosition(50,100);
pop1.show();
Its working fine for me. Even I tried changing the parameters for size and position. It worked fine.
Just 1 thing I noted in you post. You gave the code as:
window.setWindowSize(512;400);
although I think it should be
window.setWindowSize(512,400);
I do not know whether it was a typo or its in the application(it would have been syntax error in your application).
I am using IE 6.0. May be its something to do with the versioning.
Regards.
Rajat
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm using an NonModalExternalWindow.
The window is created over
IWDWindow window = wdComponentAPI.getWindowManager().createNonModalExternalWindow(res.getUrl(WDFileDownloadBehaviour.OPEN_INPLACE.ordinal()), this.wdComponentAPI.getTextAccessor().getText(IMessageZahlflow.VIEW_BELEG));
over
window.setWindowSize(512;400);
window.setWindowPosition(50,50);
the layout of the window is changed.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Thomas,
I tried this for you and I could get the solution too. As I told earlier you you need to change your browser settings too. Since you are using IE 7.0, try like this:
In IE,
Click on Tools in the menubar (in IE top-right).
Select Internet Options.
A pop-up will come
Under the General tab, we have 4 sections. 1.Home Page 2.Browsing History 3.Search 4. Tabs
Click on Settings button in Tabs section.
Here we have 3 sections of settings
The below two section are radio buttons,
For, When pop-up is encountered : Always open pop-ups in a new window
Open links from other programs in: A new window
Then click on OK.
And main popup also click on OK.
Close the browser and open your application in a new window. You will see the result that you wanted
Regards,
Siva Rama Krushna.
Hi Thomas,
Which type of external window are you creating, i.e., ExternalWindow or NonModalExternalWindow?
Also if possible give the complete code you are using?
May be there is something wrong in the code?
Regards.
Rajat
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I tried it over
window.setWindowPosition(WDWindowPos.CENTER);
but the result is the same. Positioning information are not taken.
Window still open on the top left of the screen.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Changing the postion works in an ConfirmationWindow. I've tested it already.
But i want to show content from an external server in the windows. ( pdf files etc...)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
As mentioned in the documentation of the IWDWindowMnager.
In 6.30+, the window must be amodal.
Regards,
Gayathri.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I investigate the problem further and tried also the solutions that where provided here.
In Firefox the resizing of the window works without problems. In IE 7 still the same result.
Resizing is not taken in account.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Thomas,
Try this..
String dialog = "Do you Want to Close the Application (Yes/No) ? " ;
IWDConfirmationDialog confDialog = wdComponentAPI.getWindowManager().createConfirmationWindow(dialog,wdThis.wdGetAPI().getViewInfo().getViewController().findInEventHandlers("Yes"),"Yes");
confDialog.addChoice(wdThis.wdGetAPI().getViewInfo().getViewController().findInEventHandlers("No"),"No");
confDialog.setTitle("Validation Window");
confDialog.setWindowPosition(WDWindowPos.TOP);
confDialog.setWindowSize(200,100);
confDialog.open();
Thanking You,
Mithu
Edited by: Mithu Ghosh on Jan 15, 2009 10:51 AM
Hi Thomas,
Have you tried decreasing the starting location of the window, i.e., rather than starting from 500 start from 100 and then check. May be the size of your window is exceeding and so it is taking the default settings.
Because I tried the same thing using the following code:
{pop1.setWindowPosition(50,50);}
and it worked and even i changed the parameters and even then it worked.
Regards.
Rajat
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.