• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Tim Cooke
Sheriffs:
  • Rob Spoor
  • Liutauras Vilda
  • paul wheaton
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
  • Piet Souris
Bartenders:
  • Stephan van Hulst

richfaces:: richdatatable problem.

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 327
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Sunny Shah
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 327
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In short contents of the table are not able to change , can't see new data for new request
 
Sunny Shah
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
changed code as per your suggestion...


 
Sunny Shah
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


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

Thanks
 
We noticed he had no friends. So we gave him this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic