0

I'm building a vanilla JSF app, and I'm having some difficulty understanding how forms work in this framework.

If I make a JavaScript form submission ...

document.myForm.submit();

... on this JSF form ...

<h:form id="myForm">
  ...
  <h:commandButton value="Continue" action="#{foo.continueButton}"></h:commandButton>
</h:form>

... how can I define the method to be called in the foo bean? Is there a JSF standard way to define a default form submission method?

4

1 に答える 1

1

デフォルトのフォーム送信メソッドを定義する JSF 標準の方法はありますか?

残念ながら、JavaScript ではできません。

ただし、ボタンのクリックをシミュレートしてアクションを実行することはできます。

于 2008-11-18T09:10:11.100 に答える