In our Application, we get a View Expired Exception when returning from a dialog with many (~40) input fields.
I tested it and I get the same exception at the primefaces showcase.
Steps to reproduce:
- go to https://www.primefaces.org/showcase/ui/df/nested.xhtml
- click View, then "go to level 2", then click on the x, then click "go to level 2 again", repeat this process around 40 times, then try to go to level 3
you will get redirected to https://www.primefaces.org/showcase/viewExpired.xhtml
I assume that this exception occurs because the site to which the dialog would return is no longer available because only 15 viewstates get saved.
When I increase the parameter
org.apache.myfaces.NUMBER_OF_VIEWS_IN_SESSION in the web.xml
to 200 I do not get the exception anymore.
Is there a way to avoid this exception without increasing the parameter, because we do not want to waste resources.
We also tried javax.faces.STATE_SAVING_METHOD = client and it worked to but then the network traffic was increased by a factor of 10 (2MB for every request)
EDIT I've got a sum column and the numbers in my input fields should always have two decimal digits, so my input fields look like this.
<p:inputText style="text-align:right;"
rendered="#{attval.att.ac.catForNumericalData}"
size="#{attval.att.inputlength}" value="#{attval.att.quantity}">
<f:converter converterId="com.prosol.faces.converter.DoubleConverter" />
<p:ajax event="keyup" update="attributeTable" delay="1000"/>
</p:inputText>