Thanks Denis, that worked great.
Still, i think this is more of a workaround than a solution right ?
Shouldn't this work right out-of-the-box ?

On Wed, Nov 10, 2010 at 12:08, Denis Stepanov <[email protected]>wrote:

>
> Try:
>
>        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");
>         }
>
> On 10.11.2010, at 12:15, Hugo Palma wrote:
>
> > The doesn't seem to be on the render but on the injection of the
> > ValidationDecorator
> > into de label component in my case.
> > I've created an issue for this here
> > https://issues.apache.org/jira/browse/TAP5-1339
> >
> > On Wed, Nov 10, 2010 at 10:20, Denis Stepanov <[email protected]
> >wrote:
> >
> >> Ajax response uses PartialMarkupRenderer via
> >> contributePartialMarkupRenderer.
> >>
> >> Denis
> >>
> >> On 9.11.2010, at 17:00, Hugo Palma wrote:
> >>
> >>> I contributed a custom ValidationDecorator which in my case simply adds
> a
> >>> "*" to the label of every required field.
> >>>
> >>> This works fine except when i update a zone with a form. If the form is
> >>> rendered on page load the ValidationDecorator is executed as excepted,
> >> but
> >>> if i update a zone with a form component then the label fields on that
> >> form
> >>> aren't decorated by my custom ValidationDecorator.
> >>> Any idea if this is a bug or maybe i'm doing something wrong ?
> >>>
> >>> Thanks.
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: [email protected]
> >> For additional commands, e-mail: [email protected]
> >>
> >>
> >
> >
> > --
> >
> > LinkedIn <http://www.linkedin.com/in/hugopalma>
> > Twitter<http://twitter.com/hugompalma>
>
>


-- 

LinkedIn <http://www.linkedin.com/in/hugopalma>
Twitter<http://twitter.com/hugompalma>

Reply via email to