tags:

views:

399

answers:

1

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?

+1  A: 

Is there a JSF standard way to define a default form submission method?

Unfortunately no, not in JavaScript.

You could simulate a click on the button to perform an action though.

Phill Sacre
Is it just me, or was this a huge oversight?
Eric Noob