[jboss-user] [JBoss Seam] - Re: [booking example]: question regarding the HotelBookingAc

petemuir do-not-reply at jboss.com
Thu Nov 23 06:43:49 EST 2006


The required attribute on @In/@Out simply says whether the variable can be null or not, by default required=true.

so, lets say we have a variable foo.

If the context variable foo is null

@In Foo foo;

would throw a RequiredException

but

@In(required=true) Foo foo;

wouldn't.

But, if the context variable foo is not null

neither

@In Foo foo;

nor

@In(required=true) Foo foo;

would throw a RequiredException.

If you are using out, its the instance variable, not the context variable that is not null.

If create=true then, if the context variable is null, Seam attempts to create it (@Name or @Factory), if it can't, and required=true, then a RequiredException will be thrown.


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

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



More information about the jboss-user mailing list