Forums Register Login

inserting several rows in DB using h:datatable

+Pie Number of slices to send: Send
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.

+Pie Number of slices to send: Send
Is that all wrapped in a form? You need the <h:form> to create a form.

Mark
+Pie Number of slices to send: Send
Yes, this is nested in a h:form tag.
Forget this weirdo. You guys wanna see something really neat? I just have to take off my shoe .... (hint: it's a tiny ad)
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 1615 times.
Similar Threads
Problem with submit()
How to determine which dataTable row was selected
Passing parameters with h: link
h:commandLink is not working within h:dataTable
Loading DB data when web app context initialized
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 16, 2024 03:09:22.