On Tue, 05 Nov 2013 17:11:17 -0200, Ilya Obshadko
<ilya.obsha...@gmail.com> wrote:
I've researched this problem a little bit and have an interesting
question.
I would like to have a customized version of ActionLink (let's call it
HashActionLink). It should work as follows:
- if client-side JavaScript is enabled (and thus history events work), it
reacts to hash change events and updates specified zone
- if client-side JavaScript is disabled, it falls back to normal
ActionLink
behavior
I suppose it might be handled using JS DOM manipulation in @AfterRender
phase.
Are there any other options to do that?
You can do this with an ordinary ActionLink or EventLink and do the logic
you describe in JavaScript, listening to clicks to the link and stopping
its propagation so the browser doesn't do the normal link behavior. For
monitoring hash changes, you can try some JavaScript library that can do
that.
--
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org