Foren

What could cause UIViewRoot to be null?

thumbnail
lucas theisen, geändert vor 12 Jahren.

What could cause UIViewRoot to be null?

New Member Beiträge: 19 Beitrittsdatum: 02.03.11 Neueste Beiträge
Hi,

I have a simple conditionally rendered
h:panelGroup
which looks like this:

 
       <h:panelgroup id="xmlValidationResults" styleclass="tp-form-action-results" rendered="#{configuration.xmlValidationResult != null}">
</h:panelgroup>


Which works, but i need to add more logic. If i change it to this:

 
        <h:panelgroup id="xmlValidationResults" styleclass="tp-form-action-results" rendered="#{configuration.xmlValidationResult != null &amp;&amp; true}">
</h:panelgroup>


Just adding
&amp;&amp; true
to the condition which should not effect anything causes this exception:

 
18:27:26,741 ERROR [LiferayLocalePhaseListener:61] viewRoot is null!
18:27:26,746 ERROR [render_portlet_jsp:154] java.lang.NullPointerException
	at BridgeImpl.java.indicateNamespacingToConsumers(BridgeImpl.java:605)
	at BridgeImpl.java.doFacesRequest(BridgeImpl.java:437)
	at org.portletfaces.bridge.GenericFacesPortlet.doEdit(GenericFacesPortlet.java:138)
	at javax.portlet.GenericPortlet.doDispatch(GenericPortlet.java:330)
	at javax.portlet.GenericPortlet.render(GenericPortlet.java:233)
	at com.liferay.portlet.FilterChainImpl.doFilter(FilterChainImpl.java:100)
	at com.liferay.portal.kernel.portlet.PortletFilterUtil.doFilter(PortletFilterUtil.java:64)
	at com.liferay.portal.kernel.servlet.PortletServlet.service(PortletServlet.java:93)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:72)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:75)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646)
	at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:551)
	at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:488)
	at com.liferay.portlet.InvokerPortletImpl.invoke(InvokerPortletImpl.java:639)
	at com.liferay.portlet.InvokerPortletImpl.invokeRender(InvokerPortletImpl.java:726)


Any ideas?
PortletFaces Community Member, geändert vor 12 Jahren.

RE: What could cause UIViewRoot to be null?

Regular Member Beiträge: 199 Beitrittsdatum: 03.04.12 Neueste Beiträge
Hi Lucas,

the rendered tag is not accepting logic operator &&(loagical and) but it is accepting ||(logical or)

This is the problem to solve this you can replace '&&' with 'and'

I think this may solve this problem

The other important thing is that any syntax error in the page like not closing any tags may lead to view root null!!

Regards
Phani