4 Replies Latest reply on Jun 2, 2010 4:23 AM by Erman bas

    problem with <a4j:commanButton please help...

    Erman bas Newbie

      i have inputtext ,commandbutton   and h:selectManyListbox

      try to add text that enter the inputtext into selectManyListBox by pressing a4j:commandButton but i getting entering text empty

      its like

      <h:outputLabel value="#{msgs.kitapBaslik}" id="lblKitapBasliklari"/>
                              <h:inputText id="txtKitapBasliklari"   value="#{kitapEkle.txtKitapBasliklariStringVal}" />

                              <a4j:commandButton ajaxSingle="true"  value="add2List" id="btnKitapBaslikEkleA4J" action="#{kitapEkle.kitapBasligiEkle}"  reRender="gpKitapBasliklari"/>

       

                              <h:panelGroup id="gpKitapBasliklari" >
                                  <h:selectManyListbox id="ddlKitapBalsiklari" value="#{kitapEkle.konuBasliklariSecilenler}">
                                      <f:selectItems var="#{kitapEkle.txtKitapBasliklariStringVal}" value="#{kitapEkle.konuBasliklariMenu}"/>
                                  </h:selectManyListbox>
                              </h:panelGroup>

      i get txtKitapBasliklariStringVal with empty

       

      but if i do like this, its work

      this code block is  working well but  red one that shown above doesnt work  why??

       

                 <h:outputLabel value="#{msgs.kitapBaslik}" id="lblKitapBasliklari"/>
                              <h:inputText id="txtKitapBasliklari"   value="#{kitapEkle.txtKitapBasliklariStringVal}" >
                                  <a4j:support ajaxSingle="true" action="#{kitapEkle.kitapBasligiEkle}" event="onblur" reRender="gpKitapBasliklari" />
                              </h:inputText>

       

                              <h:panelGroup id="gpKitapBasliklari" >
                               <h:selectManyListbox id="ddlKitapBalsiklari" value="#{kitapEkle.konuBasliklariSecilenler}">
                                      <f:selectItems var="#{kitapEkle.txtKitapBasliklariStringVal}" value="#{kitapEkle.konuBasliklariMenu}"/>
                                  </h:selectManyListbox>
                              </h:panelGroup>