You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Ricaldodepollo <r....@gmail.com> on 2012/09/21 18:11:25 UTC

Not Session Timeout, but throw ViewExpiredException

Hello guys. 

I have been trying to solve this issue for a month now with out any success.
I tried to see if the guys in the Primefaces forum had any idea of how to
solve this but they dint either (
http://forum.primefaces.org/viewtopic.php?f=3&t=24766 forumTopic ) :S... 

So finally I turn to you guys to see if you can give so help in solving this
bug. 

This is the problem I´m trying to solve: 

I have a web project with MyFaces 2.1.9 and Primefaces 3.3.1. In this
project I use a lot of Primefaces components that depend heavily on
Ajax(Especially the Primefaces Complex Data Table 
http://www.primefaces.org/showcase-labs/ui/datatableComplex.jsf
DatatableComplex.jsf ). 

When I start running the project every thing works fine, but as I´ll start
calling the different funtions in the project certain pages start to give me
a ViewExpiredException when I call any funcionality that uses an Ajax call.
But if I call any function in this pages that doesn't use Ajax before
calling the ones that does the page seems to refresh and after that I don´t
get the ViewExpiredException. 

Now if I go to another page in the system and come back to the one I´m
having problems with the ViewExpiredException appears again. If I restart
the server the problem persist but now it appears immediately in the pages
with this problem instead of talking a while like the first time. The only
way I can make this problem disappear for a while is to delete the
historical data from the web Browser and restarting the server, and then the
system start to behave like the fist time I stated running. 

I have read in this forum that jsf has issues when you heavily use Ajax
components and I have tried some of the solutions shown here (
http://old.nabble.com/ViewExpiredException-with-multiple-forms-on-a-page-and-ajax-calls-td32588357.html
ViewExpiredException Solution ) but with out any success. 

I´ll deeply appreciate any help you guys can give me 

Regards 

Ricardo
-- 
View this message in context: http://old.nabble.com/Not-Session-Timeout%2C-but-throw-ViewExpiredException-tp34463183p34463183.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.


Re: Not Session Timeout, but throw ViewExpiredException

Posted by Werner Punz <we...@gmail.com>.
Seems like my last mail was swallowed by game.org, I will resend again.
Do you use multiple forms if yes add following after the jsf.js include 
to your page
  <script type="text/javascript">
        //fixup for an issue of the jsf2.0 and 2.1 ajax spec to deal
with multiple forms per page
        window.myfaces = window.myfaces || {};
        myfaces.config = myfaces.config || {};
        myfaces.config.no_portlet_env = true;
    </script>

Kind regards

Werner Punz


Am 21.09.12 18:11, schrieb Ricaldodepollo:
>
> Hello guys.
>
> I have been trying to solve this issue for a month now with out any success.
> I tried to see if the guys in the Primefaces forum had any idea of how to
> solve this but they dint either (
> http://forum.primefaces.org/viewtopic.php?f=3&t=24766 forumTopic ) :S...
>
> So finally I turn to you guys to see if you can give so help in solving this
> bug.
>
> This is the problem I´m trying to solve:
>
> I have a web project with MyFaces 2.1.9 and Primefaces 3.3.1. In this
> project I use a lot of Primefaces components that depend heavily on
> Ajax(Especially the Primefaces Complex Data Table
> http://www.primefaces.org/showcase-labs/ui/datatableComplex.jsf
> DatatableComplex.jsf ).
>
> When I start running the project every thing works fine, but as I´ll start
> calling the different funtions in the project certain pages start to give me
> a ViewExpiredException when I call any funcionality that uses an Ajax call.
> But if I call any function in this pages that doesn't use Ajax before
> calling the ones that does the page seems to refresh and after that I don´t
> get the ViewExpiredException.
>
> Now if I go to another page in the system and come back to the one I´m
> having problems with the ViewExpiredException appears again. If I restart
> the server the problem persist but now it appears immediately in the pages
> with this problem instead of talking a while like the first time. The only
> way I can make this problem disappear for a while is to delete the
> historical data from the web Browser and restarting the server, and then the
> system start to behave like the fist time I stated running.
>
> I have read in this forum that jsf has issues when you heavily use Ajax
> components and I have tried some of the solutions shown here (
> http://old.nabble.com/ViewExpiredException-with-multiple-forms-on-a-page-and-ajax-calls-td32588357.html
> ViewExpiredException Solution ) but with out any success.
>
> I´ll deeply appreciate any help you guys can give me
>
> Regards
>
> Ricardo
>