Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Issues with FormSubmission

 
Varshini Priya
Ranch Hand
Posts: 95
Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I have some issues while clicking on a save button. Im facing the below issues. I have a dataTable and below the datatable is the save button. In the datatable, to populate the table values, Im invoking a restService, which will connect to the DB via Hibernate and fetch the details & populate the data. I also have a checkbox component(h:selectBooleanCheckbox) as one of the component and when I click the checkbox and click on the save button, the service which I use to populate the values in the dataTable is getting invoked again. Can you please let me know/ throw some light as to why this is happening. The only common aspect is that both the commandButton and the datatable are present inside the same form. Also when I click on the submit button, inside the actionListener, the checkbox that is checked is not returning true.

Please Assist. Thanks
 
Eswar Nec
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Priya,

Post your code . that will help to easy to identify your problem.
 
Brajendra Mathema
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What i guess is ,
since you are submitting the form with the command button ,
you are performing navigation to display the same page again,
so the html data table will call the value that has been bind to it when it is rendered again, therefore your method to query the db is invoked again.

If your check box value is being saved in the db while submitting the form,
the check box should be reflected with the new value when the form is rendered again after submission.

Thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic