aspose file tools*
The moose likes JSF and the fly likes richfaces:: richdatatable problem. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "richfaces:: richdatatable problem." Watch "richfaces:: richdatatable problem." New topic
Author

richfaces:: richdatatable problem.

Sunny Shah
Greenhorn

Joined: Oct 29, 2009
Posts: 8
hello all,

I am very new to richfaces and JSF, I have one richdatatable with datascroller, problem is that at the time of loading datatable it sends multiple request. i gone through many forums and came to know that it is due to jsf lifecycle's event. the problem is that my richdatatable some time could not be able to update its view, what would be the reason.

please help me i am stuck up with this issue for a long ...


Thanks
Sunay
Jason Irwin
Ranch Hand

Joined: Jun 09, 2009
Posts: 327
What is the actual problem?

When you click the datascroller, does it send multiple requests? Do you get the wrong page back? Garbled results?
Have you looked at the RichFaces examples, they're pretty good.
RichFaces Scroller Demo

Try to make your datatable and scroller match the examples (that may mean losing functionality temporarily) and see if you can ascertain where you are going wrong.


SCJP6
Sunny Shah
Greenhorn

Joined: Oct 29, 2009
Posts: 8
Jason Irwin wrote:What is the actual problem?

When you click the datascroller, does it send multiple requests? Do you get the wrong page back? Garbled results?
Have you looked at the RichFaces examples, they're pretty good.
RichFaces Scroller Demo

Try to make your datatable and scroller match the examples (that may mean losing functionality temporarily) and see if you can ascertain where you are going wrong.




Hello Friend,

Thanks for prompt reply. I am beginner in JSF and Richfaces. My problem is like this. I have two menu item. let say Menu A and Menu B. when i am clicking on Menu A it will display different data and when i am clicking on menu B it displays different data. Now the problem is it sends multiple request. i think it is because of JSF Lifecycle. but why it is not rendering the datatable properly. for the second response my code goes like this.

Thanks again for kind help



Jason Irwin
Ranch Hand

Joined: Jun 09, 2009
Posts: 327
why it is not rendering the datatable properly

In what way is it not rendering properly? What is happening that is different from what you expect? You still haven't said what the problem is.

I don't think you need the "reRender" attribute on your datascroller, I think that is implied by the datacroller being in the datatable's facet (I have no "reRender" on mine and it works fine, nor is there one on the RichFaces example when using facets - did you look at that?).
I also see you have filters and sorts toyour columns. That might be confusing matters. Remove everything that you don't need and see if the datascroller starts working, at the very least this will let you work on the datascroller issue in isolation.

This is how I have my datascroller set up and it works.

Ellipses ("...") are just places where I have delete sections of my JSF, I just want to show you the structure I used as the page is doing some quite complex data management.
I lifted it all (pretty much) from the examples.
Sunny Shah
Greenhorn

Joined: Oct 29, 2009
Posts: 8
not rendering properly in terms of not showing correct data. see I have one menuItem A and another Menu Item B now when i click on menu item A it will show one kind of data table and if i click on another menu item B then it shows another kind of data. this all things are decided in my backing bean. Now once or twice continuously i am clicking on menu alternatively then gives correct data but after few consecutive click it leads me tow wrong display of data in grid. what should come on clicking Menu A comes in Menu B and what comes on Clicking on Menu B comes in Menu A.

I traced my class and i found that there are multiple request fired by the datatable. I think it is due to different states of Lifecycle of JSF. data scroller may send request for its own data. and data part sends request for its own data. i removed filter as well as you have said but not getting out of the problem

Thanks for Kind reply
Sunny Shah
Greenhorn

Joined: Oct 29, 2009
Posts: 8
In short contents of the table are not able to change , can't see new data for new request
Sunny Shah
Greenhorn

Joined: Oct 29, 2009
Posts: 8
changed code as per your suggestion...


Sunny Shah
Greenhorn

Joined: Oct 29, 2009
Posts: 8


Solved the problem with the help of queue an synchronized call in Managed Bean.

Thanks
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: richfaces:: richdatatable problem.