[jboss-user] [JBoss Seam] - Re: HowTo: When going to a page to enter data, pull from db

petemuir do-not-reply at jboss.com
Sat Apr 21 18:03:17 EDT 2007


"CptnKirk" wrote : Yep, it was late, I forgot I overrode the scope on some of my entities.  However there are plenty of times where simple CRUD doesn't fit the bill.  If you're actually managing an entity, sure, use a Home.  However if you're using a form to populate an entity for another purpose, using Seam to populate a scoped entity and hand it off for further processing has advantages.  Of course the entity doesn't need to be an EJB 3 entity.  Seam does the same for POJOs.

+1

anonymous wrote : For example I don't think I'd recommend using a Home to populate a search prototype.  For search pages, an entity with an event scoped role combined with Hibernate's Criteria API + Example criterion is great.

I prefer using a Query with restrictions in most cases (mainly 'caus the wiring is all done for me) - you can get some pretty complex queries going with just few lines of xml.  But definitely an extended entity, or one configured through components.xml is a great way.

anonymous wrote : What would be really great would be to put out a Seam cookbook.

You should talk to some publishers :) There really aren't many Seam books out atm
  
anonymous wrote : For an example you could have a managed component observe many events that happen within your system and change the underlying representation as a result of those observations.  With the managed component pattern a component can manage these actions itself and because the component is unwrapped on every access, all callers will have a consistent view.  This is a much different use than what Factories provide for.

Interesting use, I've never thought of that - the manual is pretty light on decent uses of @Unwrap (that wouldn't be better done by @Factory), if I get a moment (and you don't mind) I'll try to incorporate that.

Now, if only the forums had a decent search function so people could read all these useful discussions ;)

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

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



More information about the jboss-user mailing list