[jira] [Commented] (TAP5-2391) Field-specific error not shown when AJAX used
[ https://issues.apache.org/jira/browse/TAP5-2391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15902796#comment-15902796 ] Jochen Kemnade commented on TAP5-2391: -- IIUC, you should set {{simpleids="true"}} on your {{Form}}s. > Field-specific error not shown when AJAX used > - > > Key: TAP5-2391 > URL: https://issues.apache.org/jira/browse/TAP5-2391 > Project: Tapestry 5 > Issue Type: Bug > Components: tapestry-core >Affects Versions: 5.4 >Reporter: Geoff Callender >Assignee: Howard M. Lewis Ship >Priority: Blocker > Labels: 54_release_prerequisite > Fix For: 5.4 > > > Found this bug in 5.4-beta-22. I've confirmed that the bug was not present in > 5.4-beta-6. > When an error is recorded with Form.recordError(Field field, String > errorMessage) or ValidationTracker.recordError(Field field, String > errorMessage) it normally is shown in the UI by decorating the field in error > and displaying the errorMessage below it. > In 5.4-beta-6 and every release ever before that, that was the behaviour > regardless of whether the request is non-AJAX or AJAX. > In 5.4-beta-22, the behaviour changes when the request is AJAX: the field > does not display an error. That is, the field is *not* decorated and the > errorMessage is *not* shown with it. If your Errors component has > globalOnly="true", which is the norm these days, then you won't even see the > error message there! If you set globalOnly="false" then the message *is* > shown, but who would want to set globalOnly="false"??? > Comparing the HTTP responses of beta-22 with beta-6, I see that beta-6 had an > extra entry in the inits, like this: > ["t5/core/fields:showValidationError", "firstName_8cf3108fe0ece9", "First > Name must not be Acme."] -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (TAP5-2391) Field-specific error not shown when AJAX used
[ https://issues.apache.org/jira/browse/TAP5-2391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15902767#comment-15902767 ] Geoff Callender commented on TAP5-2391: --- My situations have not involved a Loop. Try http://jumpstart.doublenegative.com.au/jumpstart7/examples/ajax/form (as at JumpStart 7.0 Preview 35, using T5.4.0). > Field-specific error not shown when AJAX used > - > > Key: TAP5-2391 > URL: https://issues.apache.org/jira/browse/TAP5-2391 > Project: Tapestry 5 > Issue Type: Bug > Components: tapestry-core >Affects Versions: 5.4 >Reporter: Geoff Callender >Assignee: Howard M. Lewis Ship >Priority: Blocker > Labels: 54_release_prerequisite > Fix For: 5.4 > > > Found this bug in 5.4-beta-22. I've confirmed that the bug was not present in > 5.4-beta-6. > When an error is recorded with Form.recordError(Field field, String > errorMessage) or ValidationTracker.recordError(Field field, String > errorMessage) it normally is shown in the UI by decorating the field in error > and displaying the errorMessage below it. > In 5.4-beta-6 and every release ever before that, that was the behaviour > regardless of whether the request is non-AJAX or AJAX. > In 5.4-beta-22, the behaviour changes when the request is AJAX: the field > does not display an error. That is, the field is *not* decorated and the > errorMessage is *not* shown with it. If your Errors component has > globalOnly="true", which is the norm these days, then you won't even see the > error message there! If you set globalOnly="false" then the message *is* > shown, but who would want to set globalOnly="false"??? > Comparing the HTTP responses of beta-22 with beta-6, I see that beta-6 had an > extra entry in the inits, like this: > ["t5/core/fields:showValidationError", "firstName_8cf3108fe0ece9", "First > Name must not be Acme."] -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (TAP5-2391) Field-specific error not shown when AJAX used
[ https://issues.apache.org/jira/browse/TAP5-2391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15902734#comment-15902734 ] Jochen Kemnade commented on TAP5-2391: -- [~geoffcallender], does your issue also have to do with a {{}} like [~gchristman]'s? I just tried the "Ajax Validation" (https://git-wip-us.apache.org/repos/asf?p=tapestry-5.git;h=f9d6e0a) and "Zone Form Decoration" (https://git-wip-us.apache.org/repos/asf?p=tapestry-5.git;h=db0255c) pages in the test application and they seem to work fine. A patch with a test would still be much appreciated. > Field-specific error not shown when AJAX used > - > > Key: TAP5-2391 > URL: https://issues.apache.org/jira/browse/TAP5-2391 > Project: Tapestry 5 > Issue Type: Bug > Components: tapestry-core >Affects Versions: 5.4 >Reporter: Geoff Callender >Assignee: Howard M. Lewis Ship >Priority: Blocker > Labels: 54_release_prerequisite > Fix For: 5.4 > > > Found this bug in 5.4-beta-22. I've confirmed that the bug was not present in > 5.4-beta-6. > When an error is recorded with Form.recordError(Field field, String > errorMessage) or ValidationTracker.recordError(Field field, String > errorMessage) it normally is shown in the UI by decorating the field in error > and displaying the errorMessage below it. > In 5.4-beta-6 and every release ever before that, that was the behaviour > regardless of whether the request is non-AJAX or AJAX. > In 5.4-beta-22, the behaviour changes when the request is AJAX: the field > does not display an error. That is, the field is *not* decorated and the > errorMessage is *not* shown with it. If your Errors component has > globalOnly="true", which is the norm these days, then you won't even see the > error message there! If you set globalOnly="false" then the message *is* > shown, but who would want to set globalOnly="false"??? > Comparing the HTTP responses of beta-22 with beta-6, I see that beta-6 had an > extra entry in the inits, like this: > ["t5/core/fields:showValidationError", "firstName_8cf3108fe0ece9", "First > Name must not be Acme."] -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (TAP5-2391) Field-specific error not shown when AJAX used
[ https://issues.apache.org/jira/browse/TAP5-2391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14484350#comment-14484350 ] Howard M. Lewis Ship commented on TAP5-2391: More push-after-close improves things again; the client name from component id is working reasonably well. Perhaps in 5.5 add another parameter to give finer control. > Field-specific error not shown when AJAX used > - > > Key: TAP5-2391 > URL: https://issues.apache.org/jira/browse/TAP5-2391 > Project: Tapestry 5 > Issue Type: Bug > Components: tapestry-core >Affects Versions: 5.4 >Reporter: Geoff Callender >Assignee: Howard M. Lewis Ship >Priority: Blocker > Labels: 54_release_prerequisite > Fix For: 5.4 > > > Found this bug in 5.4-beta-22. I've confirmed that the bug was not present in > 5.4-beta-6. > When an error is recorded with Form.recordError(Field field, String > errorMessage) or ValidationTracker.recordError(Field field, String > errorMessage) it normally is shown in the UI by decorating the field in error > and displaying the errorMessage below it. > In 5.4-beta-6 and every release ever before that, that was the behaviour > regardless of whether the request is non-AJAX or AJAX. > In 5.4-beta-22, the behaviour changes when the request is AJAX: the field > does not display an error. That is, the field is *not* decorated and the > errorMessage is *not* shown with it. If your Errors component has > globalOnly="true", which is the norm these days, then you won't even see the > error message there! If you set globalOnly="false" then the message *is* > shown, but who would want to set globalOnly="false"??? > Comparing the HTTP responses of beta-22 with beta-6, I see that beta-6 had an > extra entry in the inits, like this: > ["t5/core/fields:showValidationError", "firstName_8cf3108fe0ece9", "First > Name must not be Acme."] -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (TAP5-2391) Field-specific error not shown when AJAX used
[ https://issues.apache.org/jira/browse/TAP5-2391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14484274#comment-14484274 ] Howard M. Lewis Ship commented on TAP5-2391: Ok, I've found a way that is much more palatable to make this work. Basically, it comes down to this: it was hard to coordinate the form submission with the re-rendering, largely because of complex ids (ids with a random suffix, to ensure that there are no id clashes across Ajax requests). The client id is used as the basis of the control name; the end result is that during the render, a different client id is used, and so a different control name. My latest take on the fix is to base the control name of the component's simple component id, not its dynamically allocated id (itself based on the component id). This immediately gets the desired behavior for simple forms, and probably for complex forms (with loops and conditionals) as long as there is not too much (any?) change in the structure of the data (number of iterations, selection of conditional portions) between the submit and the re-render. Ultimately, complex client-side forms by Ajax are a bit of a intractible problem, which is why I've moved more towards client solutions such as AngularJS, Backbone, or React. > Field-specific error not shown when AJAX used > - > > Key: TAP5-2391 > URL: https://issues.apache.org/jira/browse/TAP5-2391 > Project: Tapestry 5 > Issue Type: Bug > Components: tapestry-core >Affects Versions: 5.4 >Reporter: Geoff Callender >Assignee: Howard M. Lewis Ship >Priority: Blocker > Labels: 54_release_prerequisite > Fix For: 5.4 > > > Found this bug in 5.4-beta-22. I've confirmed that the bug was not present in > 5.4-beta-6. > When an error is recorded with Form.recordError(Field field, String > errorMessage) or ValidationTracker.recordError(Field field, String > errorMessage) it normally is shown in the UI by decorating the field in error > and displaying the errorMessage below it. > In 5.4-beta-6 and every release ever before that, that was the behaviour > regardless of whether the request is non-AJAX or AJAX. > In 5.4-beta-22, the behaviour changes when the request is AJAX: the field > does not display an error. That is, the field is *not* decorated and the > errorMessage is *not* shown with it. If your Errors component has > globalOnly="true", which is the norm these days, then you won't even see the > error message there! If you set globalOnly="false" then the message *is* > shown, but who would want to set globalOnly="false"??? > Comparing the HTTP responses of beta-22 with beta-6, I see that beta-6 had an > extra entry in the inits, like this: > ["t5/core/fields:showValidationError", "firstName_8cf3108fe0ece9", "First > Name must not be Acme."] -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (TAP5-2391) Field-specific error not shown when AJAX used
[ https://issues.apache.org/jira/browse/TAP5-2391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14484245#comment-14484245 ] Dimitris Zenios commented on TAP5-2391: --- It has reverted back to using control name as the key for validation tracker.Control name is generated from the client id of the component which if simple id is set to true then in an ajax request it will not change. This results in the same id being used on rendering and on submission. > Field-specific error not shown when AJAX used > - > > Key: TAP5-2391 > URL: https://issues.apache.org/jira/browse/TAP5-2391 > Project: Tapestry 5 > Issue Type: Bug > Components: tapestry-core >Affects Versions: 5.4 >Reporter: Geoff Callender >Assignee: Howard M. Lewis Ship >Priority: Blocker > Labels: 54_release_prerequisite > Fix For: 5.4 > > > Found this bug in 5.4-beta-22. I've confirmed that the bug was not present in > 5.4-beta-6. > When an error is recorded with Form.recordError(Field field, String > errorMessage) or ValidationTracker.recordError(Field field, String > errorMessage) it normally is shown in the UI by decorating the field in error > and displaying the errorMessage below it. > In 5.4-beta-6 and every release ever before that, that was the behaviour > regardless of whether the request is non-AJAX or AJAX. > In 5.4-beta-22, the behaviour changes when the request is AJAX: the field > does not display an error. That is, the field is *not* decorated and the > errorMessage is *not* shown with it. If your Errors component has > globalOnly="true", which is the norm these days, then you won't even see the > error message there! If you set globalOnly="false" then the message *is* > shown, but who would want to set globalOnly="false"??? > Comparing the HTTP responses of beta-22 with beta-6, I see that beta-6 had an > extra entry in the inits, like this: > ["t5/core/fields:showValidationError", "firstName_8cf3108fe0ece9", "First > Name must not be Acme."] -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (TAP5-2391) Field-specific error not shown when AJAX used
[ https://issues.apache.org/jira/browse/TAP5-2391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14484229#comment-14484229 ] Geoff Callender commented on TAP5-2391: --- But this issue affects non-AJAX Grids and Loops. How has this been solved? > Field-specific error not shown when AJAX used > - > > Key: TAP5-2391 > URL: https://issues.apache.org/jira/browse/TAP5-2391 > Project: Tapestry 5 > Issue Type: Bug > Components: tapestry-core >Affects Versions: 5.4 >Reporter: Geoff Callender >Assignee: Howard M. Lewis Ship >Priority: Blocker > Labels: 54_release_prerequisite > Fix For: 5.4 > > > Found this bug in 5.4-beta-22. I've confirmed that the bug was not present in > 5.4-beta-6. > When an error is recorded with Form.recordError(Field field, String > errorMessage) or ValidationTracker.recordError(Field field, String > errorMessage) it normally is shown in the UI by decorating the field in error > and displaying the errorMessage below it. > In 5.4-beta-6 and every release ever before that, that was the behaviour > regardless of whether the request is non-AJAX or AJAX. > In 5.4-beta-22, the behaviour changes when the request is AJAX: the field > does not display an error. That is, the field is *not* decorated and the > errorMessage is *not* shown with it. If your Errors component has > globalOnly="true", which is the norm these days, then you won't even see the > error message there! If you set globalOnly="false" then the message *is* > shown, but who would want to set globalOnly="false"??? > Comparing the HTTP responses of beta-22 with beta-6, I see that beta-6 had an > extra entry in the inits, like this: > ["t5/core/fields:showValidationError", "firstName_8cf3108fe0ece9", "First > Name must not be Acme."] -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (TAP5-2391) Field-specific error not shown when AJAX used
[ https://issues.apache.org/jira/browse/TAP5-2391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14484213#comment-14484213 ] Dimitris Zenios commented on TAP5-2391: --- This commit should be revert also now that validationId is removed https://git-wip-us.apache.org/repos/asf?p=tapestry-5.git;a=commit;h=ef0d1448aca3bca3ed4f8aea6fbedd6b77438fcc > Field-specific error not shown when AJAX used > - > > Key: TAP5-2391 > URL: https://issues.apache.org/jira/browse/TAP5-2391 > Project: Tapestry 5 > Issue Type: Bug > Components: tapestry-core >Affects Versions: 5.4 >Reporter: Geoff Callender >Assignee: Howard M. Lewis Ship >Priority: Blocker > Labels: 54_release_prerequisite > Fix For: 5.4 > > > Found this bug in 5.4-beta-22. I've confirmed that the bug was not present in > 5.4-beta-6. > When an error is recorded with Form.recordError(Field field, String > errorMessage) or ValidationTracker.recordError(Field field, String > errorMessage) it normally is shown in the UI by decorating the field in error > and displaying the errorMessage below it. > In 5.4-beta-6 and every release ever before that, that was the behaviour > regardless of whether the request is non-AJAX or AJAX. > In 5.4-beta-22, the behaviour changes when the request is AJAX: the field > does not display an error. That is, the field is *not* decorated and the > errorMessage is *not* shown with it. If your Errors component has > globalOnly="true", which is the norm these days, then you won't even see the > error message there! If you set globalOnly="false" then the message *is* > shown, but who would want to set globalOnly="false"??? > Comparing the HTTP responses of beta-22 with beta-6, I see that beta-6 had an > extra entry in the inits, like this: > ["t5/core/fields:showValidationError", "firstName_8cf3108fe0ece9", "First > Name must not be Acme."] -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (TAP5-2391) Field-specific error not shown when AJAX used
[ https://issues.apache.org/jira/browse/TAP5-2391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14484198#comment-14484198 ] ASF subversion and git services commented on TAP5-2391: --- Commit db0255cfc88a9737d0865446155b12d6aa606900 in tapestry-5's branch refs/heads/master from [~hlship] [ https://git-wip-us.apache.org/repos/asf?p=tapestry-5.git;h=db0255c ] Add a demo page to test out TAP5-2391 > Field-specific error not shown when AJAX used > - > > Key: TAP5-2391 > URL: https://issues.apache.org/jira/browse/TAP5-2391 > Project: Tapestry 5 > Issue Type: Bug > Components: tapestry-core >Affects Versions: 5.4 >Reporter: Geoff Callender >Assignee: Howard M. Lewis Ship >Priority: Blocker > Labels: 54_release_prerequisite > > Found this bug in 5.4-beta-22. I've confirmed that the bug was not present in > 5.4-beta-6. > When an error is recorded with Form.recordError(Field field, String > errorMessage) or ValidationTracker.recordError(Field field, String > errorMessage) it normally is shown in the UI by decorating the field in error > and displaying the errorMessage below it. > In 5.4-beta-6 and every release ever before that, that was the behaviour > regardless of whether the request is non-AJAX or AJAX. > In 5.4-beta-22, the behaviour changes when the request is AJAX: the field > does not display an error. That is, the field is *not* decorated and the > errorMessage is *not* shown with it. If your Errors component has > globalOnly="true", which is the norm these days, then you won't even see the > error message there! If you set globalOnly="false" then the message *is* > shown, but who would want to set globalOnly="false"??? > Comparing the HTTP responses of beta-22 with beta-6, I see that beta-6 had an > extra entry in the inits, like this: > ["t5/core/fields:showValidationError", "firstName_8cf3108fe0ece9", "First > Name must not be Acme."] -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (TAP5-2391) Field-specific error not shown when AJAX used
[ https://issues.apache.org/jira/browse/TAP5-2391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14484175#comment-14484175 ] Howard M. Lewis Ship commented on TAP5-2391: I've made progress on this, but it only works when the Zone's simpleIds parameter is bound to true; I'm updating the release notes. > Field-specific error not shown when AJAX used > - > > Key: TAP5-2391 > URL: https://issues.apache.org/jira/browse/TAP5-2391 > Project: Tapestry 5 > Issue Type: Bug > Components: tapestry-core >Affects Versions: 5.4 >Reporter: Geoff Callender >Assignee: Howard M. Lewis Ship >Priority: Blocker > Labels: 54_release_prerequisite > > Found this bug in 5.4-beta-22. I've confirmed that the bug was not present in > 5.4-beta-6. > When an error is recorded with Form.recordError(Field field, String > errorMessage) or ValidationTracker.recordError(Field field, String > errorMessage) it normally is shown in the UI by decorating the field in error > and displaying the errorMessage below it. > In 5.4-beta-6 and every release ever before that, that was the behaviour > regardless of whether the request is non-AJAX or AJAX. > In 5.4-beta-22, the behaviour changes when the request is AJAX: the field > does not display an error. That is, the field is *not* decorated and the > errorMessage is *not* shown with it. If your Errors component has > globalOnly="true", which is the norm these days, then you won't even see the > error message there! If you set globalOnly="false" then the message *is* > shown, but who would want to set globalOnly="false"??? > Comparing the HTTP responses of beta-22 with beta-6, I see that beta-6 had an > extra entry in the inits, like this: > ["t5/core/fields:showValidationError", "firstName_8cf3108fe0ece9", "First > Name must not be Acme."] -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (TAP5-2391) Field-specific error not shown when AJAX used
[ https://issues.apache.org/jira/browse/TAP5-2391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14481688#comment-14481688 ] Howard M. Lewis Ship commented on TAP5-2391: That sounds like a promising approach. > Field-specific error not shown when AJAX used > - > > Key: TAP5-2391 > URL: https://issues.apache.org/jira/browse/TAP5-2391 > Project: Tapestry 5 > Issue Type: Bug > Components: tapestry-core >Affects Versions: 5.4 >Reporter: Geoff Callender >Assignee: Howard M. Lewis Ship >Priority: Blocker > Labels: 54_release_prerequisite > > Found this bug in 5.4-beta-22. I've confirmed that the bug was not present in > 5.4-beta-6. > When an error is recorded with Form.recordError(Field field, String > errorMessage) or ValidationTracker.recordError(Field field, String > errorMessage) it normally is shown in the UI by decorating the field in error > and displaying the errorMessage below it. > In 5.4-beta-6 and every release ever before that, that was the behaviour > regardless of whether the request is non-AJAX or AJAX. > In 5.4-beta-22, the behaviour changes when the request is AJAX: the field > does not display an error. That is, the field is *not* decorated and the > errorMessage is *not* shown with it. If your Errors component has > globalOnly="true", which is the norm these days, then you won't even see the > error message there! If you set globalOnly="false" then the message *is* > shown, but who would want to set globalOnly="false"??? > Comparing the HTTP responses of beta-22 with beta-6, I see that beta-6 had an > extra entry in the inits, like this: > ["t5/core/fields:showValidationError", "firstName_8cf3108fe0ece9", "First > Name must not be Acme."] -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (TAP5-2391) Field-specific error not shown when AJAX used
[ https://issues.apache.org/jira/browse/TAP5-2391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14390501#comment-14390501 ] Jochen Kemnade commented on TAP5-2391: -- Maybe this can be solved by restoring the validation ID from a {{ComponentAction}}. I'd still like to have a Selenium/Geb test for this before even starting to work on a solution. I'll try to find the time next week. > Field-specific error not shown when AJAX used > - > > Key: TAP5-2391 > URL: https://issues.apache.org/jira/browse/TAP5-2391 > Project: Tapestry 5 > Issue Type: Bug > Components: tapestry-core >Affects Versions: 5.4 >Reporter: Geoff Callender >Assignee: Howard M. Lewis Ship >Priority: Blocker > Labels: 54_release_prerequisite > Fix For: 5.4 > > > Found this bug in 5.4-beta-22. I've confirmed that the bug was not present in > 5.4-beta-6. > When an error is recorded with Form.recordError(Field field, String > errorMessage) or ValidationTracker.recordError(Field field, String > errorMessage) it normally is shown in the UI by decorating the field in error > and displaying the errorMessage below it. > In 5.4-beta-6 and every release ever before that, that was the behaviour > regardless of whether the request is non-AJAX or AJAX. > In 5.4-beta-22, the behaviour changes when the request is AJAX: the field > does not display an error. That is, the field is *not* decorated and the > errorMessage is *not* shown with it. If your Errors component has > globalOnly="true", which is the norm these days, then you won't even see the > error message there! If you set globalOnly="false" then the message *is* > shown, but who would want to set globalOnly="false"??? > Comparing the HTTP responses of beta-22 with beta-6, I see that beta-6 had an > extra entry in the inits, like this: > ["t5/core/fields:showValidationError", "firstName_8cf3108fe0ece9", "First > Name must not be Acme."] -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (TAP5-2391) Field-specific error not shown when AJAX used
[ https://issues.apache.org/jira/browse/TAP5-2391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14389664#comment-14389664 ] Dimitris Zenios commented on TAP5-2391: --- I have been investigating the issue and I found the problem. After tapestry 5.4-beta26 there is a new Field interface called Field2 with a new method getValidationId().The documentation specifies that the validation id is assigned in the first read and is request scoped (AbstractField line 384) . Now when a component is inside a loop every iteration will create a new validation id even though the component instance is the same. The reason for that is the RESET_PARAMETER_CONDUIT worker on InternalComponentResources which resets the parameters after render of each component ( In the loop case after every iteration ). On submit though the RESET_PARAMETER_CONDUIT is not executed resulting in the component to have the same validation id across all iterations. Validation id is the key used in order to record the input inside validation tracker. An example with a loop a textfield and 10 iterations will record 10 different values using the same validation id.Once the submission is finished and form is re rendered the first iteration is already assigned a validation id and it gets the value from the validation tracker.All the others iteration will get a new validation id (RESET_PARAMETER_CONDUIT kicks in) without values inside the validation trackers.Thus the reason why the first text field after submission holds the value of the last text field. Solution We can use the same method Howard used with beanEditor We can push a new validation context on each loop iteration (begin render) containing a unique validation id (UUID.randomUUID().toString()) to the environment and pop after iteration (cleanup render).Once the abstract field is about to generate a validation id it will check if there is a validation context available inside the environment.If yes it will use that as a prefix along with the generated validation id of the field.Since the new validation context will be pushed also after submit (formSupport.store) then each iteration of the loop will have a unique validation id and everything will work flawlessly I know all of this sounds complicated but I couldn't find a better solution. > Field-specific error not shown when AJAX used > - > > Key: TAP5-2391 > URL: https://issues.apache.org/jira/browse/TAP5-2391 > Project: Tapestry 5 > Issue Type: Bug > Components: tapestry-core >Affects Versions: 5.4 >Reporter: Geoff Callender >Assignee: Howard M. Lewis Ship >Priority: Blocker > Labels: 54_release_prerequisite > Fix For: 5.4 > > > Found this bug in 5.4-beta-22. I've confirmed that the bug was not present in > 5.4-beta-6. > When an error is recorded with Form.recordError(Field field, String > errorMessage) or ValidationTracker.recordError(Field field, String > errorMessage) it normally is shown in the UI by decorating the field in error > and displaying the errorMessage below it. > In 5.4-beta-6 and every release ever before that, that was the behaviour > regardless of whether the request is non-AJAX or AJAX. > In 5.4-beta-22, the behaviour changes when the request is AJAX: the field > does not display an error. That is, the field is *not* decorated and the > errorMessage is *not* shown with it. If your Errors component has > globalOnly="true", which is the norm these days, then you won't even see the > error message there! If you set globalOnly="false" then the message *is* > shown, but who would want to set globalOnly="false"??? > Comparing the HTTP responses of beta-22 with beta-6, I see that beta-6 had an > extra entry in the inits, like this: > ["t5/core/fields:showValidationError", "firstName_8cf3108fe0ece9", "First > Name must not be Acme."] -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (TAP5-2391) Field-specific error not shown when AJAX used
[ https://issues.apache.org/jira/browse/TAP5-2391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14374755#comment-14374755 ] Geoff Callender commented on TAP5-2391: --- I can confirm that the original issue has been fixed in beta-26, and the new symptom that George has reported affects is not confined to AJAX calls. It affects Grid and Loop. It breaks all 6 of these examples which worked correctly in beta-22: http://jumpstart.doublenegative.com.au/jumpstart7/examples/tables/editablegrid1 http://jumpstart.doublenegative.com.au/jumpstart7/examples/tables/editablegridforupdate1 http://jumpstart.doublenegative.com.au/jumpstart7/examples/tables/gridwithdeletecolumn1 http://jumpstart.doublenegative.com.au/jumpstart7/examples/tables/editableloop1 http://jumpstart.doublenegative.com.au/jumpstart7/examples/tables/editableloopforupdate1 http://jumpstart.doublenegative.com.au/jumpstart7/examples/tables/loopwithdeletecolumn1 The symptom is that when the page returns a server-side detected error, every input-capable field of the Grid or Loop shows the same value as its counterpart in the last row. Field level error messages do not show. Some of the above examples use formstate="ITERATION", while others use a ValueEncoder. Like Felix, I see that each Field has null clientId. In these examples, when each field bubbles up VALIDATE we have an event handler that copies the Field to a FieldCopy, but the Field's clientId is null, so that's a problem when we try to use it later in Form#recordError. > Field-specific error not shown when AJAX used > - > > Key: TAP5-2391 > URL: https://issues.apache.org/jira/browse/TAP5-2391 > Project: Tapestry 5 > Issue Type: Bug > Components: tapestry-core >Affects Versions: 5.4 >Reporter: Geoff Callender >Assignee: Howard M. Lewis Ship >Priority: Critical > Labels: 54_release_prerequisite > Fix For: 5.4 > > > Found this bug in 5.4-beta-22. I've confirmed that the bug was not present in > 5.4-beta-6. > When an error is recorded with Form.recordError(Field field, String > errorMessage) or ValidationTracker.recordError(Field field, String > errorMessage) it normally is shown in the UI by decorating the field in error > and displaying the errorMessage below it. > In 5.4-beta-6 and every release ever before that, that was the behaviour > regardless of whether the request is non-AJAX or AJAX. > In 5.4-beta-22, the behaviour changes when the request is AJAX: the field > does not display an error. That is, the field is *not* decorated and the > errorMessage is *not* shown with it. If your Errors component has > globalOnly="true", which is the norm these days, then you won't even see the > error message there! If you set globalOnly="false" then the message *is* > shown, but who would want to set globalOnly="false"??? > Comparing the HTTP responses of beta-22 with beta-6, I see that beta-6 had an > extra entry in the inits, like this: > ["t5/core/fields:showValidationError", "firstName_8cf3108fe0ece9", "First > Name must not be Acme."] -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (TAP5-2391) Field-specific error not shown when AJAX used
[ https://issues.apache.org/jira/browse/TAP5-2391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14372120#comment-14372120 ] Felix Scheffer commented on TAP5-2391: -- The problem (with the code George posted above) is that all values are processed by the same instance of Textfield. So only the value of the last field is actually tracked by the ValidationTracker. All ProcessSubmission actions seem to have the same componentId. > Field-specific error not shown when AJAX used > - > > Key: TAP5-2391 > URL: https://issues.apache.org/jira/browse/TAP5-2391 > Project: Tapestry 5 > Issue Type: Bug > Components: tapestry-core >Affects Versions: 5.4 >Reporter: Geoff Callender >Assignee: Howard M. Lewis Ship >Priority: Critical > Labels: 54_release_prerequisite > Fix For: 5.4 > > > Found this bug in 5.4-beta-22. I've confirmed that the bug was not present in > 5.4-beta-6. > When an error is recorded with Form.recordError(Field field, String > errorMessage) or ValidationTracker.recordError(Field field, String > errorMessage) it normally is shown in the UI by decorating the field in error > and displaying the errorMessage below it. > In 5.4-beta-6 and every release ever before that, that was the behaviour > regardless of whether the request is non-AJAX or AJAX. > In 5.4-beta-22, the behaviour changes when the request is AJAX: the field > does not display an error. That is, the field is *not* decorated and the > errorMessage is *not* shown with it. If your Errors component has > globalOnly="true", which is the norm these days, then you won't even see the > error message there! If you set globalOnly="false" then the message *is* > shown, but who would want to set globalOnly="false"??? > Comparing the HTTP responses of beta-22 with beta-6, I see that beta-6 had an > extra entry in the inits, like this: > ["t5/core/fields:showValidationError", "firstName_8cf3108fe0ece9", "First > Name must not be Acme."] -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (TAP5-2391) Field-specific error not shown when AJAX used
[ https://issues.apache.org/jira/browse/TAP5-2391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14363145#comment-14363145 ] George Christman commented on TAP5-2391: Jochen, it's not exactly the unit test, but I did provide the code above to replicate the bug. > Field-specific error not shown when AJAX used > - > > Key: TAP5-2391 > URL: https://issues.apache.org/jira/browse/TAP5-2391 > Project: Tapestry 5 > Issue Type: Bug > Components: tapestry-core >Affects Versions: 5.4 >Reporter: Geoff Callender >Assignee: Howard M. Lewis Ship >Priority: Critical > Fix For: 5.4 > > > Found this bug in 5.4-beta-22. I've confirmed that the bug was not present in > 5.4-beta-6. > When an error is recorded with Form.recordError(Field field, String > errorMessage) or ValidationTracker.recordError(Field field, String > errorMessage) it normally is shown in the UI by decorating the field in error > and displaying the errorMessage below it. > In 5.4-beta-6 and every release ever before that, that was the behaviour > regardless of whether the request is non-AJAX or AJAX. > In 5.4-beta-22, the behaviour changes when the request is AJAX: the field > does not display an error. That is, the field is *not* decorated and the > errorMessage is *not* shown with it. If your Errors component has > globalOnly="true", which is the norm these days, then you won't even see the > error message there! If you set globalOnly="false" then the message *is* > shown, but who would want to set globalOnly="false"??? > Comparing the HTTP responses of beta-22 with beta-6, I see that beta-6 had an > extra entry in the inits, like this: > ["t5/core/fields:showValidationError", "firstName_8cf3108fe0ece9", "First > Name must not be Acme."] -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (TAP5-2391) Field-specific error not shown when AJAX used
[ https://issues.apache.org/jira/browse/TAP5-2391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14362968#comment-14362968 ] Jochen Kemnade commented on TAP5-2391: -- It would probably speed things up if someone came up with a unit test that reproduces the problem. > Field-specific error not shown when AJAX used > - > > Key: TAP5-2391 > URL: https://issues.apache.org/jira/browse/TAP5-2391 > Project: Tapestry 5 > Issue Type: Bug > Components: tapestry-core >Affects Versions: 5.4 >Reporter: Geoff Callender >Assignee: Howard M. Lewis Ship >Priority: Critical > Fix For: 5.4 > > > Found this bug in 5.4-beta-22. I've confirmed that the bug was not present in > 5.4-beta-6. > When an error is recorded with Form.recordError(Field field, String > errorMessage) or ValidationTracker.recordError(Field field, String > errorMessage) it normally is shown in the UI by decorating the field in error > and displaying the errorMessage below it. > In 5.4-beta-6 and every release ever before that, that was the behaviour > regardless of whether the request is non-AJAX or AJAX. > In 5.4-beta-22, the behaviour changes when the request is AJAX: the field > does not display an error. That is, the field is *not* decorated and the > errorMessage is *not* shown with it. If your Errors component has > globalOnly="true", which is the norm these days, then you won't even see the > error message there! If you set globalOnly="false" then the message *is* > shown, but who would want to set globalOnly="false"??? > Comparing the HTTP responses of beta-22 with beta-6, I see that beta-6 had an > extra entry in the inits, like this: > ["t5/core/fields:showValidationError", "firstName_8cf3108fe0ece9", "First > Name must not be Acme."] -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (TAP5-2391) Field-specific error not shown when AJAX used
[ https://issues.apache.org/jira/browse/TAP5-2391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14361741#comment-14361741 ] Ilya Obshadko commented on TAP5-2391: - I'd really appreciate if this is fixed as soon as possible. I heavily rely on Tapestry validation and Tapestry field-specific error messages; this bug breaks kind of everything, and the problem with resetting fields inside AjaxFormLoop in beta-26 is equally annoying. Many thanks in advance! > Field-specific error not shown when AJAX used > - > > Key: TAP5-2391 > URL: https://issues.apache.org/jira/browse/TAP5-2391 > Project: Tapestry 5 > Issue Type: Bug > Components: tapestry-core >Affects Versions: 5.4 >Reporter: Geoff Callender >Assignee: Howard M. Lewis Ship >Priority: Critical > Fix For: 5.4 > > > Found this bug in 5.4-beta-22. I've confirmed that the bug was not present in > 5.4-beta-6. > When an error is recorded with Form.recordError(Field field, String > errorMessage) or ValidationTracker.recordError(Field field, String > errorMessage) it normally is shown in the UI by decorating the field in error > and displaying the errorMessage below it. > In 5.4-beta-6 and every release ever before that, that was the behaviour > regardless of whether the request is non-AJAX or AJAX. > In 5.4-beta-22, the behaviour changes when the request is AJAX: the field > does not display an error. That is, the field is *not* decorated and the > errorMessage is *not* shown with it. If your Errors component has > globalOnly="true", which is the norm these days, then you won't even see the > error message there! If you set globalOnly="false" then the message *is* > shown, but who would want to set globalOnly="false"??? > Comparing the HTTP responses of beta-22 with beta-6, I see that beta-6 had an > extra entry in the inits, like this: > ["t5/core/fields:showValidationError", "firstName_8cf3108fe0ece9", "First > Name must not be Acme."] -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (TAP5-2391) Field-specific error not shown when AJAX used
[ https://issues.apache.org/jira/browse/TAP5-2391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14326113#comment-14326113 ] George Christman commented on TAP5-2391: I can finally replicate the bug so it can be fixed :) Okay when you have a form loop with formstate="iteration" and there is a serverside validation error, the last row's textfield value becomes the first row's textfield value. Code to replicate bug. Price public class AjaxValidationBug { @Component(id = "form") private Form form; @Property private TestObject testObject; @Property private TestObject2 testObject2; @Inject private AjaxResponseRenderer ajaxResponseRenderer; public void onPrepare() { if (testObject == null) { testObject = new TestObject(); testObject.getTestObject2s().add(new TestObject2()); testObject.getTestObject2s().add(new TestObject2()); } } public void onValidateFromForm() { for (TestObject2 testObject2 : testObject.getTestObject2s()) { if (testObject2.getPrice().compareTo(BigDecimal.ONE) > 0) { form.recordError("price must be greater than one"); } } } public void onSuccessFromForm() { System.out.println("success"); } public class TestObject { private List testObject2s; private boolean confirm; public boolean isConfirm() { return confirm; } public void setConfirm(boolean confirm) { this.confirm = confirm; } public List getTestObject2s() { if (testObject2s == null) { testObject2s = new ArrayList<>(); } return testObject2s; } public void setTestObject2s(List testObject2s) { this.testObject2s = testObject2s; } } public class TestObject2 { private BigDecimal price; public BigDecimal getPrice() { return price; } public void setPrice(BigDecimal price) { this.price = price; } } } > Field-specific error not shown when AJAX used > - > > Key: TAP5-2391 > URL: https://issues.apache.org/jira/browse/TAP5-2391 > Project: Tapestry 5 > Issue Type: Bug > Components: tapestry-core >Affects Versions: 5.4 >Reporter: Geoff Callender >Assignee: Howard M. Lewis Ship >Priority: Critical > Fix For: 5.4 > > > Found this bug in 5.4-beta-22. I've confirmed that the bug was not present in > 5.4-beta-6. > When an error is recorded with Form.recordError(Field field, String > errorMessage) or ValidationTracker.recordError(Field field, String > errorMessage) it normally is shown in the UI by decorating the field in error > and displaying the errorMessage below it. > In 5.4-beta-6 and every release ever before that, that was the behaviour > regardless of whether the request is non-AJAX or AJAX. > In 5.4-beta-22, the behaviour changes when the request is AJAX: the field > does not display an error. That is, the field is *not* decorated and the > errorMessage is *not* shown with it. If your Errors component has > globalOnly="true", which is the norm these days, then you won't even see the > error message there! If you set globalOnly="false" then the message *is* > shown, but who would want to set globalOnly="false"??? > Comparing the HTTP responses of beta-22 with beta-6, I see that beta-6 had an > extra entry in the inits, like this: > ["t5/core/fields:showValidationError", "firstName_8cf3108fe0ece9", "First > Name must not be Acme."] -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (TAP5-2391) Field-specific error not shown when AJAX used
[ https://issues.apache.org/jira/browse/TAP5-2391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14302529#comment-14302529 ] George Christman commented on TAP5-2391: That's interesting, I believe I'm using a standard tapestry form nested within ajax an ajax zone, not the beaneditform component. > Field-specific error not shown when AJAX used > - > > Key: TAP5-2391 > URL: https://issues.apache.org/jira/browse/TAP5-2391 > Project: Tapestry 5 > Issue Type: Bug > Components: tapestry-core >Affects Versions: 5.4 >Reporter: Geoff Callender >Assignee: Howard M. Lewis Ship >Priority: Critical > Fix For: 5.4 > > > Found this bug in 5.4-beta-22. I've confirmed that the bug was not present in > 5.4-beta-6. > When an error is recorded with Form.recordError(Field field, String > errorMessage) or ValidationTracker.recordError(Field field, String > errorMessage) it normally is shown in the UI by decorating the field in error > and displaying the errorMessage below it. > In 5.4-beta-6 and every release ever before that, that was the behaviour > regardless of whether the request is non-AJAX or AJAX. > In 5.4-beta-22, the behaviour changes when the request is AJAX: the field > does not display an error. That is, the field is *not* decorated and the > errorMessage is *not* shown with it. If your Errors component has > globalOnly="true", which is the norm these days, then you won't even see the > error message there! If you set globalOnly="false" then the message *is* > shown, but who would want to set globalOnly="false"??? > Comparing the HTTP responses of beta-22 with beta-6, I see that beta-6 had an > extra entry in the inits, like this: > ["t5/core/fields:showValidationError", "firstName_8cf3108fe0ece9", "First > Name must not be Acme."] -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (TAP5-2391) Field-specific error not shown when AJAX used
[ https://issues.apache.org/jira/browse/TAP5-2391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14302521#comment-14302521 ] Howard M. Lewis Ship commented on TAP5-2391: I believe it is the use of BeanEditor (or BeanEditForm) and not Ajax that's the problem. I'm working on a fix for BeanEditor. > Field-specific error not shown when AJAX used > - > > Key: TAP5-2391 > URL: https://issues.apache.org/jira/browse/TAP5-2391 > Project: Tapestry 5 > Issue Type: Bug > Components: tapestry-core >Affects Versions: 5.4 >Reporter: Geoff Callender >Assignee: Howard M. Lewis Ship >Priority: Critical > Fix For: 5.4 > > > Found this bug in 5.4-beta-22. I've confirmed that the bug was not present in > 5.4-beta-6. > When an error is recorded with Form.recordError(Field field, String > errorMessage) or ValidationTracker.recordError(Field field, String > errorMessage) it normally is shown in the UI by decorating the field in error > and displaying the errorMessage below it. > In 5.4-beta-6 and every release ever before that, that was the behaviour > regardless of whether the request is non-AJAX or AJAX. > In 5.4-beta-22, the behaviour changes when the request is AJAX: the field > does not display an error. That is, the field is *not* decorated and the > errorMessage is *not* shown with it. If your Errors component has > globalOnly="true", which is the norm these days, then you won't even see the > error message there! If you set globalOnly="false" then the message *is* > shown, but who would want to set globalOnly="false"??? > Comparing the HTTP responses of beta-22 with beta-6, I see that beta-6 had an > extra entry in the inits, like this: > ["t5/core/fields:showValidationError", "firstName_8cf3108fe0ece9", "First > Name must not be Acme."] -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (TAP5-2391) Field-specific error not shown when AJAX used
[ https://issues.apache.org/jira/browse/TAP5-2391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14278676#comment-14278676 ] George Christman commented on TAP5-2391: This repair seems to have broken the ajax form validation. When a validation error occurs during an ajax form request, the values are cleared from the form fields. This was never an issue prior to beta-26. > Field-specific error not shown when AJAX used > - > > Key: TAP5-2391 > URL: https://issues.apache.org/jira/browse/TAP5-2391 > Project: Tapestry 5 > Issue Type: Bug > Components: tapestry-core >Affects Versions: 5.4 >Reporter: Geoff Callender >Assignee: Howard M. Lewis Ship >Priority: Critical > Fix For: 5.4 > > > Found this bug in 5.4-beta-22. I've confirmed that the bug was not present in > 5.4-beta-6. > When an error is recorded with Form.recordError(Field field, String > errorMessage) or ValidationTracker.recordError(Field field, String > errorMessage) it normally is shown in the UI by decorating the field in error > and displaying the errorMessage below it. > In 5.4-beta-6 and every release ever before that, that was the behaviour > regardless of whether the request is non-AJAX or AJAX. > In 5.4-beta-22, the behaviour changes when the request is AJAX: the field > does not display an error. That is, the field is *not* decorated and the > errorMessage is *not* shown with it. If your Errors component has > globalOnly="true", which is the norm these days, then you won't even see the > error message there! If you set globalOnly="false" then the message *is* > shown, but who would want to set globalOnly="false"??? > Comparing the HTTP responses of beta-22 with beta-6, I see that beta-6 had an > extra entry in the inits, like this: > ["t5/core/fields:showValidationError", "firstName_8cf3108fe0ece9", "First > Name must not be Acme."] -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (TAP5-2391) Field-specific error not shown when AJAX used
[ https://issues.apache.org/jira/browse/TAP5-2391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14265178#comment-14265178 ] Hudson commented on TAP5-2391: -- FAILURE: Integrated in tapestry-trunk-freestyle #1372 (See [https://builds.apache.org/job/tapestry-trunk-freestyle/1372/]) TAP5-2391: Properly track Fields in ValidationTracker, even during Ajax requests (hlship: rev 280940fb098a4766effe297c20812042723529a8) * tapestry-core/src/main/java/org/apache/tapestry5/Field.java * tapestry-core/src/main/java/org/apache/tapestry5/corelib/base/AbstractField.java * tapestry-core/src/main/java/org/apache/tapestry5/Field2.java * tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app1/AjaxGroovyTests.groovy * tapestry-core/src/main/java/org/apache/tapestry5/ValidationTrackerImpl.java > Field-specific error not shown when AJAX used > - > > Key: TAP5-2391 > URL: https://issues.apache.org/jira/browse/TAP5-2391 > Project: Tapestry 5 > Issue Type: Bug > Components: tapestry-core >Affects Versions: 5.4 >Reporter: Geoff Callender >Assignee: Howard M. Lewis Ship >Priority: Critical > Fix For: 5.4 > > > Found this bug in 5.4-beta-22. I've confirmed that the bug was not present in > 5.4-beta-6. > When an error is recorded with Form.recordError(Field field, String > errorMessage) or ValidationTracker.recordError(Field field, String > errorMessage) it normally is shown in the UI by decorating the field in error > and displaying the errorMessage below it. > In 5.4-beta-6 and every release ever before that, that was the behaviour > regardless of whether the request is non-AJAX or AJAX. > In 5.4-beta-22, the behaviour changes when the request is AJAX: the field > does not display an error. That is, the field is *not* decorated and the > errorMessage is *not* shown with it. If your Errors component has > globalOnly="true", which is the norm these days, then you won't even see the > error message there! If you set globalOnly="false" then the message *is* > shown, but who would want to set globalOnly="false"??? > Comparing the HTTP responses of beta-22 with beta-6, I see that beta-6 had an > extra entry in the inits, like this: > ["t5/core/fields:showValidationError", "firstName_8cf3108fe0ece9", "First > Name must not be Acme."] -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (TAP5-2391) Field-specific error not shown when AJAX used
[ https://issues.apache.org/jira/browse/TAP5-2391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14265067#comment-14265067 ] ASF subversion and git services commented on TAP5-2391: --- Commit 280940fb098a4766effe297c20812042723529a8 in tapestry-5's branch refs/heads/master from [~hlship] [ https://git-wip-us.apache.org/repos/asf?p=tapestry-5.git;h=280940f ] TAP5-2391: Properly track Fields in ValidationTracker, even during Ajax requests > Field-specific error not shown when AJAX used > - > > Key: TAP5-2391 > URL: https://issues.apache.org/jira/browse/TAP5-2391 > Project: Tapestry 5 > Issue Type: Bug > Components: tapestry-core >Affects Versions: 5.4 >Reporter: Geoff Callender >Assignee: Howard M. Lewis Ship >Priority: Critical > Fix For: 5.4 > > > Found this bug in 5.4-beta-22. I've confirmed that the bug was not present in > 5.4-beta-6. > When an error is recorded with Form.recordError(Field field, String > errorMessage) or ValidationTracker.recordError(Field field, String > errorMessage) it normally is shown in the UI by decorating the field in error > and displaying the errorMessage below it. > In 5.4-beta-6 and every release ever before that, that was the behaviour > regardless of whether the request is non-AJAX or AJAX. > In 5.4-beta-22, the behaviour changes when the request is AJAX: the field > does not display an error. That is, the field is *not* decorated and the > errorMessage is *not* shown with it. If your Errors component has > globalOnly="true", which is the norm these days, then you won't even see the > error message there! If you set globalOnly="false" then the message *is* > shown, but who would want to set globalOnly="false"??? > Comparing the HTTP responses of beta-22 with beta-6, I see that beta-6 had an > extra entry in the inits, like this: > ["t5/core/fields:showValidationError", "firstName_8cf3108fe0ece9", "First > Name must not be Acme."] -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (TAP5-2391) Field-specific error not shown when AJAX used
[ https://issues.apache.org/jira/browse/TAP5-2391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14158972#comment-14158972 ] Geoff Callender commented on TAP5-2391: --- Ouch. If it's no longer possible to make Form#recordError(Field field, String errorMessage) and ValidationTracker#recordError(Field field, String errorMessage) work correctly - i.e. decorate the field in error - in AJAX responses, then please *auto-convert the error into a global error*, so that it will be seen when . > Field-specific error not shown when AJAX used > - > > Key: TAP5-2391 > URL: https://issues.apache.org/jira/browse/TAP5-2391 > Project: Tapestry 5 > Issue Type: Bug > Components: tapestry-core >Affects Versions: 5.4 >Reporter: Geoff Callender >Assignee: Howard M. Lewis Ship >Priority: Critical > > Found this bug in 5.4-beta-22. I've confirmed that the bug was not present in > 5.4-beta-6. > When an error is recorded with Form.recordError(Field field, String > errorMessage) or ValidationTracker.recordError(Field field, String > errorMessage) it normally is shown in the UI by decorating the field in error > and displaying the errorMessage below it. > However, when the request is AJAX, the field is no longer being decorated and > the errorMessage isn't shown with it. I have verified that the client knows > about the error, because will show it. > Comparing the HTTP responses of beta-22 with beta-6, I see that beta-6 has an > extra entry in the inits, like this: > ["t5/core/fields:showValidationError", "firstName_8cf3108fe0ece9", "First > Name must not be Acme."] -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (TAP5-2391) Field-specific error not shown when AJAX used
[ https://issues.apache.org/jira/browse/TAP5-2391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14158817#comment-14158817 ] Hudson commented on TAP5-2391: -- SUCCESS: Integrated in tapestry-trunk-freestyle #1336 (See [https://builds.apache.org/job/tapestry-trunk-freestyle/1336/]) Add some tests related to TAP5-2391 (hlship: rev f9d6e0a6477b71630801b7a55a66a54de997ee82) * tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app1/pages/AjaxValidationDemo.groovy * tapestry-core/src/test/app1/AjaxValidationDemo.tml * tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/Index.java > Field-specific error not shown when AJAX used > - > > Key: TAP5-2391 > URL: https://issues.apache.org/jira/browse/TAP5-2391 > Project: Tapestry 5 > Issue Type: Bug > Components: tapestry-core >Affects Versions: 5.4 >Reporter: Geoff Callender >Assignee: Howard M. Lewis Ship >Priority: Critical > > Found this bug in 5.4-beta-22. I've confirmed that the bug was not present in > 5.4-beta-6. > When an error is recorded with Form.recordError(Field field, String > errorMessage) or ValidationTracker.recordError(Field field, String > errorMessage) it normally is shown in the UI by decorating the field in error > and displaying the errorMessage below it. > However, when the request is AJAX, the field is no longer being decorated and > the errorMessage isn't shown with it. I have verified that the client knows > about the error, because will show it. > Comparing the HTTP responses of beta-22 with beta-6, I see that beta-6 has an > extra entry in the inits, like this: > ["t5/core/fields:showValidationError", "firstName_8cf3108fe0ece9", "First > Name must not be Acme."] -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (TAP5-2391) Field-specific error not shown when AJAX used
[ https://issues.apache.org/jira/browse/TAP5-2391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14158709#comment-14158709 ] ASF subversion and git services commented on TAP5-2391: --- Commit f9d6e0a6477b71630801b7a55a66a54de997ee82 in tapestry-5's branch refs/heads/master from [~hlship] [ https://git-wip-us.apache.org/repos/asf?p=tapestry-5.git;h=f9d6e0a ] Add some tests related to TAP5-2391 > Field-specific error not shown when AJAX used > - > > Key: TAP5-2391 > URL: https://issues.apache.org/jira/browse/TAP5-2391 > Project: Tapestry 5 > Issue Type: Bug > Components: tapestry-core >Affects Versions: 5.4 >Reporter: Geoff Callender >Assignee: Howard M. Lewis Ship >Priority: Critical > > Found this bug in 5.4-beta-22. I've confirmed that the bug was not present in > 5.4-beta-6. > When an error is recorded with Form.recordError(Field field, String > errorMessage) or ValidationTracker.recordError(Field field, String > errorMessage) it normally is shown in the UI by decorating the field in error > and displaying the errorMessage below it. > However, when the request is AJAX, the field is no longer being decorated and > the errorMessage isn't shown with it. I have verified that the client knows > about the error, because will show it. > Comparing the HTTP responses of beta-22 with beta-6, I see that beta-6 has an > extra entry in the inits, like this: > ["t5/core/fields:showValidationError", "firstName_8cf3108fe0ece9", "First > Name must not be Acme."] -- This message was sent by Atlassian JIRA (v6.3.4#6332)