This coercian logic is very unreasonable...

and currently tripping up everything...

even if I try to do a cancel push button on form 

all I have setup is my onActivate and it is characterizing all kinds of 
negative runtime problems

    public Object onActivate(String id)
    {
        if (beanType == null)
            return Utils.new404(messages);

        this.bean = contextValueEncoder.toValue(beanType, id);

        if (bean == null)
            return Utils.new404(messages);

        beanModel = beanModelSource.createEditModel(beanType, messages);

        propertyDescriptor = findPropertyDescriptor(beanType, "photo");

        return null;
    }

my attempt to obtain the bean using the contextValueEncoder is the mechanism 
thats causing the coercian to happen

which I assume is retrieving the bean from the page context



An unexpected application exception has 
occurred.org.apache.tapestry5.ioc.internal.OperationExceptionException
 converting 'coach' to instance of java.lang.Integer (id type for entity
 org.tynamo.examples.hibernatesecurity.model.Coach): Coercion of coach 
to type java.lang.Integer (via String --> Long, Long --> Integer) 
failed: For input string: "coach"traceTriggering event 'activate' on 
edit/Coachorg.apache.tapestry5.runtime.ComponentEventExceptionException
 converting 'coach' to instance of java.lang.Integer (id type for entity
 org.tynamo.examples.hibernatesecurity.model.Coach): Coercion of coach 
to type java.lang.Integer (via String --> Long, Long --> Integer) 
failed: For input string: 
"coach"contextcoach3eventTypeactivatejava.lang.RuntimeExceptionException
 converting 'coach' to instance of java.lang.Integer (id type for entity
 org.tynamo.examples.hibernatesecurity.model.Coach): Coercion of coach 
to type java.lang.Integer (via String --> Long, Long --> Integer) 
failed: For input string: "coach"java.lang.NumberFormatExceptionFor input 
string: "coach"Filter stack frames
Stack trace

java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)

java.lang.Long.parseLong(Long.java:410)

java.lang.Long.<init>(Long.java:678)

org.apache.tapestry5.ioc.services.TapestryIOCModule$9.coerce(TapestryIOCModule.java:241)

org.apache.tapestry5.ioc.services.TapestryIOCModule$9.coerce(TapestryIOCModule.java:238)

org.apache.tapestry5.ioc.services.CoercionTuple$CoercionWrapper.coerce(CoercionTuple.java:54)

org.apache.tapestry5.ioc.internal.services.CompoundCoercion.coerce(CompoundCoercion.java:43)

org.apache.tapestry5.ioc.internal.services.TypeCoercerImpl$TargetCoercion.coerce(TypeCoercerImpl.java:71)

org.apache.tapestry5.ioc.internal.services.TypeCoercerImpl.coerce(TypeCoercerImpl.java:146)

org.apache.tapestry5.internal.hibernate.HibernateEntityValueEncoder.toValue(HibernateEntityValueEncoder.java:80)

org.apache.tapestry5.internal.services.ContextValueEncoderImpl.toValue(ContextValueEncoderImpl.java:47)

org.tynamo.examples.hibernatesecurity.pages.edit.CoachEdit.onActivate(CoachEdit.java:104)

org.tynamo.examples.hibernatesecurity.pages.edit.CoachEdit.dispatchComponentEvent(CoachEdit.java)

                                          

Reply via email to