In method
restoreStateFromSession(FacesContext, String, String), there seems to be a problem with restoring the last saved state on lines 285 and 293. The log messages above each of the lines explicitly states that the LAST state should be restored. However, the code restores the first state.
logicalStates.firstKey()to
logicalStates.lastKey()and could finally start to work after several days of debugging until I found this flaw. This is the code snipped I tested against:
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%> <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %> <%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%> <%@ taglib uri="http://richfaces.org/rich" prefix="rich"%> <f:view> <a4j:page id="page" pageTitle="desperate"> <h:form id="reloadForm"> <rich:tabPanel id="panel" switchType="server" value="First"> <rich:tab id="First" name="First" label="First"> <h:commandLink id="link1" actionListener="#{tb.printHelloA}"> <h:outputText value="Link A" /> </h:commandLink> </rich:tab> <rich:tab id="Second" name="Second" label="Second"> <h:commandLink id="link2" actionListener="#{tb.printHelloB}"> <h:outputText value="Link B" /> </h:commandLink> </rich:tab> </rich:tabPanel> </h:form> </a4j:page> </f:view>