On Tue, 2006-01-03 at 14:11 -0800, Saumil Mehta wrote:
> Hello,
>
>
>
> I am wondering if we can use JSF localization when generating tree2
> type components from a backing bean. For example, I can use EL as
> follows when I have a NavigationMenuItem.
>
>
>
> navMenuItem.setActionListener(“#{someBean.someMethod}”) [I know the
> tree isnt constructed using NavigationMenuItem, but this is an
> example]
>
>
>
> Could I do localization using something similar?
You should be able to do:
Application application = facesContext.getApplication();
ValueBinding vb =
application.createValueBinding(
"#{bundle.pageName}");
navMenuItem.setValueBinding("value", vb);
The component will then execute that expression during the rendering
phase.
Regards,
Simon