Primefaces 3.3 Spring Webflow 2.3.1未定义最终Primefaces 我对Primefaces和SWF都是新手。我已设置了sauch页面: 欢迎来到OTV_JSF_Spring_Hibernate_项目 内联
根据文档,它应该是可以的,但当我在任何AS(JBoss,WL)上运行它时,它会在JS中输出错误: 未定义基本面。生成的页面的开头如下所示:Primefaces 3.3 Spring Webflow 2.3.1未定义最终Primefaces 我对Primefaces和SWF都是新手。我已设置了sauch页面: 欢迎来到OTV_JSF_Spring_Hibernate_项目 内联,primefaces,spring-webflow-2,Primefaces,Spring Webflow 2,根据文档,它应该是可以的,但当我在任何AS(JBoss,WL)上运行它时,它会在JS中输出错误: 未定义基本面。生成的页面的开头如下所示: I am new to Primefaces and also to SWF. I have setup sauch page: <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://j
I am new to Primefaces and also to SWF. I have setup sauch page:
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:p="http://primefaces.org/ui">
<h:head>
<title>Welcome to OTV_JSF_Spring_Hibernate_Project</title>
</h:head>
<h:body>
<f:view>
<h:form>
<p:panel header="Keyboard Demo">
<h:panelGrid columns="2" cellpadding="5">
<h:outputText value="USERs : "/>
<p:inputText id="name" value="#{sampleBean.jmeno}"/>
<p:selectOneRadio id="customRadio">
<f:selectItem itemLabel="Option 1" itemValue="1"/>
<f:selectItem itemLabel="Option 2" itemValue="2"/>
<f:selectItem itemLabel="Option 3" itemValue="3"/>
</p:selectOneRadio>
<h:outputText value="Basic QWERTY: "/>
<p:keyboard value="#{sampleBean.zadavanaHodnota}" layout="qwertyBasic"/>
<h3>Inline</h3>
<p:calendar size="21" value="#{sampleBean.datum}" id="inlineCal" mode="popup"
showOn="focus"/>
<p:commandButton action="pokracuj" value="Prechod na druhou stranku"/>
<p:dataTable rendered="false"/>
</h:panelGrid>
</p:panel>
<p:dialog widgetVar="dialog" showEffect="fade" hideEffect="fade" header="Values">
<h:panelGrid columns="2" id="display" cellpadding="5">
<h:outputText value="Value2:"/>
<h:outputText value="#{sampleBean.zadavanaHodnota}"/>
</h:panelGrid>
</p:dialog>
</h:form>
</f:view>
<p:spinner/>
</h:body>
</html>
问题很明显-静态资源-未找到Primefaces.js和themes.js。我尝试过各种SWF配置,但没有成功。例如,我当前关于资源读取的配置如下:
<html xmlns="http://www.w3.org/1999/xhtml"><head><link type="text/css" rel="stylesheet" href="/blank-web-1.0.0-SNAPSHOT/*/javax.faces.resource/theme.css?ln=primefaces-ui-lightness" /><link type="text/css" rel="stylesheet" href="/blank-web-1.0.0-SNAPSHOT/*/javax.faces.resource/primefaces.css?ln=primefaces" /><link type="text/css" rel="stylesheet" href="/blank-web-1.0.0-SNAPSHOT/*/javax.faces.resource/keyboard/keyboard.css?ln=primefaces" /><script type="text/javascript" src="/blank-web-1.0.0-SNAPSHOT/*/javax.faces.resource/jquery/jquery.js?ln=primefaces"></script><script type="text/javascript" src="/blank-web-1.0.0-SNAPSHOT/*/javax.faces.resource/primefaces.js?ln=primefaces"></script><script type="text/javascript" src="/blank-web-1.0.0-SNAPSHOT/*/javax.faces.resource/keyboard/keyboard.js?ln=primefaces"></script>
我也尝试了资源servlet,但它也不起作用。
资源servlet
org.springframework.js.resource.ResourceServlet
1.
资源servlet
/资源/*/
谢谢您的帮助。不带mvc:resources标签试试看。还要确保Primefaces JAR已部署到您的服务器。网页的其余部分是否正确呈现?(仅限有效的HTML标记,无
h:
或p:
stuff。)遵循此链接,您的问题将得到解决。。。。
<faces:resources />
<!--<mvc:resources location="/, classpath:/META-INF/resources/, classpath:/META-INF/" order="1" mapping="/resources/**" />-->
<mvc:resources mapping="/javax.faces.resource/**" location="/, classpath:/META-INF/resources/" />