[jboss-user] [JBoss Seam] - Entity Id as Page Parameters (pages.xml)

fabio.ita04 do-not-reply at jboss.com
Wed Jan 17 17:20:32 EST 2007


Hi,

I'm trying to write a simple application using Seam Framework, based on the seam reference documentation. I have a search screen, that displays a list of entities. For each entity on the list, there's a hyperlink that can be clicked to display an edit page.

Seam reference tells the developer to write the hyperlink as <s:link> with <f:param>, and declares that param at pages.xml, so it can be passed to EntityHome.

So I'm facing a problem: the param is passed to EntityHome as String, and EntityHome invokes

E result = getEntityManager().find( getEntityClass(), getId() );

but my entity identifier is Long typed, so hibernate throws

org.hibernate.TypeMismatchException: Provided id of the wrong type. Expected: class java.lang.Long, got class java.lang.String.

How can I solve this?

Thanx,
Fábio.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4003062#4003062

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4003062




More information about the jboss-user mailing list