7 Replies Latest reply on Aug 12, 2010 12:25 AM by deanhiller2000

    Here is how to fix view timed out on login page!!!

    deanhiller2000


      <context-param>
        <param-name>facelets.BUILD_BEFORE_RESTORE</param-name>
        <param-value>true</param-value>
      </context-param>
      <context-param>
        <param-name>facelets.RECREATE_VALUE_EXPRESSION_ON_BUILD_BEFORE_RESTORE</param-name>
        <param-value>true</param-value>
      </context-param> 



      except it seems to break other crap :(.  Anyone know how to configure this right so that we don't get those dang JSF view timed out crap when someone leaves their login page open too long, comes back and logs in.  They are such an annoyance to users.  Our tester filed a few bugs on that and I keep saying I can't really fix it.  but I do agree, it annoys me too when I go back and try to login especialy on those apps that timeout and send you back to login page and then you login after session dies an hour later to get a nice view timed out.  Is it me or did seamframework.org finally fix that issue as well?....I can't tell for another 20 minures until my seam session times out though.




        • 1. Re: Here is how to fix view timed out on login page!!!
          herberson

          Hi, it works?


          Herberson

          • 2. Re: Here is how to fix view timed out on login page!!!
            deanhiller2000

            I thought I had it working at some point.(I thought).  It has been way too long.  That flag which there is not much info is supposed to build the view if it doesn't exist so users don't get a viewtimeoutexception on pages that don't really need session data.


            later,
            Dean

            • 3. Re: Here is how to fix view timed out on login page!!!
              amitev

              I use a javascript timer that redirects the browser to the login page on session timeout. Of course i reset the timer on ajax request.

              • 4. Re: Here is how to fix view timed out on login page!!!
                deanhiller2000

                So anyone that happens to be on the login page, there is code that keeps his session alive forever defeating the purpose of sessions kind of.  ie. That doesn't feel right to me.  I read something on the seam website about timing out and sending to a non-form page which works well as the session is reclaimed and the user won't see viewtimeout at all....they just have to click login again.  I did like that solution a little better.....ideally though, JSF sometime along with facelets should fix this to be able to post a form even if it no longer has the page model in memory.  I have seen alot of code on the net regarding this....some even did the login page outside of JSF just so they could make it perfect(and not keep sessions alive which is not the best thing to do.....it may not matter for one page, but it is still wasting resources).


                • 5. Re: Here is how to fix view timed out on login page!!!
                  herberson

                  It works!




                  Dean Hiller wrote on May 24, 2010 05:12:




                  <context-param>
                    <param-name>facelets.BUILD_BEFORE_RESTORE</param-name>
                    <param-value>true</param-value>
                  </context-param>
                  <context-param>
                    <param-name>facelets.RECREATE_VALUE_EXPRESSION_ON_BUILD_BEFORE_RESTORE</param-name>
                    <param-value>true</param-value>
                  </context-param> 






                  Herberson

                  • 6. Re: Here is how to fix view timed out on login page!!!
                    deanhiller2000

                    yes, but I thought I ended up with other problems in testing as it seemed to screw with other pages or something.  I can't quite remember and never fully got to QA so maybe I am just making a mistake there and should go back and retry this setting.

                    • 7. Re: Here is how to fix view timed out on login page!!!
                      deanhiller2000

                      Heberson,
                         I finally got back to trying that and it did break other stuff.  I had a long running 2 page conversation and ajax with s:decorate and the post now loses the conversation id after I changed my web.xml file.  I did not add the RECREATEVALUEEXPRESSIONONBUILDBEFORERESTORE but only did the BUILDBEFORERESTORE.  I don't think that is it.  Are you having any problems with long running conversations?


                      thanks,
                      Dean