Re: [T5.4] context isn't passed to enclosing page during form submit

2014-07-04 Thread Lance Java
Correct, so the bulk of your tapestry code can deal with entities, not ids. On 3 Jul 2014 23:11, "Ilya Obshadko" wrote: > That's Hibernate entity, so I don't think ValueEncoder is necessary with > tapestry-hibernate. > > > On Thu, Jul 3, 2014 at 11:28 PM, Lance Java > wrote: > > > If you contri

Re: [T5.4] context isn't passed to enclosing page during form submit

2014-07-03 Thread Ilya Obshadko
That's Hibernate entity, so I don't think ValueEncoder is necessary with tapestry-hibernate. On Thu, Jul 3, 2014 at 11:28 PM, Lance Java wrote: > If you contribute an appropriate ValueEncoder for Entity, you won't need > onActivate() / onPassivate(). You can use @PageActivationContext instead.

Re: [T5.4] context isn't passed to enclosing page during form submit

2014-07-03 Thread Lance Java
If you contribute an appropriate ValueEncoder for Entity, you won't need onActivate() / onPassivate(). You can use @PageActivationContext instead. On 3 July 2014 06:11, Ilya Obshadko wrote: > Oops my bad. I always try to forget about onPassivate () > That should fix it, thanks! > > > On Thu, Ju

Re: [T5.4] context isn't passed to enclosing page during form submit

2014-07-02 Thread Ilya Obshadko
Oops my bad. I always try to forget about onPassivate () That should fix it, thanks! On Thu, Jul 3, 2014 at 1:46 PM, Geoff Callender < geoff.callender.jumpst...@gmail.com> wrote: > What's "t:ac"? In the POST's Form Data, "t:ac" is the key of the field > that carries the page's activation context

Re: [T5.4] context isn't passed to enclosing page during form submit

2014-07-02 Thread Geoff Callender
What's "t:ac"? In the POST's Form Data, "t:ac" is the key of the field that carries the page's activation context. On 3 Jul 2014, at 12:41 pm, Geoff Callender wrote: > Not a bug. Form bubbles up its context in the PREPARE_FOR_SUBMIT event. > Here's a typical way to deal with it: > > v

Re: [T5.4] context isn't passed to enclosing page during form submit

2014-07-02 Thread Geoff Callender
Not a bug. Form bubbles up its context in the PREPARE_FOR_SUBMIT event. Here's a typical way to deal with it: void onPrepareForSubmit(Long id) { this.id = id; entity = retrieveFromDatabase(id); } What should you pass in the context? At a minimum I'

[T5.4] context isn't passed to enclosing page during form submit

2014-07-02 Thread Ilya Obshadko
I'm not sure if this is a bug or not. Here's a scenario: Page.java public class Page { @Property private Entity entity; void onActivate ( Long id ) { entity = retrieveFromDatabase ( id ); } } Page.tml: MyComponent.tml: ... AJAX is NOT used. If I get it right, form c