[Seaside] Anchor with submit and callback
m.bany at wanadoo.fr
Fri Nov 17 18:15:39 UTC 2006
Carl Gundel a écrit :
> When I use the code below the anchor submits, but it doesn't execute
> the callback. If I eliminate the submitFormNamed: then clicking
> executes the callback, but of course then it doesn't submit the form.
> Is it possible to have an anchor that does both?
> html anchor
> id: 'cssID';
> submitFormNamed: 'submitMe';
> callback: [self doSomething];
> text: 'Do something'.
This is very strange because WACanvasLinkSubmitTest is doing
exactly what you are trying to accomplish. This can be seen
where you select tab entitled "Submit"
Enter (say) 23 in the input field then click the "++" link, you
should get a value of 24 demonstrating that the form
was indeed submitted with all the callbacks executed.
The only difference I see is the order of the message sends,
by #handlerForForm: also includes the callback key that has
been created earlier by the #callback: message
callback: [count := count + 1];
More information about the Seaside