You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by "Hugo Palma (JIRA)" <ji...@apache.org> on 2010/11/10 11:07:14 UTC

[jira] Created: (TAP5-1339) ValidationDecorator doesn't get called when form is rendered for zone update

ValidationDecorator doesn't get called when form is rendered for zone update
----------------------------------------------------------------------------

                 Key: TAP5-1339
                 URL: https://issues.apache.org/jira/browse/TAP5-1339
             Project: Tapestry 5
          Issue Type: Bug
          Components: tapestry-core
    Affects Versions: 5.2.3
            Reporter: Hugo Palma
            Priority: Minor


I contributed a custom ValidationDecorator which works fine when the form is rendered as part of the normal page render lifecycle.
But, if i update a zone with the same form component the ValidationDecorator doesn't get executed and as such the form doesn't get decorated.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TAP5-1339) ValidationDecorator doesn't get called when form is rendered for zone update

Posted by "Hugo Palma (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TAP5-1339?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12930573#action_12930573 ] 

Hugo Palma commented on TAP5-1339:
----------------------------------

The problem seems to be that the inject ValidationDecorator into the Label component is not the contributed one but the default BaseValidationDecorator.

Again, this only happens when the form is rendered by a zone update.

> ValidationDecorator doesn't get called when form is rendered for zone update
> ----------------------------------------------------------------------------
>
>                 Key: TAP5-1339
>                 URL: https://issues.apache.org/jira/browse/TAP5-1339
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.2.3
>            Reporter: Hugo Palma
>            Priority: Minor
>
> I contributed a custom ValidationDecorator which works fine when the form is rendered as part of the normal page render lifecycle.
> But, if i update a zone with the same form component the ValidationDecorator doesn't get executed and as such the form doesn't get decorated.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] [Commented] (TAP5-1339) Provide a single extension point to provide a ValidationDecorator instance for both traditional and Ajax renders

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TAP5-1339?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13113643#comment-13113643 ] 

Hudson commented on TAP5-1339:
------------------------------

Integrated in tapestry-trunk-freestyle #537 (See [https://builds.apache.org/job/tapestry-trunk-freestyle/537/])
    TAP5-1339: ValidationDecorator doesn't get called when form is rendered for zone update

hlship : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1174925
Files : 
* /tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ValidationDecoratorFactoryImpl.java
* /tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/TapestryModule.java
* /tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/ValidationDecoratorFactory.java


> Provide a single extension point to provide a ValidationDecorator instance for both traditional and Ajax renders
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: TAP5-1339
>                 URL: https://issues.apache.org/jira/browse/TAP5-1339
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.2.3
>            Reporter: Hugo Palma
>            Assignee: Howard M. Lewis Ship
>            Priority: Minor
>             Fix For: 5.3
>
>
> I contributed a custom ValidationDecorator which works fine when the form is rendered as part of the normal page render lifecycle.
> But, if i update a zone with the same form component the ValidationDecorator doesn't get executed and as such the form doesn't get decorated.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (TAP5-1339) Provide a single extension point to provide a ValidationDecorator instance for both traditional and Ajax renders

Posted by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-1339?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Howard M. Lewis Ship updated TAP5-1339:
---------------------------------------

    Summary: Provide a single extension point to provide a ValidationDecorator instance for both traditional and Ajax renders  (was: ValidationDecorator doesn't get called when form is rendered for zone update)

I've really changed this ... your problem is (I'm assuming) that you overrode Tapestry's use of DefaultValidationDecorator for traditional requests, but not for Ajax requests.

I've introduce a new service, ValidationDecoratorFactory, that can be overridden to catch both cases.

> Provide a single extension point to provide a ValidationDecorator instance for both traditional and Ajax renders
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: TAP5-1339
>                 URL: https://issues.apache.org/jira/browse/TAP5-1339
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.2.3
>            Reporter: Hugo Palma
>            Priority: Minor
>             Fix For: 5.3
>
>
> I contributed a custom ValidationDecorator which works fine when the form is rendered as part of the normal page render lifecycle.
> But, if i update a zone with the same form component the ValidationDecorator doesn't get executed and as such the form doesn't get decorated.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (TAP5-1339) ValidationDecorator doesn't get called when form is rendered for zone update

Posted by "Hugo Palma (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TAP5-1339?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12930573#action_12930573 ] 

Hugo Palma commented on TAP5-1339:
----------------------------------

The problem seems to be that the inject ValidationDecorator into the Label component is not the contributed one but the default BaseValidationDecorator.

Again, this only happens when the form is rendered by a zone update.

> ValidationDecorator doesn't get called when form is rendered for zone update
> ----------------------------------------------------------------------------
>
>                 Key: TAP5-1339
>                 URL: https://issues.apache.org/jira/browse/TAP5-1339
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.2.3
>            Reporter: Hugo Palma
>            Priority: Minor
>
> I contributed a custom ValidationDecorator which works fine when the form is rendered as part of the normal page render lifecycle.
> But, if i update a zone with the same form component the ValidationDecorator doesn't get executed and as such the form doesn't get decorated.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TAP5-1339) ValidationDecorator doesn't get called when form is rendered for zone update

Posted by "Hugo Palma (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TAP5-1339?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12930775#action_12930775 ] 

Hugo Palma commented on TAP5-1339:
----------------------------------

A workaround for this:

public void contributeMarkupRenderer(OrderedConfiguration<MarkupRendererFilter> configuration, final Environment environment) {

               MarkupRendererFilter defaultValidationDecorator = new MarkupRendererFilter() {
                       public void renderMarkup(MarkupWriter writer, MarkupRenderer renderer) {
                               environment.push(ValidationDecorator.class, new MyValidatorDecorator(environment, writer));
                               renderer.renderMarkup(writer);
                               environment.pop(ValidationDecorator.class);
                       }
               };

               configuration.add("MyValidatorDecorator", defaultValidationDecorator, "after:DefaultValidationDecorator");
       }

       public void contributePartialMarkupRenderer(OrderedConfiguration<PartialMarkupRendererFilter> configuration,
               final Environment environment) {

               PartialMarkupRendererFilter defaultValidationDecorator = new PartialMarkupRendererFilter() {
                       public void renderMarkup(MarkupWriter writer, JSONObject reply, PartialMarkupRenderer renderer) {
                               environment.push(ValidationDecorator.class, new MyValidatorDecorator(environment, writer));
                               renderer.renderMarkup(writer, reply);
                               environment.pop(ValidationDecorator.class);
                       }
               };

               configuration.add("MyValidatorDecorator", defaultValidationDecorator, "after:DefaultValidationDecorator");
}

Still, i don't think this invalidates this issue as it should work out-of-the-box.

> ValidationDecorator doesn't get called when form is rendered for zone update
> ----------------------------------------------------------------------------
>
>                 Key: TAP5-1339
>                 URL: https://issues.apache.org/jira/browse/TAP5-1339
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.2.3
>            Reporter: Hugo Palma
>            Priority: Minor
>
> I contributed a custom ValidationDecorator which works fine when the form is rendered as part of the normal page render lifecycle.
> But, if i update a zone with the same form component the ValidationDecorator doesn't get executed and as such the form doesn't get decorated.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TAP5-1339) ValidationDecorator doesn't get called when form is rendered for zone update

Posted by "Hugo Palma (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TAP5-1339?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12930775#action_12930775 ] 

Hugo Palma commented on TAP5-1339:
----------------------------------

A workaround for this:

public void contributeMarkupRenderer(OrderedConfiguration<MarkupRendererFilter> configuration, final Environment environment) {

               MarkupRendererFilter defaultValidationDecorator = new MarkupRendererFilter() {
                       public void renderMarkup(MarkupWriter writer, MarkupRenderer renderer) {
                               environment.push(ValidationDecorator.class, new MyValidatorDecorator(environment, writer));
                               renderer.renderMarkup(writer);
                               environment.pop(ValidationDecorator.class);
                       }
               };

               configuration.add("MyValidatorDecorator", defaultValidationDecorator, "after:DefaultValidationDecorator");
       }

       public void contributePartialMarkupRenderer(OrderedConfiguration<PartialMarkupRendererFilter> configuration,
               final Environment environment) {

               PartialMarkupRendererFilter defaultValidationDecorator = new PartialMarkupRendererFilter() {
                       public void renderMarkup(MarkupWriter writer, JSONObject reply, PartialMarkupRenderer renderer) {
                               environment.push(ValidationDecorator.class, new MyValidatorDecorator(environment, writer));
                               renderer.renderMarkup(writer, reply);
                               environment.pop(ValidationDecorator.class);
                       }
               };

               configuration.add("MyValidatorDecorator", defaultValidationDecorator, "after:DefaultValidationDecorator");
}

Still, i don't think this invalidates this issue as it should work out-of-the-box.

> ValidationDecorator doesn't get called when form is rendered for zone update
> ----------------------------------------------------------------------------
>
>                 Key: TAP5-1339
>                 URL: https://issues.apache.org/jira/browse/TAP5-1339
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.2.3
>            Reporter: Hugo Palma
>            Priority: Minor
>
> I contributed a custom ValidationDecorator which works fine when the form is rendered as part of the normal page render lifecycle.
> But, if i update a zone with the same form component the ValidationDecorator doesn't get executed and as such the form doesn't get decorated.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] [Closed] (TAP5-1339) Provide a single extension point to provide a ValidationDecorator instance for both traditional and Ajax renders

Posted by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-1339?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Howard M. Lewis Ship closed TAP5-1339.
--------------------------------------

       Resolution: Fixed
    Fix Version/s: 5.3
         Assignee: Howard M. Lewis Ship

> Provide a single extension point to provide a ValidationDecorator instance for both traditional and Ajax renders
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: TAP5-1339
>                 URL: https://issues.apache.org/jira/browse/TAP5-1339
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.2.3
>            Reporter: Hugo Palma
>            Assignee: Howard M. Lewis Ship
>            Priority: Minor
>             Fix For: 5.3
>
>
> I contributed a custom ValidationDecorator which works fine when the form is rendered as part of the normal page render lifecycle.
> But, if i update a zone with the same form component the ValidationDecorator doesn't get executed and as such the form doesn't get decorated.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (TAP5-1339) Provide a single extension point to provide a ValidationDecorator instance for both traditional and Ajax renders

Posted by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-1339?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Howard M. Lewis Ship updated TAP5-1339:
---------------------------------------

    Summary: Provide a single extension point to provide a ValidationDecorator instance for both traditional and Ajax renders  (was: ValidationDecorator doesn't get called when form is rendered for zone update)

I've really changed this ... your problem is (I'm assuming) that you overrode Tapestry's use of DefaultValidationDecorator for traditional requests, but not for Ajax requests.

I've introduce a new service, ValidationDecoratorFactory, that can be overridden to catch both cases.

> Provide a single extension point to provide a ValidationDecorator instance for both traditional and Ajax renders
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: TAP5-1339
>                 URL: https://issues.apache.org/jira/browse/TAP5-1339
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.2.3
>            Reporter: Hugo Palma
>            Priority: Minor
>             Fix For: 5.3
>
>
> I contributed a custom ValidationDecorator which works fine when the form is rendered as part of the normal page render lifecycle.
> But, if i update a zone with the same form component the ValidationDecorator doesn't get executed and as such the form doesn't get decorated.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (TAP5-1339) Provide a single extension point to provide a ValidationDecorator instance for both traditional and Ajax renders

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TAP5-1339?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13113643#comment-13113643 ] 

Hudson commented on TAP5-1339:
------------------------------

Integrated in tapestry-trunk-freestyle #537 (See [https://builds.apache.org/job/tapestry-trunk-freestyle/537/])
    TAP5-1339: ValidationDecorator doesn't get called when form is rendered for zone update

hlship : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1174925
Files : 
* /tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ValidationDecoratorFactoryImpl.java
* /tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/TapestryModule.java
* /tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/ValidationDecoratorFactory.java


> Provide a single extension point to provide a ValidationDecorator instance for both traditional and Ajax renders
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: TAP5-1339
>                 URL: https://issues.apache.org/jira/browse/TAP5-1339
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.2.3
>            Reporter: Hugo Palma
>            Assignee: Howard M. Lewis Ship
>            Priority: Minor
>             Fix For: 5.3
>
>
> I contributed a custom ValidationDecorator which works fine when the form is rendered as part of the normal page render lifecycle.
> But, if i update a zone with the same form component the ValidationDecorator doesn't get executed and as such the form doesn't get decorated.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Closed] (TAP5-1339) Provide a single extension point to provide a ValidationDecorator instance for both traditional and Ajax renders

Posted by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-1339?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Howard M. Lewis Ship closed TAP5-1339.
--------------------------------------

       Resolution: Fixed
    Fix Version/s: 5.3
         Assignee: Howard M. Lewis Ship

> Provide a single extension point to provide a ValidationDecorator instance for both traditional and Ajax renders
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: TAP5-1339
>                 URL: https://issues.apache.org/jira/browse/TAP5-1339
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.2.3
>            Reporter: Hugo Palma
>            Assignee: Howard M. Lewis Ship
>            Priority: Minor
>             Fix For: 5.3
>
>
> I contributed a custom ValidationDecorator which works fine when the form is rendered as part of the normal page render lifecycle.
> But, if i update a zone with the same form component the ValidationDecorator doesn't get executed and as such the form doesn't get decorated.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira