[richfaces-issues] [JBoss JIRA] (RF-11978) Graph Validator - does not mark context to fail validation
Brian Leathem (JIRA)
jira-events at lists.jboss.org
Wed Feb 29 12:54:36 EST 2012
[ https://issues.jboss.org/browse/RF-11978?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Brian Leathem updated RF-11978:
-------------------------------
Git Pull Request: https://github.com/richfaces/components/pull/22 (was: https://github.com/richfaces/components/pull/22)
Component/s: component-validators
> Graph Validator - does not mark context to fail validation
> ----------------------------------------------------------
>
> Key: RF-11978
> URL: https://issues.jboss.org/browse/RF-11978
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: component-validators
> Reporter: Lukáš Fryč
> Priority: Minor
> Fix For: 4.2.1.Final
>
>
> GraphValidator is using BeanValidator to check that instance does not failed [1],
> and it calls [{{facesContext.renderResponse()}}|http://docs.oracle.com/javaee/6/api/javax/faces/context/FacesContext.html#renderResponse()] when beanValidation returns some message.
> However it does not call [{{facesContext.validationFailed()}}|http://docs.oracle.com/javaee/6/api/javax/faces/context/FacesContext.html#isValidationFailed()].
> [1] https://github.com/richfaces/components/blob/develop/validator/ui/src/main/java/org/richfaces/component/AbstractGraphValidator.java#L213
> ----
> This causes problem when another component reads the [{{FacesContext.isValidationFailed()}}|http://docs.oracle.com/javaee/6/api/javax/faces/context/FacesContext.html#isValidationFailed()] flag in order to distinguish is it should proceed or not, like in following snippet.
> ----
> Following snippet is part of the wizard using togglePanel and toggleControl in order to switch panels.
> When user hits Continue button, togglePanel is switched regardless the graphValidator validation failed or not - when validation for another component like {{h:inputText}} fails, toggleControl does not switch.
> {code:XML}
> ...
> <rich:togglePanelItem>
> <!-- Step 3: password -->
> <rich:graphValidator id="passwordsValidation" value="#{passwordBean}">
>
> <rich:messages for="passwordsValidation" />
>
> <h:panelGrid columns="3">
> <h:outputLabel for="password" value="Password" />
> <h:inputSecret id="password" value="#{passwordBean.password}" />
> <rich:message for="password" />
> <h:outputLabel for="passwordConfirmation" value="Confirmation" />
> <h:inputSecret id="passwordConfirmation" value="#{passwordBean.passwordConfirmation}" />
> <rich:message for="passwordConfirmation" />
> </h:panelGrid>
>
>
> <a4j:commandButton value="Back">
> <rich:toggleControl event="click" targetItem="@prev" />
> </a4j:commandButton>
> <a4j:commandButton value="Continue">
> <rich:toggleControl event="click" targetItem="@next" />
> </a4j:commandButton>
> </rich:graphValidator>
> </rich:togglePanelItem>
> ...
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the richfaces-issues
mailing list