You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Gerhard Petracek (JIRA)" <de...@myfaces.apache.org> on 2014/05/31 12:30:02 UTC

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

     [ https://issues.apache.org/jira/browse/EXTVAL-159?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gerhard Petracek resolved EXTVAL-159.
-------------------------------------

    Resolution: Won't Fix

primefaces is creating a renderer in a renderer.

see SelectOneMenuRenderer#getConvertedValue
calls
context.getRenderKit().getRenderer("javax.faces.SelectOne", "javax.faces.Menu").getConvertedValue(...);

we could only fix that by inspecting the callstack (in ExtValRenderKit#createWrapper) which introduces an overhead. since both (primefaces as well as extval) are using tricks, one side needs to improve it. please reopen this ticket, if they can't change it.

> 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
>         Attachments: test-jsf-extval.zip
>
>
> 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)