• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

event.getObject() using roweventedit sends the old value to the bean

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I have a datatable and I am using onRowEdit event to update the value of a field to null, but it always displays the previous value persisted. I can update the field value to anything except null.I looked around in the forums for solutions but couldn't find it. Please help. Much Thanks in advance.

I am using primefaces-5.1 , jsf 2.2.2 and weblogic 10.3 in my project.

Below is my xhtml:




Below is my AcctBean:




Below is my object:




Thanks,
Swapni
 
Saloon Keeper
Posts: 27752
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm not sure if I understood that.

Do you expect to be able to set a backing bean property value to null directly from a JSF form? How yo you expect the user to enter a null into a web page? Beyond that, web pages are text, so a null can never appear on a web page because null is a binary object.

When a user leaves a field blank on a web page, what is posted to the backing bean is an empty string (""), not a null.
 
Swapni Mishra
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When I don't enter anything on the form, leave it blank, it should update to null but it always gets the previous saved value from db and doesn't pass null or  "".
 
Swapni Mishra
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can someone please assist.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic