Je veux afficher une icône en background dans un composant commandLink. Dans une classe CSS, j'ai ajouté un attribut background avec la propriété url de la propriété mais elle n'est jamais afficher. Je pense que c'est à cause de la classe iceCmdLnk ajouter par ICEfaces qui définit un background none. Comment je peux surcharger la classe de iceCmdLnk avec la mienne ?

fichier xhtml :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
  <?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:ui="http://java.sun.com/jsf/facelets">
<body>
    <ui:composition>
        <ice:form id="buttonsForm" xmlns:h="http://java.sun.com/jsf/html"
            xmlns:f="http://java.sun.com/jsf/core"
            xmlns:ice="http://www.icesoft.com/icefaces/component"
            xmlns:ace="http://www.icefaces.org/icefaces/components"
            xmlns:c="http://java.sun.com/jstl/core"
            xmlns:ui="http://java.sun.com/jsf/facelets"> 
            <div class="menu">
                <ul class="mainMenu">
                    <li class="home"><ice:commandLink styleClass="" value="#{msg['home']}"
                        action="#{navigationBean.home}" /></li>
                    <li class="activity"><ice:commandLink
                        value="#{msg['activity']}"
                        action="#{navigationBean.activity}" /></li>
                    <li class="hour"><ice:commandLink value="#{msg['differences']}"
                        action="#{navigationBean.hour}" /></li>
                    <li class="comment"><ice:commandLink value="#{msg['comments']}"
                        action="#{navigationBean.comment}" /></li>
                    <li class="specific"><ice:commandLink
                        value="#{msg['characteristics']}"
                        action="#{navigationBean.char}" /></li>
                </ul>
            </div>
        </ice:form>
    </ui:composition>
</body>
</html>
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.menu
    {
        position: absolute;
        top:85px;
        left: 15%;
        margin-left:0px;
    }
    .menu ul
    {
        list-style-type: none;
        font-size:16px;
    }
    .menu ul.mainMenu
    {
        height: 60px;
    }
    .menu ul.mainMenu li
    {
        float: left;
        height: 34px;
    }
 
    .menu ul.mainMenu li.home a
{
    background:url(resources/images/menu/Icone1.png) no-repeat 0 4px transparent; 
    color:#e95a0b;
}
 
    .menu ul.mainMenu li a
    {
        background:url(resources/images/menu/Icone2.png) no-repeat 0 4px transparent;
        height:34px;
        width:100px;
        padding-left:50px;
        padding-right:30px;
        padding-top:25px;
        line-height:0px;
        display:inline-block;
        margin-left:0px;
        color:#3c2313;
    }
 
    .menu ul.mainMenu li.activity a
    {
        background:url(resources/images/menu/Icone3.png) no-repeat 0 4px transparent; 
    }
    .menu ul.mainMenu li.hour a
    {
        background:url(resources/images/menu/Icone4.png) no-repeat 0 4px transparent; 
    }
    .menu ul.mainMenu li.comment a
    {
        background:url(resources/images/menu/Icone5.png) no-repeat 0 4px transparent; 
    }
    .menu ul.mainMenu li.specific a
    {
        background:url(resources/images/menu/Icone6.png) no-repeat 0 4px transparent; 
    }