我想p:dataTable在模态中显示一个内部p:dialog(需要删除的条目).当我像附加示例那样执行类似操作时,对话框显示为100%宽度.我怎么能避免这个?如果没有p:datatable,则根据其内容呈现对话框.
最小的例子:
<p:dialog header="Example" widgetVar="exampleDlg" closable="true"
resizable="false" appendTo="@(body)" modal="true">
<h:form id="exampleForm">
<p:dataTable emptyMessage="Even an empty DataTale">
</p:dataTable>
</h:form>
</p:dialog>
Run Code Online (Sandbox Code Playgroud)
我在使用Primefaces 5.1快照,但5.0版也一样.我尝试了afterdark,bootstrap和默认主题,总是同样的问题.
我想p:confirmDialog基于bean布尔值打开一个全局.我想要这样的东西:
<p:commandButton value="Save" actionListener="#{bean.save}"
update="@form" oncomplete="jsfunction();">
<p:confirm header="Confirm" message="Are you sure?" rendered="#{bean.boolean}"/>
</p:commandButton>
Run Code Online (Sandbox Code Playgroud)
但渲染在那里不起作用(我希望).
此外,我不想复制p:commandButton并使用其呈现的属性来实现这一点.
有没有办法在不改变太多东西的情况下完成这项工作?我必须在很多按钮中做到这一点.