You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Bruno Aranda <br...@gmail.com> on 2010/03/17 12:27:22 UTC

Primefaces p:dataTable not decoding, seems to be a MyFaces 2 problem

Hi,

In my fancy little webapp I am using Primefaces dataTable in lazy mode such
as in this example[1], and I want to use it with MyFaces 2. However there
seems to be a bug and the component decoding is not invoked, so if you
navigate to another page of the table the row index does not change.

It can be reproduced just getting the primefaces showcase examples:

svn co http://primefaces.googlecode.com/svn/examples/trunk/prime-showcase

Then replacing the MyFaces 2 dependencies in the profile to the latest (it
does not work either with Myfaces 2.0.0-beta or beta2). And run the showcase
with:

mvn jetty:run-exploded -Pmyfaces-2.0

If you modify slightly the dataTable example so it shows the first result in
one column (by modifying the TableBean class), you will see it is always 0.

A debugging session shows that the decode for dataTable renderer is never
invoked. I am a bit rusty with all this, does any one have an idea what may
be happening or what could I look to pinpoint the problem?

Thanks,

Bruno

[1] http://www.primefaces.org:8080/prime-showcase/ui/datatableLazy.jsf

Re: Primefaces p:dataTable not decoding, seems to be a MyFaces 2 problem

Posted by Jakob Korherr <ja...@gmail.com>.
Hi again,

OK, setting the org.apache.myfaces.SERIALIZE_STATE_IN_SESSION config param
to false solves the NotSerializableException.

Unfortunately it does not solve the other problem..

Regards,
Jakob

2010/3/17 Jakob Korherr <ja...@gmail.com>

> Hi Bruno,
>
> I tried the example with my latest build from MyFaces trunk and I got the
> following exception for every click on the dataTable navigation:
>
> 17.03.2010 15:40:34
> org.apache.myfaces.view.facelets.DefaultFaceletsStateManagementHelper
> serializeView
> SCHWERWIEGEND: Exiting serializeView - Could not serialize state:
> org.primefaces.examples.view.TableBean
> java.io.NotSerializableException: org.primefaces.examples.view.TableBean
>     at
> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1156)
>     at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
>     at java.util.HashMap.writeObject(HashMap.java:1001)
>     at sun.reflect.GeneratedMethodAccessor29.invoke(Unknown Source)
>     at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>     at java.lang.reflect.Method.invoke(Method.java:597)
>     at
> java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)
>     at
> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1461)
>     at
> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
>     at
> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
>     at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1338)
>     at
> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1146)
>     at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
>     at java.util.HashMap.writeObject(HashMap.java:1001)
>     at sun.reflect.GeneratedMethodAccessor29.invoke(Unknown Source)
>     at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>     at java.lang.reflect.Method.invoke(Method.java:597)
>     at
> java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)
>     at
> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1461)
>     at
> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
>     at
> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
>     at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
>     at
> org.apache.myfaces.view.facelets.DefaultFaceletsStateManagementHelper.serializeView(DefaultFaceletsStateManagementHelper.java:293)
>     at
> org.apache.myfaces.view.facelets.DefaultFaceletsStateManagementHelper.saveSerializedViewInServletSession(DefaultFaceletsStateManagementHelper.java:178)
>     at
> org.apache.myfaces.view.facelets.DefaultFaceletsStateManagementStrategy.saveView(DefaultFaceletsStateManagementStrategy.java:422)
>     at
> org.apache.myfaces.application.jsp.JspStateManagerImpl.saveView(JspStateManagerImpl.java:447)
>     at
> org.primefaces.component.datatable.DataTableRenderer.encodePartially(DataTableRenderer.java:171)
>     at
> org.primefaces.component.datatable.DataTable.encodePartially(DataTable.java:469)
>     at
> org.primefaces.application.PrimeFacesPhaseListener$2.invokeContextCallback(PrimeFacesPhaseListener.java:260)
>     at javax.faces.component.UIData.invokeOnComponent(UIData.java:312)
>     at
> javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:209)
>     at
> javax.faces.component.UIComponentBase.invokeOnComponent(UIComponentBase.java:936)
>     at
> javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:209)
>     at
> javax.faces.component.UIComponentBase.invokeOnComponent(UIComponentBase.java:936)
>     at
> javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:209)
>     at
> javax.faces.component.UIComponentBase.invokeOnComponent(UIComponentBase.java:936)
>     at
> org.primefaces.application.PrimeFacesPhaseListener.handleAjaxRequest(PrimeFacesPhaseListener.java:111)
>     at
> org.primefaces.application.PrimeFacesPhaseListener.beforePhase(PrimeFacesPhaseListener.java:66)
>     at
> org.apache.myfaces.lifecycle.PhaseListenerManager.informPhaseListenersBefore(PhaseListenerManager.java:76)
>     at
> org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:200)
>     at javax.faces.webapp.FacesServlet.service(FacesServlet.java:191)
>     at
> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
>     at
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166)
>     at
> org.primefaces.examples.filter.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:32)
>     at
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
>     at
> org.primefaces.webapp.filter.FileUploadFilter.doFilter(FileUploadFilter.java:79)
>     at
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
>     at
> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
>     at
> org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
>     at
> org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
>     at
> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
>     at
> org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
>     at
> org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
>     at
> org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
>     at
> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
>     at org.mortbay.jetty.Server.handle(Server.java:326)
>     at
> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
>     at
> org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:938)
>     at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:755)
>     at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
>     at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
>     at
> org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
>     at
> org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
>
> Furthermore it always logs "INFO: Loading the lazy car data between 0 and
> 10", which is the problem you described.
>
> I'll try to find out why this happens!
>
> Regards,
> Jakob
>
> 2010/3/17 Bruno Aranda <br...@gmail.com>
>
> Hi,
>>
>> In my fancy little webapp I am using Primefaces dataTable in lazy mode
>> such
>> as in this example[1], and I want to use it with MyFaces 2. However there
>> seems to be a bug and the component decoding is not invoked, so if you
>> navigate to another page of the table the row index does not change.
>>
>> It can be reproduced just getting the primefaces showcase examples:
>>
>> svn co http://primefaces.googlecode.com/svn/examples/trunk/prime-showcase
>>
>> Then replacing the MyFaces 2 dependencies in the profile to the latest (it
>> does not work either with Myfaces 2.0.0-beta or beta2). And run the
>> showcase
>> with:
>>
>> mvn jetty:run-exploded -Pmyfaces-2.0
>>
>> If you modify slightly the dataTable example so it shows the first result
>> in
>> one column (by modifying the TableBean class), you will see it is always
>> 0.
>>
>> A debugging session shows that the decode for dataTable renderer is never
>> invoked. I am a bit rusty with all this, does any one have an idea what
>> may
>> be happening or what could I look to pinpoint the problem?
>>
>> Thanks,
>>
>> Bruno
>>
>> [1] http://www.primefaces.org:8080/prime-showcase/ui/datatableLazy.jsf
>>
>
>

Re: Primefaces p:dataTable not decoding, seems to be a MyFaces 2 problem

Posted by Jakob Korherr <ja...@gmail.com>.
Hi Bruno,

I tried the example with my latest build from MyFaces trunk and I got the
following exception for every click on the dataTable navigation:

17.03.2010 15:40:34
org.apache.myfaces.view.facelets.DefaultFaceletsStateManagementHelper
serializeView
SCHWERWIEGEND: Exiting serializeView - Could not serialize state:
org.primefaces.examples.view.TableBean
java.io.NotSerializableException: org.primefaces.examples.view.TableBean
    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1156)
    at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
    at java.util.HashMap.writeObject(HashMap.java:1001)
    at sun.reflect.GeneratedMethodAccessor29.invoke(Unknown Source)
    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at
java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)
    at
java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1461)
    at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
    at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1338)
    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1146)
    at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
    at java.util.HashMap.writeObject(HashMap.java:1001)
    at sun.reflect.GeneratedMethodAccessor29.invoke(Unknown Source)
    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at
java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)
    at
java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1461)
    at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
    at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
    at
org.apache.myfaces.view.facelets.DefaultFaceletsStateManagementHelper.serializeView(DefaultFaceletsStateManagementHelper.java:293)
    at
org.apache.myfaces.view.facelets.DefaultFaceletsStateManagementHelper.saveSerializedViewInServletSession(DefaultFaceletsStateManagementHelper.java:178)
    at
org.apache.myfaces.view.facelets.DefaultFaceletsStateManagementStrategy.saveView(DefaultFaceletsStateManagementStrategy.java:422)
    at
org.apache.myfaces.application.jsp.JspStateManagerImpl.saveView(JspStateManagerImpl.java:447)
    at
org.primefaces.component.datatable.DataTableRenderer.encodePartially(DataTableRenderer.java:171)
    at
org.primefaces.component.datatable.DataTable.encodePartially(DataTable.java:469)
    at
org.primefaces.application.PrimeFacesPhaseListener$2.invokeContextCallback(PrimeFacesPhaseListener.java:260)
    at javax.faces.component.UIData.invokeOnComponent(UIData.java:312)
    at
javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:209)
    at
javax.faces.component.UIComponentBase.invokeOnComponent(UIComponentBase.java:936)
    at
javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:209)
    at
javax.faces.component.UIComponentBase.invokeOnComponent(UIComponentBase.java:936)
    at
javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:209)
    at
javax.faces.component.UIComponentBase.invokeOnComponent(UIComponentBase.java:936)
    at
org.primefaces.application.PrimeFacesPhaseListener.handleAjaxRequest(PrimeFacesPhaseListener.java:111)
    at
org.primefaces.application.PrimeFacesPhaseListener.beforePhase(PrimeFacesPhaseListener.java:66)
    at
org.apache.myfaces.lifecycle.PhaseListenerManager.informPhaseListenersBefore(PhaseListenerManager.java:76)
    at
org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:200)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:191)
    at
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
    at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166)
    at
org.primefaces.examples.filter.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:32)
    at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
    at
org.primefaces.webapp.filter.FileUploadFilter.doFilter(FileUploadFilter.java:79)
    at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
    at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
    at
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
    at
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
    at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
    at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
    at
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
    at
org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
    at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
    at org.mortbay.jetty.Server.handle(Server.java:326)
    at
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
    at
org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:938)
    at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:755)
    at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
    at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
    at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
    at
org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)

Furthermore it always logs "INFO: Loading the lazy car data between 0 and
10", which is the problem you described.

I'll try to find out why this happens!

Regards,
Jakob

2010/3/17 Bruno Aranda <br...@gmail.com>

> Hi,
>
> In my fancy little webapp I am using Primefaces dataTable in lazy mode such
> as in this example[1], and I want to use it with MyFaces 2. However there
> seems to be a bug and the component decoding is not invoked, so if you
> navigate to another page of the table the row index does not change.
>
> It can be reproduced just getting the primefaces showcase examples:
>
> svn co http://primefaces.googlecode.com/svn/examples/trunk/prime-showcase
>
> Then replacing the MyFaces 2 dependencies in the profile to the latest (it
> does not work either with Myfaces 2.0.0-beta or beta2). And run the
> showcase
> with:
>
> mvn jetty:run-exploded -Pmyfaces-2.0
>
> If you modify slightly the dataTable example so it shows the first result
> in
> one column (by modifying the TableBean class), you will see it is always 0.
>
> A debugging session shows that the decode for dataTable renderer is never
> invoked. I am a bit rusty with all this, does any one have an idea what may
> be happening or what could I look to pinpoint the problem?
>
> Thanks,
>
> Bruno
>
> [1] http://www.primefaces.org:8080/prime-showcase/ui/datatableLazy.jsf
>

Re: Primefaces p:dataTable not decoding, seems to be a MyFaces 2 problem

Posted by Jakob Korherr <ja...@gmail.com>.
Created MYFACES-2611.

Regards,
Jakob

2010/3/17 Jakob Korherr <ja...@gmail.com>

> Found it!
>
> The problem is that Primefaces' PartialViewRoot keeps its own children list
> and the method on UIComponentBase (getFacetsAndChildren()) does not take
> getChildren() but _childrenList into account when creating the Iterator.
> This one was hard to find...
>
> I will create a JIRA issue for this and fix it asap.
>
> Regards,
> Jakob
>
> 2010/3/17 Matthias Wessendorf <ma...@apache.org>
>
> On Wed, Mar 17, 2010 at 4:27 AM, Bruno Aranda <br...@gmail.com>
>> wrote:
>> > Hi,
>> >
>> > In my fancy little webapp I am using Primefaces dataTable in lazy mode
>> such
>> > as in this example[1], and I want to use it with MyFaces 2. However
>> there
>> > seems to be a bug and the component decoding is not invoked, so if you
>> > navigate to another page of the table the row index does not change.
>> >
>> > It can be reproduced just getting the primefaces showcase examples:
>> >
>> > svn co
>> http://primefaces.googlecode.com/svn/examples/trunk/prime-showcase
>> >
>> > Then replacing the MyFaces 2 dependencies in the profile to the latest
>> (it
>> > does not work either with Myfaces 2.0.0-beta or beta2). And run the
>> showcase
>> > with:
>> >
>> > mvn jetty:run-exploded -Pmyfaces-2.0
>>
>> oh, that's not the default?
>> Pretty odd, especially since the stuff is from a committer ;-)
>>
>> @NotSerializableException: IMO it is ok to have that exception,
>> since the bean is in session and not implements the right contract
>> for passivation... (=> demo bug)
>>
>> -Matthias
>>
>> >
>> > If you modify slightly the dataTable example so it shows the first
>> result in
>> > one column (by modifying the TableBean class), you will see it is always
>> 0.
>> >
>> > A debugging session shows that the decode for dataTable renderer is
>> never
>> > invoked. I am a bit rusty with all this, does any one have an idea what
>> may
>> > be happening or what could I look to pinpoint the problem?
>> >
>> > Thanks,
>> >
>> > Bruno
>> >
>> > [1] http://www.primefaces.org:8080/prime-showcase/ui/datatableLazy.jsf
>> >
>>
>>
>>
>> --
>> Matthias Wessendorf
>>
>> blog: http://matthiaswessendorf.wordpress.com/
>> sessions: http://www.slideshare.net/mwessendorf
>> twitter: http://twitter.com/mwessendorf
>>
>
>

Re: Primefaces p:dataTable not decoding, seems to be a MyFaces 2 problem

Posted by Matthias Wessendorf <ma...@apache.org>.
cool stuff! :)

On Wed, Mar 17, 2010 at 10:45 AM, Bruno Aranda <br...@gmail.com> wrote:
> Yes, it works beautifully! Many thanks for the quick action! :)
>
> Bruno
>
> On 17 March 2010 17:10, Jakob Korherr <ja...@gmail.com> wrote:
>
>> So, I committed the fix - this works now perfectly :) :)
>>
>> Regards,
>> Jakob
>>
>> 2010/3/17 Bruno Aranda <br...@gmail.com>
>>
>> > Wonderful! I was too rusty for this one :)
>> >
>> > Thanks!
>> >
>> > Bruno
>> >
>> > On 17 March 2010 16:44, Jakob Korherr <ja...@gmail.com> wrote:
>> >
>> > > Found it!
>> > >
>> > > The problem is that Primefaces' PartialViewRoot keeps its own children
>> > list
>> > > and the method on UIComponentBase (getFacetsAndChildren()) does not
>> take
>> > > getChildren() but _childrenList into account when creating the
>> Iterator.
>> > > This one was hard to find...
>> > >
>> > > I will create a JIRA issue for this and fix it asap.
>> > >
>> > > Regards,
>> > > Jakob
>> > >
>> > > 2010/3/17 Matthias Wessendorf <ma...@apache.org>
>> > >
>> > > > On Wed, Mar 17, 2010 at 4:27 AM, Bruno Aranda <brunoaranda@gmail.com
>> >
>> > > > wrote:
>> > > > > Hi,
>> > > > >
>> > > > > In my fancy little webapp I am using Primefaces dataTable in lazy
>> > mode
>> > > > such
>> > > > > as in this example[1], and I want to use it with MyFaces 2. However
>> > > there
>> > > > > seems to be a bug and the component decoding is not invoked, so if
>> > you
>> > > > > navigate to another page of the table the row index does not
>> change.
>> > > > >
>> > > > > It can be reproduced just getting the primefaces showcase examples:
>> > > > >
>> > > > > svn co
>> > > > http://primefaces.googlecode.com/svn/examples/trunk/prime-showcase
>> > > > >
>> > > > > Then replacing the MyFaces 2 dependencies in the profile to the
>> > latest
>> > > > (it
>> > > > > does not work either with Myfaces 2.0.0-beta or beta2). And run the
>> > > > showcase
>> > > > > with:
>> > > > >
>> > > > > mvn jetty:run-exploded -Pmyfaces-2.0
>> > > >
>> > > > oh, that's not the default?
>> > > > Pretty odd, especially since the stuff is from a committer ;-)
>> > > >
>> > > > @NotSerializableException: IMO it is ok to have that exception,
>> > > > since the bean is in session and not implements the right contract
>> > > > for passivation... (=> demo bug)
>> > > >
>> > > > -Matthias
>> > > >
>> > > > >
>> > > > > If you modify slightly the dataTable example so it shows the first
>> > > result
>> > > > in
>> > > > > one column (by modifying the TableBean class), you will see it is
>> > > always
>> > > > 0.
>> > > > >
>> > > > > A debugging session shows that the decode for dataTable renderer is
>> > > never
>> > > > > invoked. I am a bit rusty with all this, does any one have an idea
>> > what
>> > > > may
>> > > > > be happening or what could I look to pinpoint the problem?
>> > > > >
>> > > > > Thanks,
>> > > > >
>> > > > > Bruno
>> > > > >
>> > > > > [1]
>> > http://www.primefaces.org:8080/prime-showcase/ui/datatableLazy.jsf
>> > > > >
>> > > >
>> > > >
>> > > >
>> > > > --
>> > > > Matthias Wessendorf
>> > > >
>> > > > blog: http://matthiaswessendorf.wordpress.com/
>> > > > sessions: http://www.slideshare.net/mwessendorf
>> > > > twitter: http://twitter.com/mwessendorf
>> > > >
>> > >
>> >
>>
>



-- 
Matthias Wessendorf

blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
twitter: http://twitter.com/mwessendorf

Re: Primefaces p:dataTable not decoding, seems to be a MyFaces 2 problem

Posted by Bruno Aranda <br...@gmail.com>.
Yes, it works beautifully! Many thanks for the quick action! :)

Bruno

On 17 March 2010 17:10, Jakob Korherr <ja...@gmail.com> wrote:

> So, I committed the fix - this works now perfectly :) :)
>
> Regards,
> Jakob
>
> 2010/3/17 Bruno Aranda <br...@gmail.com>
>
> > Wonderful! I was too rusty for this one :)
> >
> > Thanks!
> >
> > Bruno
> >
> > On 17 March 2010 16:44, Jakob Korherr <ja...@gmail.com> wrote:
> >
> > > Found it!
> > >
> > > The problem is that Primefaces' PartialViewRoot keeps its own children
> > list
> > > and the method on UIComponentBase (getFacetsAndChildren()) does not
> take
> > > getChildren() but _childrenList into account when creating the
> Iterator.
> > > This one was hard to find...
> > >
> > > I will create a JIRA issue for this and fix it asap.
> > >
> > > Regards,
> > > Jakob
> > >
> > > 2010/3/17 Matthias Wessendorf <ma...@apache.org>
> > >
> > > > On Wed, Mar 17, 2010 at 4:27 AM, Bruno Aranda <brunoaranda@gmail.com
> >
> > > > wrote:
> > > > > Hi,
> > > > >
> > > > > In my fancy little webapp I am using Primefaces dataTable in lazy
> > mode
> > > > such
> > > > > as in this example[1], and I want to use it with MyFaces 2. However
> > > there
> > > > > seems to be a bug and the component decoding is not invoked, so if
> > you
> > > > > navigate to another page of the table the row index does not
> change.
> > > > >
> > > > > It can be reproduced just getting the primefaces showcase examples:
> > > > >
> > > > > svn co
> > > > http://primefaces.googlecode.com/svn/examples/trunk/prime-showcase
> > > > >
> > > > > Then replacing the MyFaces 2 dependencies in the profile to the
> > latest
> > > > (it
> > > > > does not work either with Myfaces 2.0.0-beta or beta2). And run the
> > > > showcase
> > > > > with:
> > > > >
> > > > > mvn jetty:run-exploded -Pmyfaces-2.0
> > > >
> > > > oh, that's not the default?
> > > > Pretty odd, especially since the stuff is from a committer ;-)
> > > >
> > > > @NotSerializableException: IMO it is ok to have that exception,
> > > > since the bean is in session and not implements the right contract
> > > > for passivation... (=> demo bug)
> > > >
> > > > -Matthias
> > > >
> > > > >
> > > > > If you modify slightly the dataTable example so it shows the first
> > > result
> > > > in
> > > > > one column (by modifying the TableBean class), you will see it is
> > > always
> > > > 0.
> > > > >
> > > > > A debugging session shows that the decode for dataTable renderer is
> > > never
> > > > > invoked. I am a bit rusty with all this, does any one have an idea
> > what
> > > > may
> > > > > be happening or what could I look to pinpoint the problem?
> > > > >
> > > > > Thanks,
> > > > >
> > > > > Bruno
> > > > >
> > > > > [1]
> > http://www.primefaces.org:8080/prime-showcase/ui/datatableLazy.jsf
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > Matthias Wessendorf
> > > >
> > > > blog: http://matthiaswessendorf.wordpress.com/
> > > > sessions: http://www.slideshare.net/mwessendorf
> > > > twitter: http://twitter.com/mwessendorf
> > > >
> > >
> >
>

Re: Primefaces p:dataTable not decoding, seems to be a MyFaces 2 problem

Posted by Jakob Korherr <ja...@gmail.com>.
So, I committed the fix - this works now perfectly :) :)

Regards,
Jakob

2010/3/17 Bruno Aranda <br...@gmail.com>

> Wonderful! I was too rusty for this one :)
>
> Thanks!
>
> Bruno
>
> On 17 March 2010 16:44, Jakob Korherr <ja...@gmail.com> wrote:
>
> > Found it!
> >
> > The problem is that Primefaces' PartialViewRoot keeps its own children
> list
> > and the method on UIComponentBase (getFacetsAndChildren()) does not take
> > getChildren() but _childrenList into account when creating the Iterator.
> > This one was hard to find...
> >
> > I will create a JIRA issue for this and fix it asap.
> >
> > Regards,
> > Jakob
> >
> > 2010/3/17 Matthias Wessendorf <ma...@apache.org>
> >
> > > On Wed, Mar 17, 2010 at 4:27 AM, Bruno Aranda <br...@gmail.com>
> > > wrote:
> > > > Hi,
> > > >
> > > > In my fancy little webapp I am using Primefaces dataTable in lazy
> mode
> > > such
> > > > as in this example[1], and I want to use it with MyFaces 2. However
> > there
> > > > seems to be a bug and the component decoding is not invoked, so if
> you
> > > > navigate to another page of the table the row index does not change.
> > > >
> > > > It can be reproduced just getting the primefaces showcase examples:
> > > >
> > > > svn co
> > > http://primefaces.googlecode.com/svn/examples/trunk/prime-showcase
> > > >
> > > > Then replacing the MyFaces 2 dependencies in the profile to the
> latest
> > > (it
> > > > does not work either with Myfaces 2.0.0-beta or beta2). And run the
> > > showcase
> > > > with:
> > > >
> > > > mvn jetty:run-exploded -Pmyfaces-2.0
> > >
> > > oh, that's not the default?
> > > Pretty odd, especially since the stuff is from a committer ;-)
> > >
> > > @NotSerializableException: IMO it is ok to have that exception,
> > > since the bean is in session and not implements the right contract
> > > for passivation... (=> demo bug)
> > >
> > > -Matthias
> > >
> > > >
> > > > If you modify slightly the dataTable example so it shows the first
> > result
> > > in
> > > > one column (by modifying the TableBean class), you will see it is
> > always
> > > 0.
> > > >
> > > > A debugging session shows that the decode for dataTable renderer is
> > never
> > > > invoked. I am a bit rusty with all this, does any one have an idea
> what
> > > may
> > > > be happening or what could I look to pinpoint the problem?
> > > >
> > > > Thanks,
> > > >
> > > > Bruno
> > > >
> > > > [1]
> http://www.primefaces.org:8080/prime-showcase/ui/datatableLazy.jsf
> > > >
> > >
> > >
> > >
> > > --
> > > Matthias Wessendorf
> > >
> > > blog: http://matthiaswessendorf.wordpress.com/
> > > sessions: http://www.slideshare.net/mwessendorf
> > > twitter: http://twitter.com/mwessendorf
> > >
> >
>

Re: Primefaces p:dataTable not decoding, seems to be a MyFaces 2 problem

Posted by Bruno Aranda <br...@gmail.com>.
Wonderful! I was too rusty for this one :)

Thanks!

Bruno

On 17 March 2010 16:44, Jakob Korherr <ja...@gmail.com> wrote:

> Found it!
>
> The problem is that Primefaces' PartialViewRoot keeps its own children list
> and the method on UIComponentBase (getFacetsAndChildren()) does not take
> getChildren() but _childrenList into account when creating the Iterator.
> This one was hard to find...
>
> I will create a JIRA issue for this and fix it asap.
>
> Regards,
> Jakob
>
> 2010/3/17 Matthias Wessendorf <ma...@apache.org>
>
> > On Wed, Mar 17, 2010 at 4:27 AM, Bruno Aranda <br...@gmail.com>
> > wrote:
> > > Hi,
> > >
> > > In my fancy little webapp I am using Primefaces dataTable in lazy mode
> > such
> > > as in this example[1], and I want to use it with MyFaces 2. However
> there
> > > seems to be a bug and the component decoding is not invoked, so if you
> > > navigate to another page of the table the row index does not change.
> > >
> > > It can be reproduced just getting the primefaces showcase examples:
> > >
> > > svn co
> > http://primefaces.googlecode.com/svn/examples/trunk/prime-showcase
> > >
> > > Then replacing the MyFaces 2 dependencies in the profile to the latest
> > (it
> > > does not work either with Myfaces 2.0.0-beta or beta2). And run the
> > showcase
> > > with:
> > >
> > > mvn jetty:run-exploded -Pmyfaces-2.0
> >
> > oh, that's not the default?
> > Pretty odd, especially since the stuff is from a committer ;-)
> >
> > @NotSerializableException: IMO it is ok to have that exception,
> > since the bean is in session and not implements the right contract
> > for passivation... (=> demo bug)
> >
> > -Matthias
> >
> > >
> > > If you modify slightly the dataTable example so it shows the first
> result
> > in
> > > one column (by modifying the TableBean class), you will see it is
> always
> > 0.
> > >
> > > A debugging session shows that the decode for dataTable renderer is
> never
> > > invoked. I am a bit rusty with all this, does any one have an idea what
> > may
> > > be happening or what could I look to pinpoint the problem?
> > >
> > > Thanks,
> > >
> > > Bruno
> > >
> > > [1] http://www.primefaces.org:8080/prime-showcase/ui/datatableLazy.jsf
> > >
> >
> >
> >
> > --
> > Matthias Wessendorf
> >
> > blog: http://matthiaswessendorf.wordpress.com/
> > sessions: http://www.slideshare.net/mwessendorf
> > twitter: http://twitter.com/mwessendorf
> >
>

Re: Primefaces p:dataTable not decoding, seems to be a MyFaces 2 problem

Posted by Jakob Korherr <ja...@gmail.com>.
Found it!

The problem is that Primefaces' PartialViewRoot keeps its own children list
and the method on UIComponentBase (getFacetsAndChildren()) does not take
getChildren() but _childrenList into account when creating the Iterator.
This one was hard to find...

I will create a JIRA issue for this and fix it asap.

Regards,
Jakob

2010/3/17 Matthias Wessendorf <ma...@apache.org>

> On Wed, Mar 17, 2010 at 4:27 AM, Bruno Aranda <br...@gmail.com>
> wrote:
> > Hi,
> >
> > In my fancy little webapp I am using Primefaces dataTable in lazy mode
> such
> > as in this example[1], and I want to use it with MyFaces 2. However there
> > seems to be a bug and the component decoding is not invoked, so if you
> > navigate to another page of the table the row index does not change.
> >
> > It can be reproduced just getting the primefaces showcase examples:
> >
> > svn co
> http://primefaces.googlecode.com/svn/examples/trunk/prime-showcase
> >
> > Then replacing the MyFaces 2 dependencies in the profile to the latest
> (it
> > does not work either with Myfaces 2.0.0-beta or beta2). And run the
> showcase
> > with:
> >
> > mvn jetty:run-exploded -Pmyfaces-2.0
>
> oh, that's not the default?
> Pretty odd, especially since the stuff is from a committer ;-)
>
> @NotSerializableException: IMO it is ok to have that exception,
> since the bean is in session and not implements the right contract
> for passivation... (=> demo bug)
>
> -Matthias
>
> >
> > If you modify slightly the dataTable example so it shows the first result
> in
> > one column (by modifying the TableBean class), you will see it is always
> 0.
> >
> > A debugging session shows that the decode for dataTable renderer is never
> > invoked. I am a bit rusty with all this, does any one have an idea what
> may
> > be happening or what could I look to pinpoint the problem?
> >
> > Thanks,
> >
> > Bruno
> >
> > [1] http://www.primefaces.org:8080/prime-showcase/ui/datatableLazy.jsf
> >
>
>
>
> --
> Matthias Wessendorf
>
> blog: http://matthiaswessendorf.wordpress.com/
> sessions: http://www.slideshare.net/mwessendorf
> twitter: http://twitter.com/mwessendorf
>

Re: Primefaces p:dataTable not decoding, seems to be a MyFaces 2 problem

Posted by Matthias Wessendorf <ma...@apache.org>.
On Wed, Mar 17, 2010 at 4:27 AM, Bruno Aranda <br...@gmail.com> wrote:
> Hi,
>
> In my fancy little webapp I am using Primefaces dataTable in lazy mode such
> as in this example[1], and I want to use it with MyFaces 2. However there
> seems to be a bug and the component decoding is not invoked, so if you
> navigate to another page of the table the row index does not change.
>
> It can be reproduced just getting the primefaces showcase examples:
>
> svn co http://primefaces.googlecode.com/svn/examples/trunk/prime-showcase
>
> Then replacing the MyFaces 2 dependencies in the profile to the latest (it
> does not work either with Myfaces 2.0.0-beta or beta2). And run the showcase
> with:
>
> mvn jetty:run-exploded -Pmyfaces-2.0

oh, that's not the default?
Pretty odd, especially since the stuff is from a committer ;-)

@NotSerializableException: IMO it is ok to have that exception,
since the bean is in session and not implements the right contract
for passivation... (=> demo bug)

-Matthias

>
> If you modify slightly the dataTable example so it shows the first result in
> one column (by modifying the TableBean class), you will see it is always 0.
>
> A debugging session shows that the decode for dataTable renderer is never
> invoked. I am a bit rusty with all this, does any one have an idea what may
> be happening or what could I look to pinpoint the problem?
>
> Thanks,
>
> Bruno
>
> [1] http://www.primefaces.org:8080/prime-showcase/ui/datatableLazy.jsf
>



-- 
Matthias Wessendorf

blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
twitter: http://twitter.com/mwessendorf