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

    Help with customizing rich:orderingList

      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

        • 1. Re: Help with customizing rich:orderingList
          ilya_shaikovsky

          just controlsType="none" ;)

          • 2. Re: Help with customizing rich:orderingList

            I tried that but then I really got controls-none - I 'll try again.

            • 3. Re: Help with customizing rich:orderingList

              Ok, I tried your suggestion but still don't see the custom controls. Here is the tag code I am using:

               <rich:orderingList value="#{saUsers}" var="saUser" listWidth="284" controlsType="none" style="margin-top:1px;">
               <f:facet name="topControl">
               <button>Button 1</button>
               </f:facet>
               <f:facet name="downControl">
               <button>Button 1</button>
               </f:facet>
               <rich:column>
               <h:outputText value="#{saUser.name} (#{saUser.userid})" rendered="#{!empty saUser.name}"/>
               </rich:column>
               </rich:orderingList>
              


              I even tried making the facet content render from h:outputText - no success.

              Any other suggestions?

              Thanks,
              Brad Smith


              • 4. Re: Help with customizing rich:orderingList

                hello?

                "bsmithjj" wrote:
                Ok, I tried your suggestion but still don't see the custom controls. Here is the tag code I am using:

                 <rich:orderingList value="#{saUsers}" var="saUser" listWidth="284" controlsType="none" style="margin-top:1px;">
                 <f:facet name="topControl">
                 <button>Button 1</button>
                 </f:facet>
                 <f:facet name="downControl">
                 <button>Button 1</button>
                 </f:facet>
                 <rich:column>
                 <h:outputText value="#{saUser.name} (#{saUser.userid})" rendered="#{!empty saUser.name}"/>
                 </rich:column>
                 </rich:orderingList>
                


                I even tried making the facet content render from h:outputText - no success.

                Any other suggestions?

                Thanks,
                Brad Smith


                • 5. Re: Help with customizing rich:orderingList
                  ilya_shaikovsky

                  you understand wrong this attribute. It hides the controls at all including facets.. So just define your buttons outside the component

                  • 6. Re: Help with customizing rich:orderingList

                     

                    "ilya_shaikovsky" wrote:
                    you understand wrong this attribute. It hides the controls at all including facets.. So just define your buttons outside the component


                    How about adding controlsType="custom" in a future release so that we can customize the controls using more than just CSS?

                    Thanks,
                    Brad Smith

                    • 7. Re: Help with customizing rich:orderingList
                      ilya_shaikovsky

                      already in our roadmap. just search in jira and vote. ;)