5 Replies Latest reply on Feb 27, 2008 12:31 PM by Guillaume Jeudy

    Is it possible to add a commandButton per row inside a listS

    Guillaume Jeudy Master

      Is it possible to add a commandButton per row inside a listShuttle ?

      For example:

      <rich:listShuttle id="childdomrefshuttle"
      targetCaptionLabel="Related Ref Domain Instances"
      sourceCaptionLabel="Unrelated Ref Domain Instances"
      fastOrderControlsVisible="false" orderControlsVisible="false"
      listsHeight="300px" sourceListWidth="200px" targetListWidth="200px"
      <f:facet name="header">
      <h:outputText value="Domain Instance Name" />
      <h:outputText value="#{refDomainInstance.description}" />
      <f:facet name="header">
      <h:outputText value="Action" />

      <h:commandButton type="submit" value="Edit attributes"
      action="#{domRelateInstancesAction.edit(refDomainInstance)}" />

      I tried the above example but when I click the button on the row nothing happens, the action is not bound to the button. By looking at the HTML source I do see that no javascript event listeners are bound to the buttons.

      As I understand, today its only possible to achieve this using a h:dataTable and/or perhaps a rich:dataTable.

      It would be great if I had this feature in listShuttle which lets me manage a N-N relationship in addition to drill a given item to manage attributes on it.

      Can anyone share in their experience? What is a best fit to implement a clickable(button to action on each row) data list ?