JSFだとFormに行く先が決まっていてSumbitするという感じじゃなくてボタンに行く先のアクションを指定します。
<f:form> ←Formにアクションを設定しない。 <h:input value="#{LoginBean.name}"/> <h:commandButton action="#{LoginBean.entry}"/> ←ボタンやリンクにアクションを設定 </f:form>
なのでJavaScriptでForm.Submitどうすんだろと思っていたら
<h:form id="LoginForm"> <h:commandButton type="button" id="bLogin" onclick="return runBtnDisabled('LoginForm', 'bLogin')" value="ログイン" /> <h:commandButton action="#{LoginBean.entry}" id ="bEntry" style="display:none;" /> <h:form/>
こんな感じでダミーの見えないボタンを作ってから
function runBtnDisabled(formName, btnId) { var entryButton = document.getElementById(formName + ":bEntry"); entryButton.click(); }
としてあげるという回避策があるらしい。
ほ〜すごいもんだ。