zoukankan      html  css  js  c++  java
  • No saved view state could be found for the view identifier

    解决方法:

    javax.faces.application.ViewExpiredException:No saved view state could be found for the view identifier 

    As you probably already know, JSF is storing the view state of your page in session. Obviously, when the session has timed out, it can’t restore the view state and so throws a ViewExpiredException. 

    The solution for this problem is to add the following lines in your web.xml file: 


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


    When this initialization parameter is turned on, it changes ViewHandler.restoreView() to build the view before asking the StateManager for help. 

    However, if you are using RichFaces, for some reason this is breaking a few Ajax components! 
    To be honest with you, I didn’t investigate in depth why these components don’t work with this parameter set to true. 

  • 相关阅读:
    HDU2767 Proving Equivalences
    POJ2771 Guardian of Decency
    POJ1111 Image Perimeters
    简单就好
    工具乃思维的奴隶
    “年终奖”
    学点经济学知识(二)
    被忽略的技能
    猿类己见
    学点经济学知识(一)
  • 原文地址:https://www.cnblogs.com/liyanwei2013/p/3297762.html
Copyright © 2011-2022 走看看