0 Replies Latest reply on May 24, 2007 5:10 AM by Miloslav Vlach

    Radiobutton and AJAX

    Miloslav Vlach Novice

      Hi all,

      I have problem with this scenario:

      I would like to have an form with some input text fields. On the form will be an group of radiobuttons which control the form. When I clicked on the first radiobutton, some imput texts disappears and some appears. I can do that with ajax4jsf - no problem. But problem is when some field are required. When the field is required the ajax request is called but response is not applied.

      I am trying to call immediate="true" but it doesn't work, singleRequest="true" ......

      Can somebody help me ?

      Thanks Mila

      <s:decorate template="/editspan.xhtml">
       <ui:define name="label">Typ:</ui:define>
       <h:selectOneRadio value="#{communicationAddAction.type}">
       <f:selectItem itemValue="1" itemLabel="phone" />
       <f:selectItem itemValue="2" itemLabel="email" />
       <f:selectItem itemValue="3" itemLabel="person" />
       <a:support action="#{communicationAddAction.changeType}" event="onchange" reRender="method" singleRequest="true" ajaxRendered="true"/>
      <a:outputPanel id="method">
      <s:fragment rendered="#{communicationAddAction.showEmailContact}">
       <s:decorate template="/editspan.xhtml">
       <ui:define name="label">E-mail:</ui:define>
       <h:inputText value="#{communication.personEmail}" required="true"></h:inputText>