NetBeans Forums
| View previous topic :: View next topic |
| Author |
Message |
ninn
Joined: 18 Nov 2010 Posts: 1
|
Posted: Thu Nov 18, 2010 3:15 pm Post subject: Session Beans? JSF 2.0 and NetBeans 6.9 |
|
|
| I am new to Netbeans.. In fact, the first time I've ever used it was this week. I am almost finished with my project (deadline is tomorrow) but the only thing that is holding me up is these Sessions. I find the idea of "Beans" extremely annoying, but I also understand that is because I don't know how to properly use them. I just need to pass variables between controllers. I've tried to do this by calling the controller and passing the variable as a parameter and setting it in the new controller. As soon as I get to the redirect at the end of my method, I move to the new controller that I set the variable in and the value is gone! I do not understand this. I thought that the Session Scoped annotation was supposed to hold these values until the session is ended by the user. Literally, all I need to do is: the user will click on a label, the label holds a value and calls a method from the current controller..that controller will set the value into a private variable..then redirect to another page controlled by another controller.. in this controller I need to retrieve the first value that was set. Session would be the best way in any other IDE I've ever used. But I cannot quite wrap the idea of the way Netbeans uses session. Please help. Point me in the right direction or something. |
|
| Back to top |
|
 |
Rick Fincher Posted via mailing list.
|
Posted: Fri Nov 19, 2010 4:03 am Post subject: Re: Session Beans? JSF 2.0 and NetBeans 6.9 |
|
|
Are you using Glassfish with a J2EE 6 project? The annotations only
work in J2EE 6 otherwise you have to add them to the config XML file.
On 11/18/2010 10:16 AM, ninn wrote:
| Quote: | I am new to Netbeans.. In fact, the first time I've ever used it was this week. I am almost finished with my project (deadline is tomorrow) but the only thing that is holding me up is these Sessions. I find the idea of "Beans" extremely annoying, but I also understand that is because I don't know how to properly use them. I just need to pass variables between controllers. I've tried to do this by calling the controller and passing the variable as a parameter and setting it in the new controller. As soon as I get to the redirect at the end of my method, I move to the new controller that I set the variable in and the value is gone! I do not understand this. I thought that the Session Scoped annotation was supposed to hold these values until the session is ended by the user. Literally, all I need to do is: the user will click on a label, the label holds a value and calls a method from the current controller..that controller will set the value into a private variable..then redire
ct to another page controlled by another controller.. in this controller I need to retrieve the first value that was set. Session would be the best way in any other IDE I've ever used. But I cannot quite wrap the idea of the way Netbeans uses session. Please help. Point me in the right direction or something.
|
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|