Oh, okay, that works great. Guess I got my mindset too narrow to see that, thanks.

One more thing, the FormEventLink that is generated doesn't always play nice.

Two scenarios (the Component with the FormEventLink will be called EventComponent):

1. A Page class contains reference to the EventComponent in the TML. The EventLink generated in the HTML builds a proper URI for this page class and everything works.

2. A main Page class delegates a section of its TML to another Page class, which is dynamic. This delegated Page class contains reference to the EventComponent in the TML. The EventLink generated in the HTML builds an incorrect URI for this page class. It builds one referencing the Main Page, while the EventComponent is only known to and a part of the Delegate Page.

To solve #2 temporarily, I was able to re-write the URI from the generated EventLink to reference the correct component. First I got it working using new LinkImpl, but since that is an internal class, I opted for a Javascript rewrite instead. I couldn't find any other way of regenerating the link though... Not sure if there is one?

Thanks,
Rich

On 12/22/2010 02:42 PM, Thiago H. de Paula Figueiredo wrote:
On Wed, 22 Dec 2010 17:05:22 -0200, Rich M <rich...@moremagic.com> wrote:

I suppose this is where I am confused. I currently use JavaScript to write the query parameter into the activation context of the EventLink.

What I'm suggesting you is to *not* use the context as the way of passing information to your event handler method. You'd use a query parameter added through JavaScript instead. Example: your generated link is /page.event. When the field value is changed, you change the URL to /page.event?value=<field value>.

My logic was that the EventLink triggers the Event Handler method, while the form submission puts the hidden input into the Request parameters.

This isn't needed nor guaranteed to work in order.



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to