In 2.0.4 or 2.0.5 (or hell, the new 2.1) there is a new component that
exists just for this client-side scripting, GenericLink.

Something still looks odd however ... either the Form should submit, or the
Action should be triggered (and its listener invoked), but not both.  Since
its the form that is submitted, the Action component should not be involved.

Wish I could be more help, but as I said, something strange is happening.
Set some breakpoints and capture the stack traces, those would be
enlightening.

----- Original Message -----
From: "Richard Lewis-Shell" <[EMAIL PROTECTED]>
To: "Tapestry Developer (E-mail)" <[EMAIL PROTECTED]>
Sent: Sunday, July 07, 2002 8:30 PM
Subject: [Tapestry-developer] How to make Action work like Submit?


Hi,

We are wanting to get our Action hyperlinks to submit their enclosing form
when clicked as well as perform their intended action.  (we don't want
to/can't use an image or a button)  So the idea is to use <a
href=...tapestry's generated action URL here...
onclick="document.Form0.submit();">.  (This worked with WebObjects BTW).
But there seems to be problem - after the action is triggered, the rewinding
is aborted - Action.java throws a RenderRewoundException right after calling
actionTriggered in the listener.  Presumably this is to save going through
the hassle of rewinding page state would normally be ignored anyway..  But,
if we are submitting form data then that rewinding of the rest of the page
(actually, just the form) is needed - eg. the action might be at the top of
the page with form fields etc below - we want/need values changed in those
fields to be reflected as if a submit button were used.

So, is this possible with the built-in components?  I suspect not, but would
love to be proved wrong (preferably with an example!).

Thanks,

Richard

PS. This relates to 2.0.2a - though can find no reason to suspect it would
be any different with 2.0.3 -> 2.1-rc-1



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Stuff, things, and much much more.
http://thinkgeek.com/sf
_______________________________________________
Tapestry-developer mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/tapestry-developer

Reply via email to