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

bfo81 do-not-reply at jboss.com
Thu Jul 13 06:48:50 EDT 2006


"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 one above, which do not all have to be populated when any given method (which may or may not use them) is called?
* The examples are intentionally kept quite simple, so don't wonder why your real-life app seems to be "overcomplex". It surely isn't. DAOs are a very good way to retrieve data from a database, as long as they are used in many other classes. If there is only one class performing a certain db query (and no other predictable scenario in the future) I wouldn't create a DAO cause this only blows up the complexity. If there's no need for something and you still use it, then it's "pattern madness". But that's just my opinion and there surely are other opinion about this, too ;).

* Unfortunately there's no attribute "required" for @RequestParameter like @In or @Out have, and so it always must be set when invoking one of the methods of your bean. I don't know exactly how your app works, but maybe you can use @In(required=false) instead of @RequestParameter? I even believe that this is the way it was meant to in Seam. RequestParameter seems to me to be just a little... well... accomodation to the old fashioned way of passing data from one page to another;).

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

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



More information about the jboss-user mailing list