Dear Team,
1. I need to pick the factoried variable (@Factroy) generically from any of the active context and update it.
Seam provides 'Context.lookupInStatefulContexts(String name)' for global search of the component/variable.
However, there is no way (I guess) to set the value in the same context from where we found it. Any way? Please suggest.
2. Whats are difference? Incase of factory method the code works and towards In/Out the error is thrown as 'No conversation active' w.r.t getter/setter. related
@In(required=false, value="baseView") public void setView(UIPanel panel){ super.setView(panel); } @Out(required=false, value="baseView") public UIPanel getView(){ return super.getView(); }
@Factory("baseView") public HtmlAjaxOutputPanel initView(){ return super.initView(); }
Not completely, however worked alternatively. http://seamframework.org/Community/ProgrammaticallyViewGeneration#comment111250
I guess to some extend I got a difference. @Factory outjects/set the attribute (non-void return value from the annoted method) in the context respectively. Where as @Out outjects the seam component.
Guys, please correct any misunderstandings!