I recommend referencing all of those bean names in static finals ... probably would have refactoring problems otherwise.
---- Original message ---- >Date: Tue, 15 Nov 2005 14:51:00 -0500 >From: Sean Schofield <[EMAIL PROTECTED]> >Subject: Re: value through beans >To: MyFaces Discussion <[email protected]> > >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 Dennis Byrne

