Hi my methods look like this public boolean onActivate(Scene scene) { selectedScene = scene;//systemManager.getScene(Long.parseLong(scene.toString())); return selectedScene != null; }
public Scene onPassivate() { return selectedScene; } I don't have ValueEncoder cause I would expect that conversion works String -> Long -> hibernate gets the id of the object and returns -> MyObject (i.e. Scene in this case). I can add one but I would not expect that I needed it, especially since when I first navigate to the page it works without a problem, but when I submit a form it breaks org.apache.tapestry5.ioc.util.UnknownValueException Could not find a coercion from type java.lang.String to type domain.Scene. If I replace Scene with String or Object and use that to manually query the db everything works as expected (even without onPassivate method - the only thing is that my url changes and it losses the context but onActivate is still triggered) Thanks On Tue, Sep 9, 2014 at 12:36 AM, Thiago H de Paula Figueiredo < thiag...@gmail.com> wrote: > On Mon, 08 Sep 2014 18:21:42 -0300, Boris Horvat <horvat.z.bo...@gmail.com> > wrote: > > Hi all, >> > > Hi! > > > I have an onActivate(MyObject) method, when I go to the page for the >> first time and context is present everything is triggered properly. The url >> is >> something like >> >> localhost:8080/mypage/1 >> >> However when I submit my form, and process it, page reloads and my id is >> now treated as a String that fails to be converted into object. Is this >> behaviour expected? Do I need to add something special into the form to >> keep context properly passed? >> > > Have you contributed a ValueEncoder for MyObject? What's the page's > onPassivate() method? Or are you using @PageActivationContext? > > -- > Thiago H. de Paula Figueiredo > Tapestry, Java and Hibernate consultant and developer > http://machina.com.br > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > > -- Sincerely *Boris Horvat*