{"action":"created","issue":{"url":"https://api.github.com/repos/primefaces/primefaces/issues/1942","repository_url":"https://api.github.com/repos/primefaces/primefaces","labels_url":"https://api.github.com/repos/primefaces/primefaces/issues/1942/labels{/name}","comments_url":"https://api.github.com/repos/primefaces/primefaces/issues/1942/comments","events_url":"https://api.github.com/repos/primefaces/primefaces/issues/1942/events","html_url":"https://github.com/primefaces/primefaces/issues/1942","id":192897067,"number":1942,"title":"primefaces Input fields on form holds previous value after their value is cleared/set blank and form is submitted","user":{"login":"ppandey01","id":20181911,"avatar_url":"https://avatars.githubusercontent.com/u/20181911?v=3","gravatar_id":"","url":"https://api.github.com/users/ppandey01","html_url":"https://github.com/ppandey01","followers_url":"https://api.github.com/users/ppandey01/followers","following_url":"https://api.github.com/users/ppandey01/following{/other_user}","gists_url":"https://api.github.com/users/ppandey01/gists{/gist_id}","starred_url":"https://api.github.com/users/ppandey01/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ppandey01/subscriptions","organizations_url":"https://api.github.com/users/ppandey01/orgs","repos_url":"https://api.github.com/users/ppandey01/repos","events_url":"https://api.github.com/users/ppandey01/events{/privacy}","received_events_url":"https://api.github.com/users/ppandey01/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2016-12-01T16:36:18Z","updated_at":"2016-12-02T17:09:22Z","closed_at":null,"body":"# Problem Statement\r\n\r\nIf there is already validation error on submitted form then in this situation, if user tries to clear/set blank value for any other mandatory prime-faces input field and resubmit the form then this Input fields on form holds previous value.\r\n\r\nThis Prime-faces behavior is different then pure JSF behavior where value from model is always shown in input field when input field is cleared/set blank and form is submitted. \r\n\r\n## Steps to reproduce using sample code:\r\n1. Load the page so that there is no validation error on page. Page should contain 4 input fields.\r\n2. Choose \"Primefaces Input Field1\" and clear it's value. \r\n3. Submit the form\r\n4. There is no value in this input field. Validation error is displayed \"Primefaces Input Field1 may not be empty\". \r\n5. Choose \"Primefaces Input Field2\" and clear it's value. \r\n6. Submit the form\r\n\r\n## Actual behaviour\r\nPrevious value is shown on \"Primefaces Input Field2\". However Validation error is displayed \"Primefaces Input Field2 may not be empty\". \r\n\r\n## Expected behaviour\r\nExpected behavior should be similar as mentioned in step # 4. i.e. There should be no value presents in input field \"Primefaces Input Field2\". Validation error should be displayed \"Primefaces Input Field2 may not be empty\". \r\n\r\n\r\n## Environment\r\n\r\nPrimefaces 5.3.14 / JSF 2.2.12.redhat-1\r\nServer: JBoss EAP 7\r\n\r\n\r\n\r\n## Sample Code XHTML + Model Bean\r\n\r\n\r\n\r\n[validation.zip](https://github.com/primefaces/primefaces/files/625230/validation.zip)\r\n\r\n\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/primefaces/primefaces/issues/comments/264506875","html_url":"https://github.com/primefaces/primefaces/issues/1942#issuecomment-264506875","issue_url":"https://api.github.com/repos/primefaces/primefaces/issues/1942","id":264506875,"user":{"login":"jxmai","id":10467831,"avatar_url":"https://avatars.githubusercontent.com/u/10467831?v=3","gravatar_id":"","url":"https://api.github.com/users/jxmai","html_url":"https://github.com/jxmai","followers_url":"https://api.github.com/users/jxmai/followers","following_url":"https://api.github.com/users/jxmai/following{/other_user}","gists_url":"https://api.github.com/users/jxmai/gists{/gist_id}","starred_url":"https://api.github.com/users/jxmai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jxmai/subscriptions","organizations_url":"https://api.github.com/users/jxmai/orgs","repos_url":"https://api.github.com/users/jxmai/repos","events_url":"https://api.github.com/users/jxmai/events{/privacy}","received_events_url":"https://api.github.com/users/jxmai/received_events","type":"User","site_admin":false},"created_at":"2016-12-02T17:09:22Z","updated_at":"2016-12-02T17:09:22Z","body":"@ppandey01 I looked at your code again, and I found out a issue:\r\n\r\nIn your java code:\r\n\r\n```java\r\nimport javax.enterprise.context.RequestScoped;\r\nimport javax.faces.bean.ManagedBean;\r\n```\r\n\r\n**You are mixing JSF ManagedBean with CDI's RequestScoped. This is prohibited.**\r\n\r\nPlease use the following imports if  you don't need to use CDI\r\n\r\n```java\r\nimport javax.faces.bean.ManagedBean;\r\nimport javax.faces.bean.RequestScoped;\r\n```\r\n\r\nI guess the issue will be solved after you fix the import\r\n\r\n"}}
{"actor":{"display_login":"jxmai"}}