You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Martin Steinbauer (JIRA)" <de...@myfaces.apache.org> on 2014/05/26 10:20:01 UTC

[jira] [Comment Edited] (EXTVAL-159) Duplicate NotNull Validation of Primefaces-SelectOneMenu

    [ https://issues.apache.org/jira/browse/EXTVAL-159?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14008662#comment-14008662 ] 

Martin Steinbauer edited comment on EXTVAL-159 at 5/26/14 8:19 AM:
-------------------------------------------------------------------

After some trys, it appears, that the problem just exists with the Primefaces "selectOne..."-components (specifically SelectOneMenu, SelectOneListbox, SelectOneRadio), if a null-value-item is selected. After the "PROCESS_VALIDATIONS"-Phase, there are 2 FacesMessages for these components present.

Other input-components of Primefaces are validated correctly.

If I remove the "myfaces-extval-bean-validation-2.0.7.jar"-library and add the required-attribute to the component, the validation is correct.

The problem also exists with different versions of Primefaces (3.5.13, 4.0, 5.0).


was (Author: steinb38):
After some trys, it appears, that the problem just exists with the Primefaces "selectOne..."-components (specifically SelectOneMenu, SelectOneListbox, SelectOneRadio), if a null-value-item is selected. After the "PROCESS_VALIDATIONS"-Phase, there are 2 FacesMessages for these components present.

Other input-components of Primefaces are validated correctly.

The problem also exists with different versions of Primefaces (3.5.13, 4.0, 5.0).

> Duplicate NotNull Validation of Primefaces-SelectOneMenu
> --------------------------------------------------------
>
>                 Key: EXTVAL-159
>                 URL: https://issues.apache.org/jira/browse/EXTVAL-159
>             Project: MyFaces Extensions Validator
>          Issue Type: Bug
>          Components: Bean Validation
>    Affects Versions: 2.0.7
>         Environment: Java 7, JBoss AS 7.1.3, Primefaces 4.0
>            Reporter: Martin Steinbauer
>            Assignee: Gerhard Petracek
>
> The bean validation displays the error-message twice, if it validates a Primefaces-SelectOneMenu and a @NotNull annotation is present on the property. 
> {code}
> @NotNull
> private String selectedItemP;
> @NotNull
> private String selectedItemH;
> {code}
> {code}
> <h:outputLabel for="pf" value="SelectMenue PF" />
> <p:selectOneMenu id="pf" value="#{validationBean.selectedItemP}">
> 	<f:selectItem itemLabel=" no selection " noSelectionOption="true" />
> 	<f:selectItems value="#{validationBean.items}" />
> </p:selectOneMenu>
> <h:outputLabel for="jsf" value="SelectMenue JSF" />
> <h:selectOneMenu id="jsf" value="#{validationBean.selectedItemH}">
> 	<f:selectItem itemLabel=" no selection " noSelectionOption="true"/>
> 	<f:selectItems value="#{validationBean.items}" />
> </h:selectOneMenu>
> {code}
> This behaviour does not occur using the JSF-SelectOneMenu and also if the PF-Menu is replaced with a PF-InputText.
> In those cases the validation displays only one error message.



--
This message was sent by Atlassian JIRA
(v6.2#6252)