java - JSF 2.0 Forbid calling action after failed validation in actionListener -


itemprop = "text">

I have a dialog for adding some data:

  & lt; P: CommandButton id = "save" ActionListener = "# {adminNationalController.saveTeam}" action = "# {adminManageInternationalTournamentController.updateTeamList}" value = "# {msg.save}" ajax = "true" icon = "ui-icon- "Process =" @form "update =" lang, "onmousedown =" validateSubmit return ('addCombinedTeamForm', ['name'], 'long') "oncomplete =" if (! Args.validationFailed) addCombinedTeamDialog.hide () Name,: Management Presentation: Data List, Manage: Contract: Scroll, Menu Form: Mumble, Management: Contest: National Team "& gt; & Lt; F: setPropertyActionListener value = "# {adminNationalController.newTeamBean}" target = "# {adminManageInternationalTournamentController.newTeamBean}" /> & Lt; / P: CommandButton & gt; I try to validate the data in   

saveTeam but the action case when the verification fails.

Is it right to refuse the calling action?

After

From an action listener, you are AbortProcessingException when you are throwing The remaining actions want to cancel the process of hearing and final action.

However, it would be better to use an actual validator on the input component, in this way the whole avocational step will be bypassed.

Also see:


Comments