0

I am using Richfaces 4.1 with myFaces 2.1.5. I have a data table with command links. When i load the page and click the links I instatly get viewExpiredException, no matter how much I wait before clicking, so session cannot expire on the server. I save the viewstate on server. What else can cause the loss of the viewstate?

Here is my code:

<h:form class="page_frame">
    <rich:dataTable value="#{RunArchiveBean.archivedRuns}" var="run" id="run_table" 
                    style="width: 900px; margin-top: 50px; margin-left: auto; margin-right: auto"
                    rowClasses="odd-row, even-row" styleClass="even_odd">
        <f:facet name="header">
            <h:outputText class="output_text_header" value="Run History" />
        </f:facet>
        <rich:column styleClass="run_archive_column" >
            <f:facet name="header">Name<br/></f:facet>
            <h:outputText value="#{run.name}"></h:outputText>
        </rich:column>
        <rich:column styleClass="run_archive_column" >
            <f:facet name="header">Network<br/></f:facet>
            <h:outputText value="#{run.network}"></h:outputText>
        </rich:column>
        <rich:column styleClass="run_archive_column" >
            <f:facet name="header">Network Element<br/></f:facet>
                <h:outputText value="#{run.networkElement}"></h:outputText>
        </rich:column>
        <rich:column styleClass="run_archive_column">
            <f:facet name="header">Creation Date<br/></f:facet>
            <h:outputText value="#{run.creationDate}"></h:outputText>
        </rich:column>
        <rich:column styleClass="run_archive_column">
            <f:facet name="header">Run Date<br/></f:facet>
            <h:outputText value="#{run.timestamp}"></h:outputText>
        </rich:column>
        <rich:column styleClass="run_archive_column_results" >
            <f:facet name="header">Actions<br/></f:facet>
            <a4j:commandLink execute="@this" action="alert('OK');" >
                <h:graphicImage id="log_image" name="log.png" library="images" style="border:0" />
                <rich:tooltip followMouse="true" target="log_image" value="Log" />
            </a4j:commandLink>
        </rich:column>
    </rich:dataTable>
</h:form>
Hodossy Szabolcs
  • 1,598
  • 3
  • 18
  • 34

1 Answers1

0

Looks like the server-side saving is the issue, though I can't say why - I've never encountered this error in newer versions of RichFaces. Switching to client-side saving should solve it.

For a more detailed explanation see this question.

Community
  • 1
  • 1
Makhiel
  • 3,874
  • 1
  • 15
  • 21
  • Thanks, I have already seen that page you linked. The client side state save is not an option here, because it could possibly generate huge amount of data traffic. – Hodossy Szabolcs Jun 04 '14 at 13:09