• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

Issues with scope: JSF-Primefaces  RSS feed

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was trying to implement sort functionality on primefaces dataTable.Sorting is working. But when I delete, update the dataTable items ,no effect (nothing changes) in dataTable. But in the database delete,update are occurring with out any issue.When I logged out and re-login, new list(dataTable) is fine.

employeeView.jsf:


EmployeeList.java:



I have tried with @RequestScope,@ViewScope etc.But no effect.Where I went wrong?

Primefaces-3.0.M3 with JSF2 and Google Cloud SQL
 
Ranch Hand
Posts: 754
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Where is the delete function in the page and the MB?
 
nidheesh ep
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Delete function is in other class. EmployeeView.jsf
 
Bartender
Posts: 1051
5
Chrome Eclipse IDE Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
nidheesh

I have the same as Herbert does. Cannot see anything you have posted which is attempting to delete a row from the data table.
 
nidheesh ep
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Delete method:

 
Bartender
Posts: 2634
17
C++ Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

s.id=: userId



Check the blanks.
 
nidheesh ep
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jan Cumps,

Thanks for that, but It was a mistake got while editing here. Actually delete functionality is working properly in the back end/database. But some cache is the problem.That is why the dataTable is not updating or refreshing. When I logged out and re-login again, the dataTable is fine updated.I don't know where is the cache problem..
 
Hebert Coelho
Ranch Hand
Posts: 754
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do your ManagedBean delete method looks like:

And in your page button call an action not an actionListener (if you are using p:commandButton do it with ajax=false).
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!