-
1. Re: Beginner: some questions
damianharvey.damianharvey.gmail.com Mar 4, 2008 3:47 PM (in response to rgbg5)While the Seam book is good you may find the Reference Documentation as helpful (a second source of info is always a good thing).
EntityBean : think of this as being a record from your database. You should start off by not putting any logic in it at all. It's just a container.
SessionBean : this is where you might have some logic, eg. reading a record from the database into an EntityBean.
JSF Page : the page that you present to the User. You can refer to your Session bean with the notation #{mySessionBeanName.someProperty}
AutoCreate just tells Seam to create an instance of the Bean automatically. Rather than having to use @In(create=true) you can just use @In. If you are getting null pointers then you'll need either @AutoCreate or @In(create=true)
I really would suggest using Seam-Gen to create your first project. If you follow the standards from that you'll see how EntityBeans get created (they don't have @Name - although there's non reason why not).
You got error messages when you tried to use
newcontact
because the name of the variable used with @In should match exactly the name you provide with @Name (unless you use @In(value="#{contact}") Contact newContact;Give Seam-gen a go and then let us know how you get on.
Cheers,
Damian
-
2. Re: Beginner: some questions
nickarls Mar 4, 2008 10:46 PM (in response to rgbg5)The JBoss Tools for Eclipse have a great wizard for creating new projects, too.
If you are new to MVC and
IOC-frameworks
, reading through a book at one sitting might be a little like trying to drink from a fire hose. Play around with code. Then re-read the manual. Test theories in code. Re-read the manual.There is a nice article series on IBM developerWorks Java section, too.