[jboss-user] [JBoss Seam] - Re: @In(create=true) throws exception when variable is null?
SmokingAPipe
do-not-reply at jboss.com
Wed Dec 13 13:38:03 EST 2006
Ok, I figured it out. Foo wasn't "any old class", but there wasn't a "createFoo" role. To get Seam to instantiate something, you need to:
1. Make sure there is a Role with the necessary name. You can specify this with either @Name, or you can have additional component names by using @Role or @Roles.
2. In the session bean, you use @In(create=true,value="...") to tell Seam to instantiate that. I think the value="..." is optional if the variable name in the session bean is the same as the name on the entity (either the @Name or @Role).
I just did that and now it works.
I think I'm getting this thing under control. It seems like once I get fluent in this it will be an amazing way to do web development.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3993529#3993529
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3993529
More information about the jboss-user
mailing list