Passing parameters in URL

Hi,

I'm having a lot of trouble with passing get parameters in through the url using JSF.

I have links generated in a dataTable:

<h:outputLink value="showObject.faces">

<h:outputText value="#{object.description}"/>

<f:param name="objid" value="#{object.id}"/>

</h:outputLink>

This generates a link to "showObject.faces?objid=3" which looks fine.

But when I click on it I get the exception:

exception

javax.servlet.ServletException: viewId:/showObject.faces - View /showObject.faces could not be restored.

root cause

javax.faces.application.ViewExpiredException: viewId:/showObject.faces - View /showObject.faces could not be restored.

Anyone has any idea what's causing this?

The page showObject.faces shows up nicely if no parameters are passed.

Br,

/Richard

[897 byte] By [ricarlssona] at [2007-11-27 10:06:28]
# 1

Is there a specific reason you are trying to pass the parameter through the url? The way JSF is set up you can use your backing beans to store information used between pages so that you don't have to pass them through the url. It also allows you to pass your values between beans by using tags like f:setPropertyActionListener. If you could be more specific about why you need to pass the value, perhaps someone could give you a better way to pass the information.

jco1323a at 2007-7-13 0:42:44 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...