This content has been marked as final.
Show 3 replies
-
1. Re: [booking example]: question regarding the HotelBookingAc
pmuir Nov 23, 2006 6:43 AM (in response to ellenzhao)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. -
2. Re: [booking example]: question regarding the HotelBookingAc
ellenzhao Nov 23, 2006 7:06 AM (in response to ellenzhao)"petemuir" wrote:
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.
Was there a typo? It might be@In(required = false) Foo foo;
or? -
3. Re: [booking example]: question regarding the HotelBookingAc
pmuir Nov 23, 2006 7:13 AM (in response to ellenzhao)Sorry, yes, a typo ;)