Pergunta

For a Seam application, I am trying to pass page parameters after encountering a ViewExpiredException in pages.xml (session time out) on the redirect view but they get dropped when the browser redirects to the view.

<exception class="javax.faces.application.ViewExpiredException">
      <redirect view-id='/accessExpired.xhtml'>
            <param name="hiddenRoleTag" value="BORROWER" />
      </redirect>
 </exception>

the page parameter would actually be dynamic and the page would display text based on the page parameter but for simplicity I have kept the param as static (for now).

Any way around this?

Foi útil?

Solução

In 2.2.0, Seam ignores any <param/> nodes within an <exception/> navigation definition. Note that the exception handler is created when the application is initialized, not dynamically when the error happens. Also, note that when your session expires, so does the data that the session held (including conversation data), so you will not be able to use any of that data when this specific error happens.

The view-id value, on the other hand, is a ValueExpression, so you can use expressions directly in the view id.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top