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

2006-07-13 Thread joff
The problem was when the request parameter wasn't passed in via the URL, i.e. when we use the getCustomers() method, which doesn't use that parameter. We were actually expecting a primitive long (I should have checked my capitalization in my previous post), which obviously cannot be made null by

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

2006-07-13 Thread [EMAIL PROTECTED]
Seam should automagically do the type conversion from String to Long ... are you sure that was the problem? View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3957924#3957924 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=39

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

2006-07-13 Thread joff
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) entityManag

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

2006-07-13 Thread [EMAIL PROTECTED]
@RequestParameter String companyId; | | public Company getCompany() | { | return getCompany(companyId); | } | | public Company getCompany(String companyId) | { | return entityManager.find(Company.class, companyId); | } Note that if there is no value for an @RequestPar

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

2006-07-13 Thread bfo81
"joff" wrote : We have two questions: | Is this the correct way to be doing this type of "pull" data access? We have looked at the "Blog" example, but it does not seem as complex as what we are trying to do. | Is it possible to have multiple @RequestParameter fields on a JavaBean like the on