Take a look at Craig's excellent suggestion from a shale discussion a while back ...
http://www.mail-archive.com/[email protected]/msg10676.html Also, you can find coverage on this topic in Core JSF. sean On 9/8/05, Mike Kienenberger <[EMAIL PROTECTED]> wrote: > Another alternative is you can use the "binding" attribute to set a > reference to the component on your backing bean. > > Ie, > > private UIInput pincomponent; > public setPincomponent(UIInput input) { this.pincomponent=input } > > and > > <h:inputSecret binding="#{LoginBackingBean.pincomponent}" ... > > This has the benefit of not requiring hardcoded references to your > password field in your code, but the downside is that you can only > bind each component to one backing bean. > > -Mike > > > On 9/8/05, Christian <[EMAIL PROTECTED]> wrote: > > Yep, thanks a lot Volker :-) > > > > Here is my code, component id is "PIN": > > > > UIInput pincomponent = (UIInput)input.findComponent("PIN"); > > > > pin = (String)pincomponent.getSubmittedValue(); > > > > > > Volker Weber wrote: > > | Hi, > > | > > | what you need is the *other* UIComponent! > > | > > | You can find this component via the findComponent() method. > > | > > | public void validateLoginData( > > | FacesContext context, UIComponent username, Object value) { > > | uiPassword = username.findComponent('passwordFildId'); > > | > > | ... > > | } > > | > > | Of cause you need to know the Id of your password field. > > | > > | Bye > > | > > | > > | Christian wrote: > > || > > || What I need to do is to retrieve the entered input of the the *other* > > || field (password) within the component tree. The following code does > > || not work, as the password-Attribute of LoginBackingBean is still > > || empty. > > > > > > >

