• 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:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

inserting several rows in DB using h:datatable

 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a datatable with a bunch of h:inputText objects in it. This datatable is generated through a request scope backing bean's constructor. Basically, every time the constructor gets invoked, the datatable is constructed through code.

I also have a commandButton declared in the JSF page, with an action that points to a method in the same backing bean. When I debug this, and the "action" method is called, the list has not been updated w/the new data I entered.


I tried inserting rows into a DB using a datatable defined in the JSF page itself, and that works w/everything else the same. But I need this to work by generating the datatable through the backing bean. ANy idea what would be going on here?

Relevant code: this works when defined explicitly in the JSF page itself.

 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is that all wrapped in a form? You need the <h:form> to create a form.

Mark
 
Ayan Afridi
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, this is nested in a h:form tag.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic