myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Luka Surija <l...@iytim.hr>
Subject Re: [Trinidad] NPE on returnFromDialog
Date Fri, 20 May 2011 16:43:20 GMT
OK. I've found out where is the bug.

NPE was my fault.
But there is a bug in Trinidad opening a dialog with this scenario:

<tr:commandNavigationItem partialSubmit="true" useWindow="true" 
action="dialog:myProfile" /> doesn't work. Without partialSubmit works.

<tr:tr:commandLink partialSubmit="true" useWindow="true" 
action="dialog:myProfile" /> works as expected.


More analysis in chrome dev tools shows that partialSubmit="true" by 
commandNavigationitem sends some answer back to the browser but I'm 
pretty sure it's a wrong response. It sends some partial updates for 
components that have partialTrigger on this component but no code for 
IFrame.

I hope it helps to narrow this problem.

Luka Surija



On 05/05/2011 10:35 AM, Luka Surija wrote:
> Any hint?
>
> Should I blame Mojarra or Trinidad?
> With which version of Mojarra you tested Trinidad?
>
> Regards,
>
> Luka Surija
>
> +385 1 61 99 140
> +385 91 61 99 140
> luka@iytim.hr
>
> I.Y. tim d.o.o.
> Nova cesta 171a, HR-10000 Zagreb
> www.iytim.hr
> info@iytim.hr
>
>
> On 05/03/2011 02:26 PM, Luka Surija wrote:
>> Hello guys,
>> I'm evaluating the transition of our projects from Trinidad 1.2.14 to 
>> 2.x.
>>
>> Most things works as expected, but I'm having some troubles with 
>> Dialog Service.
>> 1. Can't open dialog in window mode with partialSubmit="true" - 
>> nothing happens.
>> 2. After dialog is open without window mode and partial submit, 
>> calling returnFromDialog results with this exception:
>>
>> java.lang.NullPointerException
>>     at 
>> org.apache.myfaces.trinidad.component.UIXComponentBase._getRendererImpl(UIXComponentBase.java:1425)
>>     at 
>> org.apache.myfaces.trinidad.component.UIXComponentBase._cacheRenderer(UIXComponentBase.java:1405)
>>     at 
>> org.apache.myfaces.trinidad.component.UIXComponentBase.__rendererDecode(UIXComponentBase.java:1319)
>>     at 
>> org.apache.myfaces.trinidad.component.UIXComponentBase.decode(UIXComponentBase.java:855)
>>     at 
>> org.apache.myfaces.trinidad.component.UIXForm.processDecodes(UIXForm.java:71)
>>     at 
>> org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildrenImpl(UIXComponentBase.java:1194)
>>     at 
>> org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildren(UIXComponentBase.java:1180)
>>     at 
>> org.apache.myfaces.trinidad.component.UIXComponentBase.processDecodes(UIXComponentBase.java:952)
>>     at 
>> javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:1176)
>>     at 
>> javax.faces.component.UIViewRoot.processDecodes(UIViewRoot.java:933)
>>     at 
>> com.sun.faces.lifecycle.ApplyRequestValuesPhase.execute(ApplyRequestValuesPhase.java:78)
>>     at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
>>     at 
>> com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
>>     at javax.faces.webapp.FacesServlet.service(FacesServlet.java:395)
>>     at 
>> org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1534)
>>     at 
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:343)
>>     at 
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:215)
>>     at 
>> org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:293)
>>     at 
>> org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:199)
>>     at 
>> org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
>>     at 
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
>>     at 
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:215)
>>     at 
>> hr.stratusit.humanresources.web.common.ViewExpiredFilter.doFilter(ViewExpiredFilter.java:80)
>>     at 
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
>>     at 
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:215)
>>     at 
>> hr.stratusit.humanresources.web.common.IE8CompatibilityMode.doFilter(IE8CompatibilityMode.java:33)
>>     at 
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
>>     at 
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:215)
>>     at 
>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279)
>>     at 
>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
>>     at 
>> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
>>     at 
>> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
>>     at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:98)
>>     at 
>> com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:91)
>>     at 
>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:162)
>>     at 
>> org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:326)
>>     at 
>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:227)
>>     at 
>> com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:170)
>>     at 
>> com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:817)
>>     at 
>> com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:718)
>>     at 
>> com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1007)
>>     at 
>> com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225)
>>     at 
>> com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
>>     at 
>> com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
>>     at 
>> com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
>>     at 
>> com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
>>     at 
>> com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
>>     at 
>> com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
>>     at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
>>     at 
>> com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
>>     at 
>> com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
>>     at java.lang.Thread.run(Thread.java:662)
>>
>>
>> Looking into code it looks like renderkit is null for this request ?!
>>
>> I'm using:
>>
>> Trinidad 2.0.0.
>> Mojarra 2.1.0 (FCS b07) - Glassfish 3.1
>>
>>
>> I suspect that the problem is in configuration. Since I couldn't find 
>> any example how to configure Trinidad 2 with JSF 2 using Facelets 
>> here is my configuration:
>>
>> web.xml
>> -----------------------------
>> <?xml version="1.0" encoding="UTF-8"?>
>> <web-app xmlns="http://java.sun.com/xml/ns/javaee"
>>      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>      xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
>> http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
>>      version="3.0">
>> <filter>
>> <filter-name>IE8CompatibilityMode</filter-name>
>> <filter-class>hr.stratusit.humanresources.web.common.IE8CompatibilityMode</filter-class>

>>
>> <init-param>
>> <param-name>compatibilityMode</param-name>
>> <param-value>IE=EmulateIE7</param-value>
>> </init-param>
>> </filter>
>> <filter>
>> <filter-name>ViewExpiredFilter</filter-name>
>> <filter-class>hr.stratusit.humanresources.web.common.ViewExpiredFilter</filter-class>

>>
>> </filter>
>> <filter>
>> <filter-name>Trinidad Filter</filter-name>
>> <filter-class>org.apache.myfaces.trinidad.webapp.TrinidadFilter</filter-class>

>>
>> </filter>
>>
>> <context-param>
>> <param-name>org.apache.myfaces.trinidad.FACELETS_VIEW_MAPPINGS</param-name>

>>
>> <param-value>*.xhtml</param-value>
>> </context-param>
>>
>> <context-param>
>> <param-name>org.apache.myfaces.trinidad.CHANGE_PERSISTENCE</param-name>
>> <param-value>session</param-value>
>> </context-param>
>>
>> <context-param>
>> <param-name>org.apache.myfaces.trinidad.CLIENT_STATE_METHOD</param-name>
>> <param-value>token</param-value>
>> </context-param>
>> <context-param>
>> <param-name>org.apache.myfaces.trinidad.ENABLE_QUIRKS_MODE</param-name>
>> <param-value>false</param-value>
>> </context-param>
>> <context-param>
>> <param-name>org.apache.myfaces.trinidad.ENABLE_LIGHTWEIGHT_DIALOGS</param-name>

>>
>> <param-value>true</param-value>
>> </context-param>
>> <context-param>
>> <param-name>org.apache.myfaces.trinidad.DISABLE_CONTENT_COMPRESSION</param-name>

>>
>> <param-value>true</param-value>
>> </context-param>
>> <context-param>
>> <param-name>org.apache.myfaces.trinidad.CACHE_VIEW_ROOT</param-name>
>> <param-value>false</param-value>
>> </context-param>
>> <context-param>
>> <!-- Maximum memory per request (in bytes) -->
>> <param-name>org.apache.myfaces.trinidad.UPLOAD_MAX_MEMORY</param-name>
>> <!-- Use 10.000K -->
>> <param-value>10240000</param-value>
>> </context-param>
>> <context-param>
>> <!-- Maximum disk space per request (in bytes) -->
>> <param-name>org.apache.myfaces.trinidad.UPLOAD_MAX_DISK_SPACE</param-name>

>>
>> <!-- Use 500,000K -->
>> <param-value>512000000</param-value>
>> </context-param>
>> <context-param>
>> <param-name>javax.faces.FACELETS_REFRESH_PERIOD</param-name>
>> <param-value>-1</param-value>
>> </context-param>
>> <context-param>
>> <param-name>javax.faces.FACELETS_VIEW_MAPPINGS</param-name>
>> <param-value>*.xhtml</param-value>
>> </context-param>
>> <context-param>
>> <param-name>javax.faces.FACELETS_SKIP_COMMENTS</param-name>
>> <param-value>true</param-value>
>> </context-param>
>> <context-param>
>> <param-name>facelets.DEVELOPMENT</param-name>
>> <param-value>true</param-value>
>> </context-param>
>> <context-param>
>> <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
>> <param-value>server</param-value>
>> </context-param>
>> <context-param>
>> <param-name>com.sun.faces.verifyObjects</param-name>
>> <param-value>false</param-value>
>> </context-param>
>> <context-param>
>> <param-name>javax.faces.CONFIG_FILES</param-name>
>> <param-value>/WEB-INF/faces-config.xml,/WEB-INF/managed-beans.xml</param-value>

>>
>> </context-param>
>> <context-param>
>> <param-name>com.sun.faces.validateXml</param-name>
>> <param-value>false</param-value>
>> </context-param>
>> <context-param>
>> <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
>> <param-value>.xhtml</param-value>
>> </context-param>
>> <context-param>
>> <param-name>javax.faces.PROJECT_STAGE</param-name>
>> <param-value>Development</param-value>
>> </context-param>
>>
>> <filter-mapping>
>> <filter-name>IE8CompatibilityMode</filter-name>
>> <url-pattern>/*</url-pattern>
>> </filter-mapping>
>> <filter-mapping>
>> <filter-name>ViewExpiredFilter</filter-name>
>> <url-pattern>*.xhtml</url-pattern>
>> </filter-mapping>
>> <filter-mapping>
>> <filter-name>Trinidad Filter</filter-name>
>> <servlet-name>Faces Servlet</servlet-name>
>> </filter-mapping>
>> <servlet>
>> <servlet-name>Trinidad Resource Servlet</servlet-name>
>> <servlet-class>org.apache.myfaces.trinidad.webapp.ResourceServlet</servlet-class>

>>
>> </servlet>
>> <!-- This cannot be configured currently -->
>> <servlet-mapping>
>> <servlet-name>Trinidad Resource Servlet</servlet-name>
>> <url-pattern>/adf/*</url-pattern>
>> </servlet-mapping>
>> <servlet>
>> <servlet-name>Faces Servlet</servlet-name>
>> <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
>> <load-on-startup>1</load-on-startup>
>> </servlet>
>> <servlet-mapping>
>> <servlet-name>Faces Servlet</servlet-name>
>> <url-pattern>*.xhtml</url-pattern>
>> </servlet-mapping>
>> <session-config>
>> <session-timeout>
>>             90
>> </session-timeout>
>> </session-config>
>> <welcome-file-list>
>> <welcome-file>index.xhtml</welcome-file>
>> </welcome-file-list>
>> </web-app>
>> -----------------------------
>>
>> faces-config.xml
>> ----------------------------
>> <?xml version='1.0' encoding='UTF-8'?>
>> <faces-config version="2.0"
>>     xmlns="http://java.sun.com/xml/ns/javaee"
>>     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>     xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
>> http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd">
>>
>> <application>
>> <default-render-kit-id>org.apache.myfaces.trinidad.core</default-render-kit-id>

>>
>> <locale-config>
>> <default-locale>en</default-locale>
>> <supported-locale>hr_HR</supported-locale>
>> <supported-locale>en</supported-locale>
>> <supported-locale>de_DE</supported-locale>
>> <supported-locale>it_IT</supported-locale>
>> </locale-config>
>> </application>
>> <lifecycle>
>> <phase-listener>hr.stratusit.humanresources.web.common.AuthenticationPhaseListener</phase-listener>

>>
>> <phase-listener>hr.stratusit.humanresources.web.common.MessagesPhaseListener</phase-listener>

>>
>> </lifecycle>
>> <navigation-rule>
>> <from-view-id>*</from-view-id>
>> <navigation-case>
>> <from-outcome>dialog:uploadAttachment</from-outcome>
>> <to-view-id>/uploadFile.xhtml</to-view-id>
>> </navigation-case>
>> <navigation-case>
>> <from-outcome>dialog:uploadImage</from-outcome>
>> <to-view-id>/uploadFile2.xhtml</to-view-id>
>> </navigation-case>
>> <navigation-case>
>> <from-outcome>dialog:linkDocument</from-outcome>
>> <to-view-id>/application/linkDocument.xhtml</to-view-id>
>> </navigation-case>
>>
>> <navigation-case>
>> <from-outcome>dialog:frm.group</from-outcome>
>> <to-view-id>/administration/frm.group.xhtml</to-view-id>
>> </navigation-case>
>>       .....
>> ----------------------------
>>
>> Regards,
>>
>

Mime
View raw message