• 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:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

Issues with FormSubmission

 
Ranch Hand
Posts: 99
Eclipse IDE
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Priya,

Post your code . that will help to easy to identify your problem.
 
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic