another wonderful example…

Friday, 12 May, 2006

If you’re using, or have used JSF, you’ll be aware that Javascript is generally a necessity. However, some JSF components do function with Javascript disabled… and so you’d kind-of hope that the basic HTML components will work fine with javascript switched off.

You’d be wrong.

Radio buttons don’t work in all cases, inside tables being the obvious example (solution: write your own radio component. Sigh), and my new personal favourite… feature… command links (rendering as hrefs) will work, but not if they’re inside a form.
We figure the evaluation processing gets to the form component, checks if the form has been submitted, and does not evaluate any of the child elements if it hasn’t been submitted. With javascript enabled, a click on a command link (href) effectively submits the form — with javascript disabled, the command link is a plain href, so the form is not submitted, hence the action on the link is no longer evaluated.

Which is another wonderful example of why spotty faced geeks barely past puberty shouldn’t be allowed to design & develop frameworks… [disclaimer: I have no idea whether the people behind JSF are spotty-faced, geeks, or barely past puberty, but it suits my view of the technology, so I'll persist with my stereotypical assumptions]. Let’s just ignore the last 10 or so years of web development and standardisation, shall we?

Leave a Reply