Search code examples
cssrichfaces

How to use Richfaces skinning on standard table?


From my understanding at the Richfaces demo page and docs, I should be able to skin standard HTML elements.

This feature provides styling for standard HTML form elements in order to be highly compilant with RichFaces common look'n'feel.

I may be a little burnt out with RF today, but I don't see how to get skinning on regular elements. For example if I wanted a hand made table to match the fancy Richfaces tables I would have thought something like this would work:

<table class="rich-table">
        <tr class="rich-tr">
        <a4j:repeat value="#{myBean.elements}" var="e">
            <th class="rich-th" >
                                   <h:outputText value="#{e.text}" />
                            </th>
                    </a4j:repeat>
            </tr>
    </table>

Other elements I've tried to skin haven't been working either, so I feel I am going at this the wrong way. The ultimate goal is to have standard HTML elements blend in and still allow the skins to be swapped from say blueSky to emeraldGreen w/o changing specific elements.


Solution

  • Try this. Add this context parameter: org.richfaces.CONTROL_SKINNING to web.xml and set it to 'enable'. I'm not 100% sure it will skin a table tag. If not, you can use #{richSkin.any_param_name} to skin the table manually.