2 Replies Latest reply on Aug 18, 2008 12:34 PM by Senthil Chidambaram

    <a4j:support> rerendering a component

    Senthil Chidambaram Newbie

      I've a select option Menu, and based on the selection in the list I would like to decide whether to render a text field based on the selection. Ajax call is being made, but the input=text field is being displayed all the time no matter what my selection is in the dropdown list. Any help is appreciated. Here the code snippet.

      <h:selectOneMenu value="#{bean.selectedItem}" >
      <f:selectItem itemLabel="canon" itemValue="canon" />
      <f:selectItem itemLabel="olympus" itemValue="olympus"/>
      <f:selectItem itemLabel="nikon" itemValue="nikon" />
      <f:selectItem itemLabel="none" itemValue="none" />
      <a4j:support event="onchange" reRender="selectText" />

      <h:inputText id="selectText" rendered="#{bean.selectedItem == 'nikon'}" value="#{bean.selectedItem == 'nikon'}"

      In the above inputText I can see the value being updated correctly every time I change the select option, but rendered attribute doesn't have any effect. I appreciate your help.