Comments below...
Sean Schofield wrote:
I assume you mean a dataTable that contains editable (UIInput) components right? Tables themselves are not really editable but they can contain editable components.
Yes. I meant a dataTable with UIInput components.
Here is a link to an excellent online resource for JSF tags. It shows the component details, an example JSP, the resulting HTML (as it appears) and the resulting HTML code.
http://www.exadel.com/tutorial/jsf/jsftags-guide.html
Thanks. I'll check it out.
Eventually I'd like to see us produce something like that for myfaces. Currently we have some examples but it would be nice to have a consistent format and approach to all of the examples.
As for examples of a backing bean, I don't have one off hand but the backing bean for a dataTable is not too tough. Generally you point the "value" of the table to a collection of beans and assign a variable name in the "var" attribute so that you can reference with binding expressions as you iterrate over that collection. You should be able to find one through a simple google search and all of the JSF books basically cover this one. (You might as well get a JSF book if you're going to be doing some serious JSF)
I bought JSF in Action but it only provides a simple "read-only" dataTable example. I'm was having trouble grasping how the Collection underlying the dataTable is updated based on the inputs from the UIInput components but it sounds like JSF handles that. If that is the case when does one need to use a component binding? There is an example in JSF in Action that builds a dataTable that has an "Approve Project" commandLink in one of the columns. In that case "Approve Project" is bound to an an action method. In that action method they reference the UIData component to determine which project was selected for approval. Is this the typical use case for a dataTable with a component binding?
Thanks!!!
Norm

