[jboss-user] [JBoss Seam] - Re: Is this the correct way to go about this?

joff do-not-reply at jboss.com
Thu Jul 13 19:23:33 EDT 2006


Upon closer inspection, we found our problem: the parameter was being passed in as a String, and we were expecting a long. So we now have:


  | @RequestParameter
  | private String companyID;
  | 
  | public Company getCompany() {
  |   if(companyID != null) {
  |     return (Company) entityManager.find(Company.class, 
  |             Long.decode(companyID));
  |   }
  |   return null;
  | }

Everything seems to be working happily now - thanks!


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

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



More information about the jboss-user mailing list