[nbj2ee] Re: how to access managedbean with code java

  • From: John Yeary < >
  • To:
  • Subject: [nbj2ee] Re: how to access managedbean with code java
  • Date: Mon, 30 Jul 2012 09:20:08 -0400

The explanation again is rather vague. 

If it is a JSF Managed Bean, you can pass it in it as a @ManagedProperty. If it is a CDI bean, you can use @Inject with some caveats about the injection. The scope of the injected bean must be the same scope, or wider.

John 
____________________________

John Yeary
____________________________ 
NetBeans Dream Team
President Greenville Java Users Group
Java Users Groups Community Leader
Java Enterprise Community Leader


____________________________ 

       

"Far better it is to dare mighty things, to win glorious triumphs, even though checkered by failure, than to take rank with those poor spirits who neither enjoy much nor suffer much, because they live in the gray twilight that knows not victory nor defeat."
-- Theodore Roosevelt



On Sun, Jul 29, 2012 at 12:46 PM, prevert < " target="_blank"> > wrote:
hello
in an application with jee jsf2.0
I want access from  ManagedBean commandeController to data from another ManagedBean UserController but I have not find how
for example I have a ManagedBean userController which contains an id attribute
I accessed from the page with xhtml
# {userController.id}

but with the java code I do not know how

do you have an idea


thank you very much







[nbj2ee] how to access managedbean with code java

prevert 07/29/2012

[nbj2ee] Re: how to access managedbean with code java

John Yeary 07/30/2012

Project Features

About this Project

www was started in November 2009, is owned by jpirek, and has 21 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20131025.e7cbc9d). © 2013, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close