7 Replies Latest reply on Apr 10, 2008 6:33 AM by Ilya Shaikovsky

    Help with customizing rich:orderingList

    Bradley Smith Master

      I'm trying to use the ordering list component - but not to order its items. Instead, I simply want the display layout of the ordering list, a vertical list of items with custom rendering of the items, and I want to replace the ordering buttons with 2 buttons: One button, search, will popup a modal panel that I use for searching and selection of items, the other other button, will remove the currently selected item from the list. Maybe there is a better richfaces widget choice, but this one seemed closest to what I want in terms of item rendering and layout of control with buttons.

      Anway, I am having trouble with customization of the buttons. Here is the code I am using to customize the buttons:

       <rich:orderingList value="#{saUsers}" var="saUser" listWidth="284" controlsType="button"
       controlsVerticalAlign="top" fastOrderControlsVisible="false" style="margin-top:1px;">
       <f:facet name="upControl">
       <evg:iconButton id="saSearchLink"
       title=" Search " styleClass="iconButton"
       onclick="return false;"
       iconSrc="./img/magnifying-glass.png" text=" Search "/>
       </f:facet>
       <f:facet name="downControl">
       <evg:iconButton id="saRemoveEntry"
       title=" Remove Selected " styleClass="iconButton"
       onclick="return false;"
       iconSrc="./img/delete-16x16.png" text=" Remove Selected "/>
      
       </f:facet>
       <f:facet name="upControlDisabled"><ui:remove>this hides the disabled upControl button</ui:remove></f:facet>
       <f:facet name="downControlDisabled"><ui:remove>this hides the disabled downControl button</ui:remove></f:facet>
       <rich:column>
       <h:outputText value="#{saUser.name} (#{saUser.userid})" rendered="#{!empty saUser.name}"/>
       </rich:column>
       </rich:orderingList>
      


      I've tried many permutations of the various orderingList button attributes, but the best I am able to do is to have my buttons show along with the disabled buttons for the control.

      1. - I don't want the disabled buttons to show, how do I hide them?

      Also, in firefox (haven't tried IE), the controlsVerticalAlign="top" is not making the buttons align along the top - they're still aligning vertically in the center.

      Help?
      Thanks,
      Brad Smith