使用JSF命令按钮/按钮调用p:对话框不起作用

时间:2016-01-11 19:06:21

标签: jsf jsf-2 primefaces

我有这段代码:

$('your-div').attr('id', ($('your-div').attr('id') === 'theID' ? '' : 'theID'));

单击该按钮仅闪烁对话框 - 打开并立即关闭它。也尝试使用JSF commandButton,结果相同。使用primefaces按钮按预期工作,那么这里缺少什么JSF按钮?

1 个答案:

答案 0 :(得分:0)

改为使用<p:commandButton>

<p:commandButton value="Basic" type="button" onclick="PF('dlg1').show();" />