I have a form in which I have multiple text fields, dropdown, checkboxes and so forth. I have a submit button which saves the fields and invokes a confirm dialog after some backend validation.
All the components except for textfields, text area are saved into my bean on click of this button. But if I put an ajax event in the text field, the values are getting saved.
My Command button
<p:commandButton id="submitButton" value="Submit This"
icon="fa fa-send" action="#{formBean.someAction}"
partialSubmit="true" process="@this" oncomplete="PF('someDialog').show();" />
Not working text field
<p:inputText id="referenceNumber"
value="#{formBean.referenceNumber}"
onkeypress="return event.keyCode != 13;">
</p:inputText>
working text field
<p:inputText id="pmrReferenceNumber"
value="#{formBean.pmr.pmrReferenceNumber}"
disabled="#{formBean.isDisabled('pmrReferenceNumber')}"
onkeypress="return event.keyCode != 13;">
<p:ajax process="@this" partialSubmit="true" />
</p:inputText>
Ideally the button should save the text fields but they are not doing it. And I have configured primefaces.SUBMIT as partial in my web.xml.