2010-08-24 50 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> 
相关问题