【发布时间】:2017-11-15 13:44:49
【问题描述】:
我的 p:dialog 有问题。
代码如下:
<p:dialog id="loginDialog" header="Login" width="400" widgetVar="dlg" visible="true"
rendered="#{loginBean.f_loginRendered}" closable="false" showEffect="clip" draggable="false" resizable="false"
style="box-shadow: 7px 10px 5px #303030; position:absolute;">
<h:panelGrid id="panelGrid" columns="2" cellpadding="5" style="margin: 0 auto;">
<h:outputLabel for="username" value="Username: *" />
<p:inputText id="username" value="#{loginBean.f_username}" required="true" label="Username"/>
<h:outputLabel for="password" value="Password: *" />
<p:password id="password" value="#{loginBean.f_password}" required="true" label="Password"/>
<center> <p:commandButton id="loginButton" value="Login" update="globalGrowl" actionListener="#{loginBean.checkDown}" /> </center>
</h:panelGrid >
</p:dialog>
这是一个简单的登录表单。问题是当我调整网页大小时,对话框是固定的,它不会跟随页面移动,不像图片。
我该怎么做?
【问题讨论】:
-
不像什么图片?哦,顺便说一句,你的风格有
position:absolute!!!
标签: jquery jsf login primefaces dialog