You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Emmanuel DEMEY <de...@gmail.com> on 2014/12/31 10:10:44 UTC

Issue with ComponentOverride Service

Hi everyone,

I hope you spent a lovely Christmas :d

Since a couple of days, I am working with Tapestry 5.4 (for one of our
Components library : Kawwa2).

With Tapestry 5.3, we used a ValidationDecorator, in order to add an Error
message right after the field, if it was in error. It worked as a charm.

With 5.4, it looks like the Error component is loaded automatically
according to the valididy of each fields. But as the HTML is the one I
need, I have to override this component.

We have just discovered the ComponentOverride service. But, thanks to some
Sysout, the getReplacement method is not executed for the Error component.
I have some traces for the other components, except for Error. Have you
already seen this kind of error ?

Here is my configuration in my AppModule :

@Contribute(ComponentOverride.class)
    public static void overrideComponent(MappedConfiguration<Class, Class>
configuration) {

configuration.add(org.apache.tapestry5.corelib.components.Error.class,
KawwaError.class);
    }

Thanks

Manu

-- 
Emmanuel DEMEY
Ingénieur Etude et Développement
Worldline, an atos company
+33 (0)6 47 47 42 02
demey.emmanuel@gmail.com

   - fr.linkedin.com/in/emmanueldemey/


Twitter : @EmmanuelDemey