- potentially, every command-link could be rendered as an <input
type="submit">, and then some additional javascript is rendered which
makes this look and act like a link: a very interesting suggestion,
cause it would mean we would not need any javascript detection at all!
However, I do see some backwards compatibility issues.
I don't want to interrupt a good discussion, so just take note of my comment here. Styling buttons is not always reliable. Some browsers ignore styles completely, so generally I won't recommend this approach. Spring Faces renders a button first and then swaps in a link if JavaScript is available (by using JavaScript). I was impressed by the idea, but a non-technical user noticed the "flash" it creates in some browsers that don't execute DOM manipulation fast enough. Therefore, I like the idea of deciding up front of a browser is going to support JavaScript or not and then choose the most optimal rendering from then on out (i.e., render normally once it's determined that JavaScript is enabled rather than using these hacks on every request).
-Dan