This content has been marked as final.
Show 2 replies
-
1. Re: Duplicate Factory problem
buckmin.erdem.agaoglu.gmail.com Mar 3, 2009 9:46 AM (in response to mapoitras)i think @Factory usage in here is a bit inappropriate. Since @Factory will outject a context variable named
isScreenDetailsPropertiesSet
it will create a confusion if there is more than one component of the same ancestor (so duplicate factory error). Like, which component isScreenDetailsPropertiesSet? i would initialize it with @Create or maybeinitAction
in your case and access it like #{accountStatus.screenDetailsPropertiesSet}.But if you have to use @Factory i think you should override findIsScreenDetailsPropertiesSet in child components and annotate them with different values.
-
2. Re: Duplicate Factory problem
bravocharlie.seam.signup.benny.me.uk Mar 3, 2009 11:47 AM (in response to mapoitras)Why not just turn the method in to a getter?
public boolean isScreenDetailsPropertiesSet() { if (isScreenDetailsPropertiesSet == null || isScreenDetailsPropertiesSet == false) { initAction(); isScreenDetailsPropertiesSet = true; } }
Then in your XHTML you can do
#{accountStatus.screenDetailsPropertiesSet}