Hi. :)
I have following case:
Article
-                      -
-                      -
Fruits           Vegetables


Fruits and Vegetables inherits Article, and both Fruits and Vegetables have 
same DiscriminatorValue. Now when I try to do some ValueEncoder magic like in 
following
public class ArticleEncoder implements ValueEncoder< Article>, 
ValueEncoderFactory< Article> {

    private LogicDAO logicDAO;
 
    @Override
    public String toClient(final  Article v) {
        return String.valueOf(v.getName());
    }

    @Override
    public Artikal toValue(String string) {
         Article result = new  Article();
        result = logicDAO.listSpecificArticle(string);
        return result;
    }

    @Override
    public ValueEncoder< Article> create(Class< Article> type) {
        return this;
    }
}


I get following 
HTTP Status 500 - Exception constructing service 
'ValueEncoderSource': Error invoking service contribution method 
org.apache.tapestry5.hibernate.HibernateModule.contributeValueEncoderSource(MappedConfiguration,
 boolean, HibernateSessionSource, Session, TypeCoercer, PropertyAccess, 
LoggerSource): Service contribution (to service 'ValueEncoderSource') 
conflicts with existing contribution (by 
com.google.tapestrySection.teamAlpha.services.AppModule.contributeValueEncoderSource(MappedConfiguration,
 LogicDAO) (at AppModule.java:1264)).

Anyone knows how to hack this issue here? :)
                                          

Reply via email to