I presume a solution will be to render the commandlink as a commandButton when it is embedded in a form and JS is disabled... Just gotta find a "cool" point in the source to accomplish that...
Alexander -----Original Message----- From: news [mailto:[EMAIL PROTECTED] On Behalf Of Werner Punz Sent: Thursday, June 02, 2005 8:42 PM To: [email protected] Subject: Re: HtmlCommand does not work when ALLOW_JAVASCRIPT=false Let me try to interprete this Jesse Alexander (KBSA 21) wrote: > I did some more tests which lead to this matrix: > > works with JavaScript > disabled enabled > a) button/link is embedded in a form > htmlCommand false true html command triggers a javascript if embedded in a form tag > htmlButton true true html button just issues a submit > b) button/link is NOT embedded in a form > htmlCommand true true here the command is rendered as a link only > htmlButton false false > here it is rendered as a button only therefore does nothing > neither redirect (in the nav-outcome) nor immediate hava an influence. > > So the only difference is the form in which the commandlink is > embedded... > Well makes perfect sense in the scope of html. Html command renders basically into <a href.... html command button basically renders into a <input type whatever... according to this matrix. To my knowledge, correct me if I am wrong, you only can issue a submit in a decent manner from a href within a form by triggering a javascript event method which does the submit on the form. Buttons can issue automatically submits by being the type submit. Therefore this behavior looks weird at the first sight, but is totally understandable if you go down on html level. You might be able to bypass the problem by writing a renderer for your command links which render into input type submit, you you encounter that you are in a form... I hope I am not to wrong in my interpretation of this. Werner

