| Author |
My Managed Bean don't go to the requestmap.
|
Frederico Benevides
Greenhorn
Joined: Jan 15, 2006
Posts: 25
|
|
I have my page So as I'm testing, when I click in the button, after "editing". I don't know why I can't get a requestMap in my bean "userMB". Only shows the "userManagerMB" in the request. my faces-config. my classes Someone has any idea why I can't get the my "userMB" in the request? Thank you!
|
 |
Ravindra Rawat
Ranch Hand
Joined: Dec 09, 2004
Posts: 34
|
|
Hi Frederico, Checkout the full request map dump. Do you find any faces bean there? Beans can be accessed by using a variable resolver (http://java.sun.com/javaee/javaserverfaces/1.2_MR1/docs/api/index.html) or you can inject the required beans. See http://www.oracle.com/technology/tech/java/newsletter/articles/jsf_pojo/index.html Thanks Ravindra
|
 |
Frederico Benevides
Greenhorn
Joined: Jan 15, 2006
Posts: 25
|
|
The only bean in my request is the userManagerMB. About injecting my beans in the faces-config, it works normally.
|
 |
Edisandro Bessa
Ranch Hand
Joined: Jan 19, 2006
Posts: 584
|
|
Hi "Fred", I think I have a good clue regarding your problem : All managed beans take place (are put on request, session or application scopes) only right after its first usage is encountered during JSF page processing. I could see that your userMB bean is supposed to be valid only if the userManagerMB editable property is false, right ? So, supposing the userManagerMB editable property is true on the first time the page is loaded, the userMB bean never takes place. I think you should change your class logic, so just for testing purposes, try to change the value of rendered property of the first outputText component to the following value : rendered="#{userManagerMB.editable}" instead of rendered="#{not userManagerMB.editable}". And then check whether userMB bean is available for your class. Please let us know about the results. B. Rgds. Edisandro [ June 05, 2007: Message edited by: Edisandro Bessa ]
|
"If someone asks you to do something you don't know how to, don't tell I don't know, tell I can learn instead." - Myself
|
 |
 |
|
|
subject: My Managed Bean don't go to the requestmap.
|
|
|