我使用JSF 2.0和Primefaces 3.5
我有一个对话框,如果数据没有通过我的验证规则未关闭对话框
<p:commandButton id="seasonSave" actionListener="#{adminSeasonController.add()}"
action="#{adminManageTournamentController.generateTournamentNames()}"
value="#{msg.save}" ajax="true"
onmousedown="return validateSubmit('createSeasonForm', ['name_season'], 'lang')"
oncomplete="if (#{not adminSeasonController.validationFailed}) addSeasonDialog.hide()"
update=":manageTournament:name_season, :manageTournament:title ,:menuForm:growl, @form">
我在控制器validationField = true中看到,但对话框已关闭。
我如何解决我的问题?
答案 0 :(得分:2)
你可以看看这个问题的主要展示。
答案 1 :(得分:0)
<p:commandButton id="seasonSave" actionListener="#{adminSeasonController.add()}"
action="#{adminManageTournamentController.generateTournamentNames()}"
value="#{msg.save}" ajax="true"
onmousedown="return validateSubmit('createSeasonForm', ['name_season'], 'lang')"
oncomplete="if (!args.validationFailed) addSeasonDialog.hide()"
update=":manageTournament:name_season, :manageTournament:title ,:menuForm:growl, @form"/>