1 Reply Latest reply on Jun 3, 2013 12:09 AM by Siva P

    Jsf richfaces ajax selectoneitem clears validation after changing value.

    Antonis Katsikadamos Newbie

      Hello. I have the following code

       

              <h:selectOneMenu id="kkk" value="#{topologyBean.country}">

                          <f:selectItem itemValue="" itemLabel="" />

                          <f:selectItems value="#{topologyBean.countryList}" var="country"

                              itemValue="#{country.countryLabel}"

                              itemLabel="#{country.countryValue}" />

                          <a4j:ajax listener="#{topologyBean.changeCountry}" render="momo" />

      <rich:validator/>

                      </h:selectOneMenu>

                   

                      <a4j:outputPanel id="momo">

                          <h:outputLabel value="" for="cities" />

                          <h:selectOneMenu id="cities" value="#{topologyBean.city}" rendered="#{topologyBean.cities ne null}">

                              <f:selectItems value="#{topologyBean.cities}" var="cityname"

                                  itemValue="#{cityname.citiesLabel}" />

      <rich:validator/>                   

                          </h:selectOneMenu>

      </a4j:outputPanel>

       

       

      and i have jsr303 validation NotNull.

       

       

      1) At the beginning i have only the first list and i press the submit button. I get for the second list ' value cannot be null '

      2) When i change the value from the first list then the validation message from the second list disappears. As if i have not submitted the form. How can i make the validation in the second list remain even if i change the value in the fitrst list

       

       

      thank you a lot

       

      Antonios