webtier@glassfish.java.net

Rendering of javascript on[click|change|*] event handlers

From: <webtier_at_javadesktop.org>
Date: Sat, 11 Jul 2009 00:15:06 PDT

I am often working with frontend developers saying, they would not like to introduce JSF into a project because of rendering of components. Indeed some of the more complex components have renderers that produce very "oldschool" or deprecated html (nested tables is a common example). Well, if you can abandon the usage of these components... no problem at all.

But there is one point with the introduction of partial page rendering also affecting all the default components. Most of the frontend developers agree on the design principle that event handlers as part of the solution for asynchronous request should not be rendered directly on the tags itself's, but rather in an inline javascript part in the html or a separate javavscript file, that binds the event handlers to the tag element.

To cut a long story short: Is it possible to modificate the rendering of some tag attributes without rewriting a complete renderer for all components? I would like to relocate the output of the ScriptRenderer into a single location and bind the event handlers either using hand written wiring code or using a common javascript framework like YUI or JQuery.

Thanks in advance,

Sven Linstaedt
[Message sent by forum member 'tzwoenn' (tzwoenn)]

http://forums.java.net/jive/thread.jspa?messageID=355217