To be clear, does your pagination work with @SessionScoped, but you just prefer not to use @SessionScoped?
Have you compared your impl to what's available on the RichFaces showcase?
Hemant Gupta wrote:
Since, I am working on this for my client, I can't disclose the code.
Commercial support for RichFacesis available for those who are not able to work within the confines of the OSS community:
Its working fine with SessionScope but I don't prefer to use it as using SessionScope has its own implications, when all I want is show some data on client side & enable pagination on client side without hitting the backend again and again. I had already checked their showcase and in their example they are using SessionScope.
If I had to use SessionScope only, then what's the point of providing a ViewScope?
As for commercial support, that is not an option for me.
ViewScoped should work.
Finally, I was able to discover the problem. Thanks to StackOverflow.com. Although, I was using the viewScope, my method was returning a String rather than returning null or void. After I changed the method definition to void, the code started working properly.
Seems like void or null forces JSF to re-instantiate the object with old data...
Thanks Brian for reading and replying to my problem.