[
https://issues.apache.org/jira/browse/TRINIDAD-1906?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12906913#action_12906913
]
Andrew Robinson commented on TRINIDAD-1906:
-------------------------------------------
Note that I sent a question/bug to the RI team that the onEvent should be
documented on how it handles JS errors. If this were "allowed", we could simply
perform client side validation during the begin event of the JSF ajax request
and if validation fails, throw an error.
The problem with this approach, is that this assumes that the user wants client
side validation to be run before a JSF ajax request. Because JSF ajax requests
do not have to be form submissions, and may only be JSF based ajax "get"
requests, the developer may want to still go back to the server if there is
invalid data (to look up valid values to show the user for example). Forcing
client validation to be run for all JSF ajax requests could be viewed as a
severe blocking bug if the user wanted to do so.
> Client Validation igonred with <f:ajax> tag
> -------------------------------------------
>
> Key: TRINIDAD-1906
> URL: https://issues.apache.org/jira/browse/TRINIDAD-1906
> Project: MyFaces Trinidad
> Issue Type: Bug
> Affects Versions: 2.0.0.3-core
> Reporter: Matthias Weßendorf
>
> Have a form like:
> ...
> <tr:form....>
> <tr:panelFormLayout>
> <tr:inputText id="ajax" label="Field 1:">
> <f:ajax event="change" />
> </tr:inputText>
> <tr:inputText id="ppr" label="Field 2:" required="true">
> </tr:inputText>
> </tr:panelFormLayout>
> </tr:form>
> ...
> Go to field1, type and TAB out:
> => An ajax request is queued and send down to the server
> In Trinidad (with autosubmit, instead of f:ajax) you'd see a warning that
> "Field 2" is required
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.