1 Reply Latest reply on Jul 29, 2011 3:29 PM by Bruce Randall

    ListShuttle target reset

    Bruce Randall Newbie

      I have a listShuttle that I change based on an a4j:support. The sourceValue changes but the targetValue does not change even though I have created a new list on the server. Do I need to bind the listShuttle and do something with the targetSelection?

       

       

      {code}

      <h:selectOneMenu id="csaFltrSttSys"  styleClass="fieldInput"

               value="#{ChannelStatusManagedBean.selectedOwner}">

          <f:selectItems value="#{ChannelStatusManagedBean.ownerSelectList}"/>

          <a4j:support event="onchange" action="#{ChannelStatusManagedBean.ownerChanged}" immediate="false"

                   reRender="csaFltrSttGrd,csaFltrSttProv"/>

      </h:selectOneMenu>

       

       

      <rich:listShuttle id="csaFltrSttProv" listsHeight="150" listClass="fieldInput"

                sourceValue="#{ChannelStatusManagedBean.channelStatusQuery.selectedOwner.provisionStatusList}"

                sourceCaptionLabel="Available" sourceListWidth="110"

                targetValue="#{ChannelStatusManagedBean.channelStatusQuery.provisionStatusFilterList}"

                targetCaptionLabel="Filter By" targetListWidth="110"

                var="stt"

                orderControlsVisible="false" fastOrderControlsVisible="false"

                copyControlLabel="" copyAllControlLabel=""

                removeControlLabel="" removeAllControlLabel=""

                topControlLabel="" upControlLabel="" downControlLabel="" bottomControlLabel="">

          <rich:column>

          <h:outputLabel value="#{stt}"/>

          </rich:column>

      </rich:listShuttle>

       

      public String resetFilters() {
          provisionStatusFilterList = new ArrayList<String>();
      }

       

      {code}

        • 1. Re: ListShuttle target reset
          Bruce Randall Newbie

          Solution:

          Bind shuttle to managed bean, do not bind source and target value. Used shuttle.setSourceValue(List<Object>);    shuttle.setTargetValue(List<Object>);

          To reset everything used shuttle.setSubmittedStrings(new LinkedHashMap(), new HashSet(), new HashSet(), null); This is modifing UIListShuttle$SubmittedValueHolder