Vista Combinata Vista Piatta Vista ad Albero
Discussioni [ Precedente | Successivo ]
toggle
lucas theisen
What could cause UIViewRoot to be null?
5 dicembre 2011 10.29
Risposta

lucas theisen

Punteggio: New Member

Messaggi: 16

Data di Iscrizione: 1 marzo 2011

Messaggi recenti

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 dicembre 2011 22.02
Risposta

PortletFaces Community Member

Punteggio: Regular Member

Messaggi: 201

Data di Iscrizione: 2 aprile 2012

Messaggi recenti

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