[jboss-user] [JBoss Seam] - Re: ouject a non seam bean

2007-04-19 Thread petemuir
Post your code

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4038765#4038765

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4038765
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: ouject a non seam bean

2007-04-19 Thread mousstik
ok


  | @Name(seam1)
  | @Scope(ScopeType.CONVERSATION)
  | public class Seam1Action {
  | 
  | private Model model;
  | 
  | private String updateModel{ // method called on an actionCommand in JSF
  |// 
  |setModel(model);
  | }
  | }
  | 
@Name(seam2)
  | @Scope(ScopeType.CONVERSATION)
  | public class Seam2Action {
  | @In 
  | private Seam1Action seam1;
  | 
  |  public Seam2Action() {
  |   sysout(seam1.getModel().toString());
  | }
  | 
  | ...
  | }
  | 

This code returns a null pointerException.
When I comment the sysout and put
h:outputText value=#{seam2.seam1.model.attribute} /
  | 
it works ???

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4038768#4038768

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4038768
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: ouject a non seam bean

2007-04-19 Thread mousstik
Ok, sorry.
I can't get my object Model in the constructor. My Model has not yet been 
created by seam...

When I get in a getAttribute, it works very well.

Thanks

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4038781#4038781

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4038781
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: ouject a non seam bean

2007-04-19 Thread Sammy8306
You can't access injected beans in the constructor. Instead, use a method 
annotated with @Create to do this kind of initialization stuff.

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4038829#4038829

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4038829
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user