We already have <map:action> to this. With <map:action> the sitemapYes, but why using Java on the one hand and JavaScript on the other? Why not using for both solutions JavaScript as alternative way? This mix makes it much more complicated to get involved into cocoon for newbies.
complexity grows very fast in some times to unreadable sizes.
Regards Stephan