Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

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

 
Swapni Mishra
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • 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
 
Tim Holloway
Bartender
Posts: 18662
71
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • Quote
  • Report post to moderator
Can someone please assist.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!