Or if you want to access another managed bean at "runtime" so to speak
you can use a method something like this:
public static Object resolveExpression(FacesContext ctx, String
expression)
{
Application app = ctx.getApplication();
ValueBinding bind = app.createValueBinding(expression);
return bind.getValue(ctx);
}
Enrique Medina wrote:
Hi,
Why not simply refer to the other bean using Dependency Injection
through the JSF Managed Bean mechanism?
For example,
<managed-bean>
<managed-bean-name>yourInitialBean</managed-bean-name>
<managed-bean-class>com.whatever.you.want.YourInitialBean</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
<managed-property>
<property-name>otherManagedBean</property-name>
<value>#{otherManagedBean}</value>
</managed-property>
</managed-bean>
Quique.
2005/6/16, Rogerio Pereira <[EMAIL PROTECTED]>:
Hi,
How can i change/access a managed property from any other managed bean.
Thanks for any answer.
Rogério