0

doModal method not center the window

asked 2009-12-15 21:12:14 +0800

wanlim0817 gravatar image wanlim0817
45

updated 2009-12-15 21:18:51 +0800

In ZK5 RC2,I have a problem which is that one of my zul files(articleInfoDialog.zul) call the doModal method,it can not be center in the explorer. it just append in the current window of the articleList.zul. there has a picture: see picture

in the articleList.zul, I call the articleInfoDialog.zul like this.
win = (Window) Executions.createComponents(
"/WEB-INF/pages/content/article/articleInfoDialog.zul", null,
map);
}


and in the articleInfoDialog onCreate event

I just call "articleInfoDialogWindow.doModal();"

and it works fine few days ago.


there is all my articleInfoDialog.zul code


<?page title="添加新闻" contentType="text/html;charset=UTF-8"?>

<zk>
<window title="新 闻 管 理 " id="articleInfoDialogWindow"
use="cn.ipow.frontend.webui.content.article.ArticleInfoDialogCtrl"
border="normal" closable="true" height="auto" width="900px">
<panel title="基本功能">
<panelchildren>
<grid width="100%">
<columns>
<column width="100px" />
<column />
</columns>
<rows>
<row>
<label width="15%" value="标题:" />
<textbox value="" width="300px" />
</row>
<row>
<label value="副标题:" />
<textbox value="" width="300px" />
</row>
<row>
<label value="类别:" />
<hbox>
<listbox mold="select"
id="lbxArticleClass" rows="1">
<listitem label="园区公告" value="1"></listitem>
</listbox>
<button id="btn_AddArticleInfo_AddClass"
label="新增分类">
</button>
</hbox>
</row>
<row>
发布时间:
<datebox></datebox>
</row>
<row>
内容:
<hbox hflex="1" pack="stretch">
<ckeditor id="ed"></ckeditor>
</hbox>
</row>
</rows>
</grid>

</panelchildren>
</panel>
<panel title="高级功能" open="false" collapsible="true">
<panelchildren>
<grid>
<columns>
<column width="100px" />
<column />
</columns>
<rows>
<row>
<label value="图片新闻顺序:"></label>
<combobox>
<comboitem label="1" value="1"></comboitem>
<comboitem label="2" value="2"></comboitem>
</combobox>
</row>
<row>
图片新闻地址:
<textbox id="newsPicUrl"></textbox>
</row>
<row>
是否首页显示:
<checkbox id="isAdvance"></checkbox>
</row>
</rows>
</grid>
</panelchildren>
</panel>
<panel>
<panelchildren>
<div id="divSouth" width="100%" align="cnter">
<hbox style="padding:3px;" spacing="3px"
pack="end">
<button id="btnNew" height="20"
label="${c:l('btnNew.label')}"
tooltiptext="${c:l('btnNew.tooltiptext')}" />
<button id="btnEdit" height="20"
label="${c:l('btnEdit.label')}"
tooltiptext="${c:l('btnEdit.tooltiptext')}" />
<button id="btnDelete" height="20"
label="${c:l('btnDelete.label')}"
tooltiptext="${c:l('btnDelete.tooltiptext')}" />
<button id="btnSave" height="20"
label="${c:l('btnSave.label')}"
tooltiptext="${c:l('btnSave.tooltiptext')}" />
<button id="btnClose" height="20"
label="${c:l('btnClose.label')}"
tooltiptext="${c:l('btnClose.tooltiptext')}" />
</hbox>
</div>
</panelchildren>
</panel>
</window>
</zk>

delete flag offensive retag edit

6 Replies

Sort by » oldest newest

answered 2009-12-16 08:07:19 +0800

terrytornado gravatar image terrytornado flag of Germany
9393 3 7 16
http://www.oxitec.de/

Hmmmmmmmmm,

and it works fine few days ago. 

are you sure you have no error by creating the DialogWindow components??
If there is an error by creating components in such a dialog, this dialog window is shown under the window above.

best
Stephan

link publish delete flag offensive edit

answered 2009-12-16 09:20:28 +0800

caclark gravatar image caclark
1753 2 5
http://clarktrips.intltwi...

doModal() should center for you but obviously isn't. Have you tried specifying the center or top + left attributes of articleInfoDialogWindow to see if that affects it?

link publish delete flag offensive edit

answered 2009-12-16 20:27:55 +0800

samchuang gravatar image samchuang
4084 4

Hi ~~

try to use <window position="left,top">

link publish delete flag offensive edit

answered 2009-12-17 19:24:44 +0800

wanlim0817 gravatar image wanlim0817
45

hi,everybody,thanks for your help,it's my fault,there is a problem when I create the articleInfoDialogWindow,so the doModal method didn't excute.and wanna to say that I'm learning lots of things from Stephan ZK Sample Appliecation,it's a wonderful work,thanks,Stephan.Hope your and your family happiness forever.

link publish delete flag offensive edit

answered 2009-12-18 08:05:17 +0800

terrytornado gravatar image terrytornado flag of Germany
9393 3 7 16
http://www.oxitec.de/

thx. Have a look in the next days for the big update.

best
Stephan

link publish delete flag offensive edit

answered 2010-06-08 01:54:30 +0800

jlm1016 gravatar image jlm1016
6

I get the help from talking

link publish delete flag offensive edit
Your reply
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

RSS

Stats

Asked: 2009-12-15 21:12:14 +0800

Seen: 964 times

Last updated: Jun 08 '10

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