问题描述
我正在将RichFaces 3.1.6用于具有JSF 1.1的旧项目
I am using RichFaces 3.1.6 for an old project with JSF 1.1
3.1.6版本是否存在任何Richfaces主题?因为当我添加themes-3.3.3.Final.jar
我的应用程序无法运行,但是,如果我从类路径中删除了jar,则应用程序可以正常运行.
Are there any Richfaces themes exists for 3.1.6 version? Because when I addthemes-3.3.3.Final.jar
my application doesn't work, however if I remove the jar from my classpath, then application works fine.
我在JSF页面中有以下内容
I have the following in JSF page
<rich:dataTable width="100%"
id="dataemp" columnClasses="colClass"
value="#{test.beanValues}" var="emp">
<rich:column>
<f:facet name="header">Employee Number</f:facet>
<h:outputText value="#{emp.employeeNumber}" />
</rich:column>
<rich:column>
<f:facet name="header">Employee Name</f:facet>
<h:outputText value="#{emp.employeeName}" />
</rich:column>
<rich:column>
<f:facet name="header">HireDate</f:facet>
<h:outputText value="#{emp.hireDate}" />
</rich:column>
<rich:column>
<f:facet name="header">Mileage</f:facet>
<h:outputText value="#{emp.deptNo}" />
</rich:column>
</rich:dataTable>
运行页面时,我得到的输出没有表格边框或样式,我没有的web.xml
when run the page, I am getting output with no table border or style and web.xml I have
<context-param>
<param-name>org.richfaces.SKIN</param-name>
<param-value>DEFAULT</param-value>
</context-param>
不确定如何使用Richfaces添加样式类,
Not sure how to add style class with Richfaces,
屏幕截图
更新1
我设法解决了样式类问题,但仍然无法解决主题jar问题.
I have managed to resolve style class issue, but still cannot not able to resolve the theme jar issue.
修改后的JSF
<rich:dataTable value="#{test.beanValues}"
var="emp" rowClasses="row1, row2" id="empdet" rows="4"
columnClasses="50,100,100,100" onRowMouseOver="this.style.backgroundColor='#B5F3FB'"
onRowMouseOut="this.style.backgroundColor='#{a4jSkin.rowBackgroundColor}'"
width="350">
<f:facet name="header">
<rich:columnGroup>
<rich:column colspan="4">
<h:outputText value="List of Employees" />
</rich:column>
<rich:column breakBefore="true">
<h:outputText value="Employee #" />
</rich:column>
<rich:column>
<h:outputText value="Employee Name" />
</rich:column>
<rich:column>
<h:outputText value="Hire Date" />
</rich:column>
<rich:column>
<h:outputText value="Dept #" />
</rich:column>
</rich:columnGroup>
</f:facet>
<rich:column>
<f:facet name="header">
<h:outputText value=" "
title="Hack due to bug. Shuold be remoevd till release"></h:outputText>
</f:facet>
<h:outputText value="#{emp.employeeNumber}" />
</rich:column>
<rich:column>
<h:outputText value="#{emp.employeeName}" />
</rich:column>
<rich:column>
<h:outputText value="#{emp.hireDate}" />
</rich:column>
<rich:column>
<h:outputText value="#{emp.deptNo}" />
</rich:column>
</rich:dataTable>
<rich:datascroller align="left" for="empdet"
maxPages="20" />
屏幕截图.
推荐答案
我不认为3.3.3.Final.jar可以与Richfaces 3.1.6一起使用.实际上,3.1.6版本是最后一个与JSF 1.1兼容的RF版本.
I don't think 3.3.3.Final.jar will work with Richfaces 3.1.6. In fact, 3.1.6 version is the last RF version that is JSF 1.1 compatible.
但是,您可以使用已经使用的org.richfaces.SKIN
参数来更改外观(或覆盖外观以定义您的外观).可能的值位于richfaces-impl-3.1.6.GA/META-INF/skins下.
However, you can change the skin (or override it to define yours) usingorg.richfaces.SKIN
param that you already used. possible values are found under richfaces-impl-3.1.6.GA/META-INF/skins.
有关皮肤的使用和自定义,请参考以下链接: http://docs.jboss.org/richfaces/latest_4_X/Developer_Guide/en-US/html/chap-Developer_Guide-Skinning_and_theming_html_exam-Developer_kins_kins
Please refer to this link for skin usage and customization: http://docs.jboss.org/richfaces/latest_4_X/Developer_Guide/en-US/html/chap-Developer_Guide-Skinning_and_theming.html#exam-Developer_Guide-Skinning_and_theming-Using_a_base_skin
甚至据说它与RF4有关.我认为这适用于3.1.6
Even it's said that it is related to RF4. I think it's applicable to 3.1.6
希望这对您有所帮助
这篇关于Richfaces主题问题和datatable样式类问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!