• Post Reply Bookmark Topic Watch Topic
  • New Topic

inserting several rows in DB using h:datatable  RSS feed

 
Ayan Afridi
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • 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.

 
Mark Spritzler
ranger
Sheriff
Posts: 17309
11
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
Yes, this is nested in a h:form tag.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!