Search code examples
javascripthtmlcsscss-selectorsrichfaces

How to override the default image loaded by a facet of orderingList richfaces component


I'm trying to change the image loaded by default in the facets of orderingList richfaces component. The default image is being loaded from DATB folder so i'm trying to override the loading and make from a local folder in my project.

enter image description here

So, i'm trying to override the image used for first button and use mine instead.

For example, the generated img tag for topControlDisabled facet is :

<img style="margin:0px;padding:0px;border:0px;" width="15" height="15"
     border="0" alt="topControlDisabled" src="/XXXX/faces/a4j_3_1_6.SR1org.richfaces.renderkit.html.images.OrderingListIconTopDisabled/DATB/eAE7Pynr9d75nz59BgAgIgbq">

How i can override the src attribute to make the facet use my image link ?


Solution

  • You can customize the controls, e.g.

    <rich:orderingList … >
        <f:facet name="topControl">
            <!-- your code here -->
        </f:facet>
        …
    

    This will replace the "First" button, the other facet names are upControl, downControl and bottomControl. See the docs.