Primefaces context.getViewRoot().getComponentResources(context,“head”);抛出null指针,因为getViewRoot()返回null
我想在Primefaces context.getViewRoot().getComponentResources(context,“head”);抛出null指针,因为getViewRoot()返回null,primefaces,Primefaces,我想在内使用?看了PF问题列表?与主题无关:不要使用prependId=“false”我删除了prependId,但仍然不起作用。。我的pf版本是6.0那句话是“离题”我真的不明白你说的“离题”是什么意思 <h:form prependId="false" id="date-form"> <p:inputText id="date" styleClass="form-control">
内使用
?看了PF问题列表?与主题无关:不要使用prependId=“false”
我删除了prependId
,但仍然不起作用。。我的pf版本是6.0那句话是“离题”我真的不明白你说的“离题”是什么意思
<h:form prependId="false" id="date-form">
<p:inputText id="date" styleClass="form-control">
<p:ajax listener="#{dashboardBean.dateChanged()}" event="change" />
</p:inputText>
</h:form>
SCHWERWIEGEND: Servlet.service() for servlet [Faces Servlet] in context with path [/MyApp] threw exception [null] with root cause
java.lang.NullPointerException
at org.primefaces.util.ResourceUtils.getComponentResources(ResourceUtils.java:66)
at org.primefaces.context.PrimePartialResponseWriter.startMetadataIfNecessary(PrimePartialResponseWriter.java:280)
at org.primefaces.context.PrimePartialResponseWriter.startError(PrimePartialResponseWriter.java:107)
at com.sun.faces.context.AjaxExceptionHandlerImpl.handlePartialResponseError(AjaxExceptionHandlerImpl.java:203)
at com.sun.faces.context.AjaxExceptionHandlerImpl.handle(AjaxExceptionHandlerImpl.java:127)