0

I have an undesirable behavior in my application, and I don't know how I can remove it.

I have a required field and a "Save" button in a form. Here are the steps to reproduce my behavior :

  1. The first test is to fill the field and click on the button => OK
  2. Reset the field to an empty value and click again on the button => the old valid value is restore and the error message is displayed.

The issue : the message tells a value is required, but the field is no more empty !

Is there a way to avoid this restore of the last valid value ?

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
Jonathan
  • 85
  • 1
  • 8
  • 1
    take a look at this https://www.google.com/search?q=jsf+old+value+shown+after+validation+failed&oq=jsf+old+value+shown+after+validation+failed&aqs=chrome..69i57j0l2j69i60j0.7797j0j1&sourceid=chrome&ie=UTF-8 – Daniel Nov 18 '13 at 10:29
  • Ensure that the associated managed-bean in not `@SessionScoped`. – Omar Nov 18 '13 at 10:41
  • This is most likely related to http://stackoverflow.com/a/8393808. Workaround: use ajax to submit the form and don't update the inputs. – BalusC Nov 18 '13 at 11:40

0 Answers0