2 Replies Latest reply on Jun 18, 2008 9:39 AM by Nico Kruger

    listShuttle clicking on elements/buttons not working

    Nico Kruger Newbie

      Hi there,

      I'm sure I'm missing something here but I have some behaviour here I do not understand. Maybe someone can shed some light on it.

      I am using Facelets 1.1.14 together with Richfaces 3.2.0. Here is the code for the test page:

      <html xmlns:h="http://java.sun.com/jsf/html"
       <h:panelGrid columns="2" title="Administration">
       <rich:panel header="List of users" style="height: 100%" id="userList">
       <c:forEach var="user" items="#{adminBean.users}">
       User: <b>#{user.name}</b>
       <c:if test="#{adminBean.editUser.name != user.name}">
       <a4j:commandLink value="Edit" action="#{adminBean.editUser}"
       reRender="userList, testtesttest">
       <a4j:actionparam value="#{user.name}"
       assignTo="#{adminBean.editUser.name}" />
       <rich:listShuttle id="testtesttest"
       sourceValue="#{adminBean.stringsSource}" targetValue="#{adminBean.stringsTarget}"
       var="role" targetCaptionLabel="Dummy" sourceCaptionLabel="Dummy2"
       listHeight="200" >
       <h:outputText value="#{role}" />
      <a href="logout.jsp">Logout</a>

      The adminBean.stringsSource and stringsTarget properties simply wrap a list of strings that get initialised at startup. The editUser is simply a temporary object to be used during the editing process to keep the values entered by the user in a form that gets presented (omitted in this short example).

      Now what is supposed to happen is when the user clicks on one of the "edit" links next to a user, that user displays an "editing" form (here presented by simply dropping the edit link). whilst taking the edit form away from the previously editing user. This part is working fine.

      The weird behaviour comes in with the listShuttle component - during the first load, clicking on the elements in the lists or the buttons works perfectly. But after clicking one of the Edit links, it suddenly stops working. Yet, when you manually do a refresh after clicking one of the Edit links, everything works fine again.

      I am totally stumped on this one, I'm sure there's something I am missing. Can anyone help out? If I need to provide any more information, just shout.

      Thanks in advance