atom feed4 messages in org.apache.myfaces.usersRe: how to access a managed bean from...
FromSent OnAttachments
Legolas WoodlandSep 21, 2006 4:07 pm 
Alexandre JaquetSep 21, 2006 11:32 pm 
Craig McClanahanSep 22, 2006 1:42 am 
K. JohnsonSep 22, 2006 8:37 am 
Subject:Re: how to access a managed bean from a button action listener ?
From:K. Johnson (in@streetcookie.com)
Date:Sep 22, 2006 8:37:04 am
List:org.apache.myfaces.users

You can also use: FacesContext facesContext = FacesContext.getCurrentInstance(); MyBean myBean = (MyBean)
FacesContext.getApplication().createValueBinding("{MyBeanAliasUsedInFacesConfig}");

This accesses the managedBean in context.

-------Original Message------- From: Alexandre Jaquet <a.ja@avintis.com> Subject: Re: how to access a managed bean from a button action listener ? Sent: 22 Sep '06 06:33

actionListener="#{session.actionToExecute}"

in your managed bean create

public void actionToExecute(ValueChangeEvent event) {     //String value = ( String) event.getNewValue(); } Legolas Woodland wrote:

Hi thank you for reading my post how i can access a managed bean from a button action listener ? for example i have a managed bean named session and its scope is session , i used it to store user details until he/she logout and when he/she pressed the logout button i need to change some of that managed bean property , can you please tell me how i can do it ? I also need it for time that user press the login button. thanks