i had the same error and i think i made it go away with required=false though this should only be important to the time when the variable is outjected.
afaik outjection is done after invocation of a method of the component but it looks like it is outjected as well after the component has been created
I had @Out on a property but then got a org.jboss.seam.RequiredException "Out attribute requires value for component". So I changed it to @Out(required=true) and the exception went away.
Shouldn't it be changed to @Out(required = false) to get rid of the exception?
required = true is default with @Out. Anytime the owning component is accessed, and requires an outjection, the assertion will be made. This can happen during invoke application (jsf request) or render phase (initializing a data model via @Factory)
hstang, you're correct, I meant to say required=false in my original post.
You said "anytime the owning component ... requires an outjection, the assertion will be made". When does it require outjection? You mentioned it's during invoke application or render phase, so is it correct for me to believe that it's only when an action method is accessed rather than just get/set a property upon first page access?
I only know three phases off the top of my head(updatemodel, invoke application, and render phase), but I would imagine that for all 6 phases in JSF, if a Seam component is accessed and requires an outjection, then the assertion (be it false or true) will be made.
action method (via h:commandButton) is part of the invoke application phase.
get and set property happens during render phase and update model phases. So all those cases need to be taken to account
Well I'd imagine that required=false would be needed a LOT more often if outjection would be done after the first Seam phase...?
Anybody know with certainty about this issue?
Outjection is done after any access to a component. The @Intercept annotation can limit this to only certain phases.