This content has been marked as final.
Show 2 replies
-
1. Re: Component.getInstance(String) for non-component (non-Seam component) value
stani0 Apr 22, 2010 5:26 PM (in response to stani0)Just to clarify, I've tried and observed in the Seam sources the above usage works o.k. I'm asking whether it is intended to work o.k. or is some major flaw in the usage which is not guaranteed to work in future versions?
-
2. Re: Component.getInstance(String) for non-component (non-Seam component) value
stani0 Apr 23, 2010 12:31 PM (in response to stani0)The question could be stated also this way. Could one just use Component.getInstance("varName") for values which are not Seam components, or one should do it more verbose and manually like:
Object val = Contexts.lookupInStatefulContexts("varName"); if (val == null) { val = Component.getInstanceFromFactory("varName"); }
Then one could still argue because getInstanceFromFactory() is method of the Component class it should not be invoked for non-component values.