I have a component like this
<p:selectOneMenu value="#{loadCouponGroupBean.functionHolderType}" style="width:100px"
required="true" requiredMessage="#{msgs['msg.required']}" onkeyup="submit()"
id="typeofCard" panelStyleClass="hideDisabled" valueChangeListener="#{loadCouponGroupBean.findbytypeFunction}">
<f:selectItem itemLabel="" itemValue="" />
<f:selectItems value="#{loadCouponGroupBean.functionHolderBo.functionHolderTypes}" />
</p:selectOneMenu>
and in my managed bean i have a method like this
public void findbytypeFunction(ValueChangeEvent e) {
System.out.println("Helloooooooooooooooooooooooooo");
String functionHolderType = (String) ((UIInput) e.getSource()).getAttributes().get("functionholdertype");
System.out.println("FunctionHolderType" + functionHolderType);
}
when i change the value the form is getting submitted and error page is coming instead i want to be on the same page and get the value from the dropdown in my managed bean .How can i do this?