[jboss-user] [JBoss Seam] - Re: Problem with injection @In

2007-10-04 Thread luiz.sg
"swd847" wrote : | when a user logs in the user entity is outjected to session scope, allowing it be used by other beans. When you think about it it makes sense that an exception is thrown, how can you inject the current user if they have not logged in yet? | | Yes, I tought i had unde

[jboss-user] [JBoss Seam] - Re: Problem with injection @In

2007-10-04 Thread luiz.sg
"swd847" wrote : Are you referring to the booking example? | | The reason why it works in the example is because of this little bit of code in the AuthenticatorBean: | | @Out(required=false, scope = SESSION) |private User user; | | when a user logs in the user entity is outje

[jboss-user] [JBoss Seam] - Re: Problem with injection @In

2007-10-04 Thread luiz.sg
"saeediqbal1" wrote : exactly what was causing me alot of waste of time and frustration. Something that works in the examples should also work in our projects. whats up with that? What a I don't undestand is that I can run the example perfetly, and I based my projetc in this example. Hope some

[jboss-user] [JBoss Seam] - Re: Problem with injection @In

2007-10-04 Thread nickarls
Well, as I've understood it, Seam creates non-existing components as they are referenced. So if you inject A into B it might work fine if you have referenced A earlier in the page. I don't think session scope is any different, if you only reference it late in the page it doesn't exist before t

[jboss-user] [JBoss Seam] - Re: Problem with injection @In

2007-10-04 Thread swd847
Are you referring to the booking example? The reason why it works in the example is because of this little bit of code in the AuthenticatorBean: @Out(required=false, scope = SESSION) private User user; when a user logs in the user entity is outjected to session scope, allowing it be used b

[jboss-user] [JBoss Seam] - Re: Problem with injection @In

2007-10-04 Thread saeediqbal1
exactly what was causing me alot of waste of time and frustration. Something that works in the examples should also work in our projects. whats up with that? View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4091807#4091807 Reply to the post : http://www.jboss.c

[jboss-user] [JBoss Seam] - Re: Problem with injection @In

2007-10-04 Thread luiz.sg
"matt.drees" wrote : Which part of the hibernate example are you referring to? This one: | @Entity | @Name("user") | @Scope(SESSION) | @Table(name="Users") | public class User implements Serializable | { |private String username; |private String password; |private

[jboss-user] [JBoss Seam] - Re: Problem with injection @In

2007-10-04 Thread matt.drees
Which part of the hibernate example are you referring to? View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4091804#4091804 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4091804

[jboss-user] [JBoss Seam] - Re: Problem with injection in an jsf action listener

2006-10-02 Thread petemuir
"cristi.ciuc" wrote : Thank you for the replies. | | So, I understand that when | | | | is called, a new instance of the listener gets created, that is not intercepted by Seam. Is that correct? Yes, from org.apache.myfaces.taglib.core.ActionListener ActionListener al = (ActionLi

[jboss-user] [JBoss Seam] - Re: Problem with injection in an jsf action listener

2006-10-02 Thread cristi.ciuc
Thank you for the replies. So, I understand that when is called, a new instance of the listener gets created, that is not intercepted by Seam. Is that correct? If so, my question still stands: how can I use seam injection in a JSF ActionListener? How can I tell Seam via the tag to use an

[jboss-user] [JBoss Seam] - Re: Problem with injection in an jsf action listener

2006-10-02 Thread [EMAIL PROTECTED]
To "new" a Seam component use Component.getInstance(name) View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3975556#3975556 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3975556 _

[jboss-user] [JBoss Seam] - Re: Problem with injection in an jsf action listener

2006-10-02 Thread petemuir
You got the answer in your subject :) In your first situation you are injecting the ActionListener (#{...}) which means Seam instantiates it properly. In the second situation you are just creating a new instance ActionListener al = new com.nortel.emp.listener.AddRoleListener(); - Seam doesn'