On 11/15/05, Airton (Terra) <[EMAIL PROTECTED]> wrote:
> Thank you all !
>
> I've got success this way too:
>
> FacesContext fc = FacesContext.getCurrentInstance();
> ValueBinding vb = fc.getApplication().createValueBinding("#{loginBean.name}");
> name = (String) vb.getValue(fc);
>
> Pros? Cons?
I use this approach. If you are using Shale View Controller there are
some handy methods that allow you to reduce this to just one line:
String name = (String)getValue("#{loginBean.name}");
If you are not using Shale ... you should check it out. The next
thing you will want is a way to automatically initialize the beans
before your components use them and that's one of many ways where
Shale can help you.
> Regards,
> Airton
sean