I think you can also do something like the following in your
valueChangeListener method:

        private void setUserToComponents() {
                FacesContext context = FacesContext.getCurrentInstance();
                UIViewRoot view = context.getViewRoot();
                setInputTextValue(view, "userForm:userId", this.userid);
                setInputTextValue(view, "userForm:name", this.name);
                setInputTextValue(view, "userForm:initial", this.initial);
                setInputTextValue(view, "userForm:email", this.email);
                setInputTextValue(view, "userForm:division", this.division);
                setInputTextValue(view, "userForm:position", this.position);
        }

        private void setInputTextValue(UIViewRoot view, String componentId,
Object newValue) {
                HtmlInputText input = (HtmlInputText)
view.findComponent(componentId);
                input.setValue(newValue);
        }

Regards,
Yee


2005/10/31, Jeffrey Porter <[EMAIL PROTECTED]>:
>
>
>
> Not sure if it's possible, can someone comment.
>
> Can you register for events when a list is clicked on?
> i.e. onclick, or valueChangeListener so that other data on the page can be
> rendered depending on what list item is selected.
>
>
> I tried valueChangeListener, & onclick but with no success.
>
> Thanks
> Jeff
>
> <h:selectOneListbox id="pickCar" value="#{carBean.currentCar}">
>         <f:selectItems value="#{carBean.carList}" />
> </h:selectOneListbox>
>
>
>

Reply via email to