0
對於我的webapp,我試圖介紹richface皮膚。 我收到了一個讓我無法理解的錯誤。Richfaces 4.0皮膚問題
老情況(工作):
messages.css
#inhoud #infoblock {
min-height:36px;
width:100%;
background:#B1D1FA url(#{resource['image/helpmelding.gif']});
padding:2px 0;
background-position: 3px center;
}
新的情況(不正常)
messages.ecss
#inhoud #infoblock {
background-color:'#{richSkin.infoBlockBackground}';
padding:2px 0;
background-image:url(#{resource['image/helpmelding.gif']});
background-position: 3px center;
background-repeat:no-repeat;
min-height:36px;
width:100%;
}
結果:
*#inhoud *#infoblock {
background-color: #B1D1FA;
padding:2px 0;
}
擊中
#{資源[ '圖像/ helpmelding.gif']}當停止CSS解析
記錄儀:
WARNING: Problem parsing 'messages.ecss' resource: Error in expression.
Invalid token "#". Was expecting one of: <S>, "+", "-", <HASH>, <STRING>, <URI>, "inherit", <EMS>, <EXS>, <LENGTH_PX>, <LENGTH_CM>, <LENGTH_MM>, <LENGTH_IN>,
<LENGTH_PT>, <LENGTH_PC>, <ANGLE_DEG>, <ANGLE_RAD>, <ANGLE_GRAD>, <TIME_MS>, <TIME_S>, <FREQ_HZ>, <FREQ_KHZ>, <DIMEN>,
<PERCENTAGE>, <NUMBER>, "rgb(", <FUNCTION>, <IDENT>, <UNICODERANGE>.
mei 06, 2014 2:25:42 PM org.richfaces.resource.CompiledCSSResource$ErrorHandlerImpl logException
設置
web.xml中
<!-- Resource Servlet van Richfaces-->
<servlet>
<servlet-name>Resource Servlet</servlet-name>
<servlet-class>org.richfaces.webapp.ResourceServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Resource Servlet</servlet-name>
<url-pattern>/org.richfaces.resources/*</url-pattern>
</servlet-mapping>
的pom.xml
<plugin>
<groupId>org.richfaces.cdk</groupId>
<artifactId>maven-richfaces-resources-plugin</artifactId>
<version>${org.richfaces.bom.version}</version>
<configuration>
<skins>
<!-- the name of your skin -->
<skin>LUID</skin>
</skins>
<excludedFiles>
<exclude>^\Qorg.richfaces.renderkit.html.images.\E.*</exclude>
<exclude>^\Qorg.richfaces.renderkit.html.iconimages.\E.*</exclude>
<exclude>^\Qorg.richfaces.renderkit.html.iconimages.\E.*</exclude>
</excludedFiles>
<includedContentTypes>
<include>application/javascript</include>
<include>text/css</include>
<include>image/.+</include>
</includedContentTypes>
<fileNameMappings>
<property>
<name>^.*showcase.*/([^/]+\.css)$</name>
<value>org.richfaces.luid.css/$1</value>
</property>
<property>
<name>^.+/([^/]+\.(png|gif|jpg))$</name>
<value>org.richfaces.images/$1</value>
</property>
<property>
<name>^.+/([^/]+\.css)$</name>
<value>org.richfaces.css/$1</value>
</property>
</fileNameMappings>
</configuration>
....
</plugin>
再一次感嘆,錯誤比我想象的更容易。謝謝Makhiel –