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
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
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
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
(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
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
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
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