3 Replies Latest reply on Sep 1, 2015 3:14 AM by gurusathish

    pickList in richfaces 4

    ramilevi22

      Hi,

      Can u please explain how to change the below code from richfaces 3.3 to richfaces 4? my main issue is how to change: <a4j:support event="onlistchanged" reRender="result"/> in richfaces 4, as a4j:support is replaced by a4j:ajax but onlistchanged event is not supported by a4j:ajax.

       

      <ui:composition xmlns="http://www.w3.org/1999/xhtml"

            xmlns:ui="http://java.sun.com/jsf/facelets"

            xmlns:h="http://java.sun.com/jsf/html"

            xmlns:f="http://java.sun.com/jsf/core"

            xmlns:a4j="http://richfaces.org/a4j"

            xmlns:rich="http://richfaces.org/rich">

          <style>

              .top{

                  vertical-align:top;

              }

              .pbody{

                  padding:0px;

                  height:120px;

                  width:150px;

                  overflow:auto;

              }

          </style>

          <h:form>

          <h:panelGrid columns="2" columnClasses="top, top">

             

              <rich:pickList value="#{pickListBean.result}">

                  <f:selectItems value="#{capitalsBean.capitalsOptions}"/>

                  <a4j:support event="onlistchanged" reRender="result"/>

              </rich:pickList>

             

              <rich:panel id="result" bodyClass="pbody">

                  <f:facet name="header">

                      <h:outputText value="#{pickListBean.items} Options Choosen"></h:outputText>

                  </f:facet>

                  <rich:dataList value="#{pickListBean.result}" var="pickList" rendered="#{pickListBean.items>0}">

                          <h:outputText value="#{pickList}"/>

                  </rich:dataList>

              </rich:panel>

          </h:panelGrid>

          </h:form>

      </ui:composition>