Jsf Error : java.lang.ClassCastException

橙三吉。 提交于 2019-11-29 07:47:23
BalusC

This is known as JSF issue 1427. Partial state saving may fail when ajax requests are fired on a page which is been opened by a JSF POST navigation case. There are three solutions, in recommended order:

  1. Do not use POST for page-to-page navigation. So replace <h:commandLink> by <h:link> or <h:outputLink>. See also h:outputLink vs h:commandLink.

  2. Implement POST-Redirect-GET pattern. So if you're still using old fashioned <navigation-case> in faces-config.xml, then add <redirect/> entry. Or if you're using implicit navigation outcomes, then add ?faces-redirect=true query string to the outcome.

  3. Configure the problematic pages to utilize full state saving.

    <context-param>
        <param-name>javax.faces.FULL_STATE_SAVING_VIEW_IDS</param-name>
        <param-value>/pagename.xhtml</param-value>
    </context-param>
    

    (multiple pages can be definied using comma as separator)

Download the new version of JSF framework.

See version 2.1.11 !

It's a problems caused for bug in ajax state request on internal jsf framework !

For more information please see link http://java.net/jira/browse/JAVASERVERFACES-1845;

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!