Re: Simple zone/form conundrum

2012-08-01 Thread Michael Prescott
Thanks for these recommendations. The @Persist approach works fine, when the form is submitted in 'add' mode, I can store the newly created identifier temporarily for use on the next ajax call. The form context parameter works as advertised, but I don't think solves my problem as the context is s

Re: Simple zone/form conundrum

2012-08-01 Thread Thiago H de Paula Figueiredo
On Wed, 01 Aug 2012 17:11:26 -0300, Michael Prescott wrote: (posted) Okay, yes, I may just be running counter to the grain - ajax requests aren't supposed to change the context. I suppose (since the zone is in the form) I could have the zone contain a sort of 'custom context', so that w

Re: Simple zone/form conundrum

2012-08-01 Thread Michael Prescott
Yes - excellent. Thanks very much for your help. On 1 August 2012 16:12, George Christman wrote: > your event is always null on a new record after the zone refreshes. You > need > to somehow set the event obj after the zone update. Thiago might have a > better solution than using persisting the

Re: Simple zone/form conundrum

2012-08-01 Thread George Christman
your event is always null on a new record after the zone refreshes. You need to somehow set the event obj after the zone update. Thiago might have a better solution than using persisting the object. -- View this message in context: http://tapestry.1045711.n5.nabble.com/Simple-zone-form-conundr

Re: Simple zone/form conundrum

2012-08-01 Thread Michael Prescott
(posted) Okay, yes, I may just be running counter to the grain - ajax requests aren't supposed to change the context. I suppose (since the zone is in the form) I could have the zone contain a sort of 'custom context', so that when I move from adding to editing. Michael On 1 August 2012 15:59, T

Re: Simple zone/form conundrum

2012-08-01 Thread Michael Prescott
Thanks for replying. Yes, I'm trying to add/edit in the same page. I wondered the same thing, but I think I am. The relevant snippets look like this: // my page public class EventEdit { @Inject private EventDao eventDao; @Property private Event event; @InjectComponent("predictionszone") pr

Re: Simple zone/form conundrum

2012-08-01 Thread Thiago H de Paula Figueiredo
On Wed, 01 Aug 2012 16:41:59 -0300, Michael Prescott wrote: I suspect that, when the form updates a zone, the form has no chance to realize that the page now has a context. The page context is tied to the current URL. AJAX requests don't change the current URL. Only a full-page refresh

Re: Simple zone/form conundrum

2012-08-01 Thread George Christman
Michael, are you trying to to add / edit your form in the same page? ie passing a url parameter when the record exist and not having a url parameter when the record is new, but updating with ajax? If so, it sounds like your not setting your object after the zone saves and reloads the form. -- V