2010-08-24 48 views
0

我試圖通過Plug'n'Skin功能構建自定義richfaces皮膚。我已經用maven構建了這個項目。 (就像它在參考指南中提到的那樣)Richfaces Plug'n'Skin - 如何提供圖像?

我試過使用xcss這個沒有提供給我的應用程序 - 一切都看起來像默認。所以我切換回正常的CSS在我的tab-panel.xcss。這工作:樣式適用,但我不能解決的一個問題:

如何提供圖像到我的css類?的

比如我tab-panel.css

<?xml version="1.0" encoding="UTF-8"?> 
<f:template xmlns:f="http://jsf.exadel.com/template" 
xmlns:u="http://jsf.exadel.com/template/util" 
xmlns="http://www.w3.org/1999/xhtml"> 
<f:verbatim> 
<![CDATA[ 
    .rich-tab-active { 
     background-image:url(register_active_bg.png); 
     background-repeat:repeat-x; 
     font-weight:bold; 
     color:#000000; 
     border-top:1px solid #c8c8c8; 
    } 
    .rich-tab-bottom-line { 
    } 
    .rich-tab-disabled, .rich-tab-inactive { 
     background-image:url(register_bg.png); 
     background-repeat:repeat-x; 
     color:#969696; 
    } 
    .rich-tab-header { 
     width:160px; 
     height:45px; 
     line-height:43px; 
     font-size:12px; 
     text-transform:uppercase; 
     text-align:center; 
    } 
    .rich-tabhdr-cell-active { 
    } 
    .rich-tabhdr-cell-disabled { 
    } 
    .rich-tabhdr-cell-inactive { 
    } 
    .rich-tabhdr-side-border { 
    } 
    .rich-tabhdr-side-cell { 
    } 
    .rich-tabpanel { 
     width:818px; 
    } 
    .rich-tabpanel-content { 
    } 
    .rich-tabpanel-content-position { 
    } 
]]> 
</f:verbatim> 
</f:template> 

我試着在我resource-config.xml

<?xml version="1.0" encoding="UTF-8"?> 
<resource-config> 
    <resource> 
     <name>register_bg.png</name> 
     <path>de/bc/richfaces/images/register_bg.png</path> 
    </resource> 
    <resource> 
     <name>register_active_bg.png</name> 
     <path>de/bc/richfaces/images/register_bg.png</path> 
    </resource> 
</resource-config> 

回答

0

對圖像進行登記與它的工作對我來說就像我的問題baseskin重建皮膚項目後,爲了更加清晰,我再次在此發佈它

<?xml version="1.0" encoding="UTF-8"?> 
<resource-config> 
    <resource> 
     <name>register_bg.png</name> 
     <path>de/bc/richfaces/images/register_bg.png</path> 
    </resource> 
    <resource> 
     <name>register_active_bg.png</name> 
     <path>de/bc/richfaces/images/register_bg.png</path> 
    </resource> 
</resource-config> 
相關問題