0

Popup window width and height not working

asked 2013-06-04 01:26:41 +0800

phasthal gravatar image phasthal
5 3

updated 2013-06-04 01:27:28 +0800

I wrote simple zul file to test the popup window behavior. though i am setting width and height to the popup, it is not reflecting in the UI.

Am i missing anything here?

here is my sample zul

<?page title="POPUP TEST" id="testPage" contentType="text/html;charset=UTF-8"?>
<window id="winTest" title="1st window" border="normal" width="500px"
    onCreate="self.doModal()">
    Hello, World!
    <button id="btn" label="popup" onClick="popup()" />

<zscript>
    void popup() {
        Window w = new Window();
        w.setTitle("another popup");
        w.setMinwidth(300);
        w.setMinheight(300);
        w.setMode("popup"); // this line not making any difference
        w.doOverlapped(); 
        w.setPage(page);
        w.doPopup();
    }

</zscript>

</window>

delete flag offensive retag edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2013-06-04 09:28:27 +0800

jatindersingh gravatar image jatindersingh
93 5
http://javaj2eehub.com/

updated 2013-06-04 17:21:52 +0800

sjoshi gravatar image sjoshi flag of India
3493 1 8
http://zkframeworkhint.bl...

Hi There please used the given below code to show popup window. The setMinheight & setMinWidth method of window is applicable only when we used setSizable(true).

Blockquote

void popup() {
        Window w = new Window();
        w.setTitle("another popup");
        w.setWidth("400px");
        w.setHeight("400px");
        w.setMinheight(200);
        w.setMinwidth(300);
        w.setSizable(true);
        w.setPosition("center");
        w.setClosable(true);
        w.setMode("popup"); // this line not making any difference
        w.doOverlapped();
        w.setPage(page);
        w.doPopup();
    }
link publish delete flag offensive edit
0

answered 2013-06-04 18:13:25 +0800

phasthal gravatar image phasthal
5 3

Thanks jatinder and sjoshi. Its working.

observed that, when I click outside the popup window, popup is getting closed automatically, how can we prevent this?

and is it ok to use w.setMode("Popup"), but I didn't see any difference in popup behavior.

link publish delete flag offensive edit

Comments

See Here http://zkframeworkhint.blogspot.in/2012/09/zk-model-window-basic-example.html i have created Demo code also you can cheek it that code also .And i will suggest you to skip JS from the ZUl page

sjoshi ( 2013-06-04 19:02:36 +0800 )edit

nice one, thanks sjoshi.

phasthal ( 2013-06-04 20:40:34 +0800 )edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
1 follower

RSS

Stats

Asked: 2013-06-04 01:26:41 +0800

Seen: 24 times

Last updated: Jun 04 '13

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More