It seems that you're missing the point of JSF. JSF offers components to generate HTML output and a whole lifecycle to perform collecting submitted values, converting and validating them and setting them as bean properties. By default, a JSF bean action is already not invoked when JSF-managed validation fails.
Rewrite your form conform below basic example:
<h:form>
<h:selectOneMenu value="#{bean.amount}" required="true">
<f:selectItem itemValue="#{null}" itemLabel="Select Amount" />
<f:selectItem itemValue="A" />
<f:selectItem itemValue="B" />
<f:selectItem itemValue="C" />
<f:selectItem itemValue="D" />
<f:selectItem itemValue="E" />
</h:selectOneMenu>
<h:commandButton value="Submit" action="#{bean.submit}" />
<h:messages />
</h:form>
With this managed bean:
public class Bean {
private String amount; // +getter+setter
public void submit() {
System.out.println("Submitted amount: " + amount);
// ...
}
// ...
}
The JSF-provided required="true"
attribute will validate the input component as required. If validation fails, any message will be shown in <h:message>
associated with the component or a general <h:messages>
one like shown in example.
No need for jQuery/JS validation which wouldn't work anyway when the client has JS disabled. If you really want to stick to plain HTML/JS, then you should reconsider why you're using JSF. See also What is the need of JSF, when UI can be achieved from CSS, HTML, JavaScript, jQuery?