Kombinierte Ansicht Flache Ansicht Baumansicht
Threads [ Zurück | Nächste ]
toggle
lucas theisen
What could cause UIViewRoot to be null?
5. Dezember 2011 10:29
Antwort

lucas theisen

Rang: New Member

Nachrichten: 19

Eintrittsdatum: 1. März 2011

Neue Beiträge

Hi,

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

1
2       <h:panelGroup id="xmlValidationResults"
3          styleClass="tp-form-action-results"
4          rendered="#{configuration.xmlValidationResult != null}">


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

1
2        <h:panelGroup id="xmlValidationResults"
3          styleClass="tp-form-action-results"
4          rendered="#{configuration.xmlValidationResult != null && true}">


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

 1
 218:27:26,741 ERROR [LiferayLocalePhaseListener:61] viewRoot is null!
 318:27:26,746 ERROR [render_portlet_jsp:154] java.lang.NullPointerException
 4    at BridgeImpl.java.indicateNamespacingToConsumers(BridgeImpl.java:605)
 5    at BridgeImpl.java.doFacesRequest(BridgeImpl.java:437)
 6    at org.portletfaces.bridge.GenericFacesPortlet.doEdit(GenericFacesPortlet.java:138)
 7    at javax.portlet.GenericPortlet.doDispatch(GenericPortlet.java:330)
 8    at javax.portlet.GenericPortlet.render(GenericPortlet.java:233)
 9    at com.liferay.portlet.FilterChainImpl.doFilter(FilterChainImpl.java:100)
10    at com.liferay.portal.kernel.portlet.PortletFilterUtil.doFilter(PortletFilterUtil.java:64)
11    at com.liferay.portal.kernel.servlet.PortletServlet.service(PortletServlet.java:93)
12    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
13    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
14    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
15    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:72)
16    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:75)
17    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
18    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
19    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646)
20    at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:551)
21    at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:488)
22    at com.liferay.portlet.InvokerPortletImpl.invoke(InvokerPortletImpl.java:639)
23    at com.liferay.portlet.InvokerPortletImpl.invokeRender(InvokerPortletImpl.java:726)


Any ideas?
PortletFaces Community Member
RE: What could cause UIViewRoot to be null?
12. Dezember 2011 22:02
Antwort

PortletFaces Community Member

Rang: Regular Member

Nachrichten: 201

Eintrittsdatum: 2. April 2012

Neue 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