Nope..  The higher the number the longer it will take tp expire.
Picture this.  Each form has a view state.  Durring a PPR, the view
state is altered for the form your submitting, but not for the other
one.  When that form is submitted, the page thinks you're using a form
from a long time back.  Picture someone hitting the back button 20
times and the. Resubmitting a form..

Generally it's considered bad form JSF, especially one involving
AJAX, to have multiple forms.

Scott

Sent from my iPhone

On Oct 4, 2011, at 4:40 AM, Francois Grandjean <fgrandj...@darts-ip.com> wrote:

> Hi,
>
> I'm using MyFaces 2.1.3. and I face a problem when using two forms on the 
> same page, one of them being refreshed several times through ajax calls 
> before a commandLink is called on the other form.
> This results in a ViewExpiredException being thrown.
> Here's a simple page to reproduce the problem:
>
> <h:form id="form1">
> <h:commandLink id="link1" value="Submit form 1">
> <f:ajax/>
> </h:commandLink>
> </h:form>
> <h:form id="form2">
> <h:commandLink id="link2" value="Submit form 2"/>
> </h:form>
>
> If I click on link1 more than 20 (or the value of 
> 'org.apache.myfaces.NUMBER_OF_VIEWS_IN_SESSION') times and then click on 
> link2 I get a ViewExpiredException.
> This looks similar to the problem depicted in MYFACES-3117, so I tried to use 
> parameter 'org.apache.myfaces.NUMBER_OF_SEQUENTIAL_VIEWS_IN_SESSION' and set 
> it to a lower value, say 2.
> But then I get the ViewExpiredException even quicker, after just two clicks 
> on link1.
>
> Is there something I'm doing wrong here or is this a bug or a limitation of 
> the specs?
> And is there any other workaround than increasing the value of 
> org.apache.myfaces.NUMBER_OF_VIEWS_IN_SESSION or trying to replace my 
> h:commandLink's by h:outputLink or h:link's ?
>
> Thanks for your help!
>
> Francois

Reply via email to