6 Replies Latest reply on Aug 25, 2010 4:40 AM by wesser

    listShuttle -> oncopyclick -> properties to bean

    wesser

      First my usecase: when an item is moved from source to target in listShuttle another item should be moved back (if it is in target list) due to an indicator in the connected object.

       

      my Problem: I want to manipulate the lists in the backend Bean but I need the manipulated Items when clicking the copy button of the listShuffle

       

      What i found: https://jira.jboss.org/browse/RF-1540 : there is a possibility to get the selections from the oncopyclick event

       

      my code:

       

      xhtml:

       

      <rich:listShuttle orderControlsVisible="false" fastOrderControlsVisible="false"
                                              targetListWidth="250" sourceListWidth="250"
                                              sourceValue="#{licence.availableRights}"
                                              targetValue="#{licence.usedRights}"
                                              var="item">                       
                                              <rich:column>
                                                  <h:outputText value="#{item}"></h:outputText>
                                              </rich:column>
                                              <a4j:support event="oncopyclick" actionListener="#{UserprovisioningAction.onRightMoved}"/>
                                          </rich:listShuttle>

       

      bean (seam component in my case):

       

      public void onRightMoved(ActionEvent event) {
              log.info("onRightMoved(event)");
      }

       

      I think in this case the event does not contain the selected items. Is that right?

       

      But I do not know how to get the event to my bean if I directly use the oncopyclick property of listShuttle.

       

      Note: I didn´t want to write a Converter so i do the connection between my shuttle lists an the objects in my bean. but this shouldn´t be a problem.

       

      Are there any suggestions to solve this problem? I would be very very happy