Jörn Zaefferer wrote:
I got the feeling that this was the result of bad knowledge
browser-behaviour, HTTP and HTML and JavaScript. I still have no idea
why the form isn't just submitted as is, using the name and value of the
submit to determine which button was clicked.
I believe it is (see my earlier reply), and that all the javascript is
doing is ensuring any garbage left behind by h:commandLink tags is
cleaned up (hidden fields _idcl and _link_hidden_).
Your comment is a little rude; constructive criticism is fair, but
accusations of incompetence are not.
In addition, the JavaScript could be reduced. "if(typeof
window.clearFormHiddenParams_Blah!='undefined')" can be written as
"if(window.clearFormHiddenParams_Bla)". Considering that the code is
repeated all over the place, that can make quite a difference.
This may be for compatibility with various browsers. Have you tested
your proposed alternative against IE5, IE6, IE7, Firefox, Opera and
Konqueror?
Regards,
Simon
- Re: Why does JSF submit through JavaScript? Simon Kitching
-