tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Howard M. Lewis Ship (JIRA)" <...@tapestry.apache.org>
Subject [jira] Closed: (TAPESTRY-1754) Creating a service builder for ValidationDecorator for easier override
Date Thu, 03 Jan 2008 23:47:34 GMT

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

Howard M. Lewis Ship closed TAPESTRY-1754.
------------------------------------------

    Resolution: Won't Fix
      Assignee: Howard M. Lewis Ship

There were a bunch of changes in 5.0.7 related to this; it is now much easier to contribute
an override of the default validation decorator:

 public void contributeMarkupRenderer(OrderedConfiguration<MarkupRendererFilter> configuration,
final Environment environment)
{
  MarkupRendererFilter filter = new MarkupRendererFilter() {
    public void renderMarkup(MarkupWriter writer, MarkupRenderer renderer)
            {
               environment.push(ValidationDecorator.class, new MyValidationDecorator());

              renderer.renderMarkup(writer);

              environment.pop(ValidationDecorator.class);
         }
  };

  configuration.add("MyValidationDelegate", filter, "after:DefaultValidationDecorator");

}




   

> Creating a service builder for ValidationDecorator for easier override
> ----------------------------------------------------------------------
>
>                 Key: TAPESTRY-1754
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-1754
>             Project: Tapestry
>          Issue Type: Improvement
>          Components: tapestry-core
>    Affects Versions: 5.0, 5.0.6
>            Reporter: Kristian Marinkovic
>            Assignee: Howard M. Lewis Ship
>         Attachments: TapestryModule.java
>
>
> A thread-scoped ValidationDecorator service could be easily overridden through an other
decorator service. Tapestry's DefaultValidationDecorator does not necessarily meet the needs
for field decoration. Exchanging the ValidationDecorator by replacing it in the Environment
manually (as described http://www.nabble.com/How-to-create-my-ValidationDecorator-in-T5--tf4059742.html#a11533833)
when it is globally needed seems cumbersome.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


Mime
View raw message