In one of my project we are using jsf/primefaces for development and have specific requirement not to make any ajax call on blur or change event of input field.
We need to display list of record. User can also add or delete records.
I am using below xhtml cocde
<h:form id="wizard_form">
<p:outputPanel id="idBiomassPlantsPanel">
<ui:repeat var="item" value="#{controller.iteamList}">
<p:inputText id="field1" value="#{item.field}">
<f:validateLongRange maximum="10" minimum="2" />
</p:inputText>
<p:message display="text" for="field1" />
<p:commandLink id="idDeleteBiomassPlantsLink" value="Delete record"
update="wizard_form:idBiomassPlantsPanel" immediate="true"
process="@this" actionListener="#{controller.deleteBioMassPlants()}">
</p:commandLink>
</ui:repeat>
<p:inputText id="testfield" value="#{controller.field}">
<f:validateLongRange maximum="10" minimum="2" />
</p:inputText>
</p:outputPanel>
<p:commandButton id="addBiomassPlantsButton" value="add new"
action="#{controller.addBioMassPlantsData}" update="@form"
process="@form" />
</h:form>
On click of "add new" button we are processing whole UI form. This button is working fine. if user clicks of "Delete record" button, i do not want to trigger validation since even incorrect values are entered user should be able to delete the record. I have used immediate=”true” to skip validation but in this case all input fields gets reset to NULL or initial value of other records which is not deleted( eg: if i enter three record and second record is deleted then value of third record is updated with null.)
I tried removing immediate="true" as i am using process="@this" then also i am facing same issue.
I created one test input field outside of UI repeat. Value of this field is not changed on click of delete button. So it seems issue is with only input fields whict are inside UI:repeat.
Any help or pointer on this is much appreciated.