Win a copy of TensorFlow 2.0 in Action this week in the Artificial Intelligence and Machine Learning forum!
  • 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 ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Paul Clapham
  • Bear Bibeault
  • Jeanne Boyarsky
  • Ron McLeod
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
  • Carey Brown
  • salvin francis
  • Scott Selikoff
  • fred rosenberger

DataGrid: update cell without refreshing page

Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have created a datagrid from a javabean, and it works great. My only problem is that I need to change values in specific cells without refreshing the page.

How do I get a reference to an object that represents a row in the grid, so that I can call the setxxxxx() method?

When I have done this, how do I refresh that partikular cell?

As far as I can read on the web, I have to refresh all the cells in the grid. Does anyone know a way to refresh a specific cell???

Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have used the method of invoking an "onchange" javascript function which passes values to an applet to perform the save. I believe that in order to submit any values from a datatable (or any other component) without performing a client-server round trip, you will need to do something similar.

Hope this helps...

Ranch Hand
Posts: 15304
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

When dealing with JSF components, you almost always just need to make the trip to the server. Javascript is messy especially when mixed with JSF. The only option I can think of is AJAX (XMLHttpRequest). Getting that to work with JSF is a challenge though.
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
    Bookmark Topic Watch Topic
  • New Topic