Thanks for your quick reponse. I have tried it. It didn't work for me. It
should. I must have done something wrong. For example,

      public MyBean {
          private boolean rendered = true;

          public void setRendered(boolean r) { ...}
          public boolean getRendered() {}

          public void selectionChanged (ValueChangeEvent event) {
                setRendered (false);
          }
      }

then I did
      <h:inputText id="one" value= "abcdefg" rendered="#{myBean.rendered
}"/>

When the  <h:selectOneMenu ../> changes the value, I have set the render to
be false. But it is always showing. I would like it to not showing when
change the selection. Anything wrong?

The rendered attribute and ValueChangeEvent only come into play when the form is submitted - they operate entirely on the server.

These pages might help you out:

http://wiki.apache.org/myfaces/SubmitPageOnValueChange
http://wiki.apache.org/myfaces/How_The_Immediate_Attribute_Works

Jeremy

Reply via email to