You can inject the name of the class as a JSF ManagedProperty. However, note that this requires multiple instances of the seuManagedBean. That's not that bad, however, since it's not a very big bean.
You should not use a lower-case letter as the initial letter of the class name, however. That violates Java's coding standards and may even cause the ManagedBean mechanism to fail. A proper name would be something like: "SeuManagedBean", which the JSF bean instantiator would then catalog under the name "seuManagedBean".
However, if you take my original advice, which requires multiple instances, you'll need to configure this bean in faces-config.xml, since you'll need each instance to be cataloged under a unique bean name, and the annotation processor cannot handle that, not can it handle the multiple values for the injected ManagedProperty.
An IDE is no substitute for an Intelligent Developer.
Joined: Mar 25, 2011
Ok, you are right, I will follow the java coding standards, i will rename the "seuManagedBean" to "SeuManagedBean", but I don't know how implement faces-config.xml, how i can implement that?
Another thing, take a look in code below: it's the same logic as the "SeuManagedBean":
I use the same logic as the "SeuManagedBean", but they call two methods
and each of them call a diferent criteria
This way, everytime i need to populate a selectonemenu, the code will call all methods(each accesses the database to retrieve the records), my application may become slow?
I understand your idea about the config in faces-config.xml, but i don't know how to implement.