[jboss-user] [JBoss Seam] - Re: All injections are disinjected when used in a component
gavin.king@jboss.com
do-not-reply at jboss.com
Thu Oct 26 12:36:28 EDT 2006
Change your code to this:
@Scope(ScopeType.EVENT)
| @Name("taskListTest")
| public class TaskListTest {
| private CustomMap map;
| @In (create=true)
| private User lgactor;
|
| public Map getTestMap() {
| final User lgactor = this.lgactor;
| if (map == null) {
| map = new CustomMap();
| map.registerExecutionListener(new MapExcecutionListener(){
| public Object perform(Object key) {
| return lgactor.getId();
| }
| });
| }
| return map;
| }
| }
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3981065#3981065
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3981065
More information about the jboss-user
mailing list