myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Kienenberger" <mkien...@gmail.com>
Subject Re: Binding to elements in DataTable
Date Wed, 02 Aug 2006 20:34:27 GMT
On 8/2/06, David Van Stone <dvs@head.cfa.harvard.edu> wrote:
> My above attempt was to bind each row element to a UIInput in my row object.
> However, since there is really only one UIInput in multiple states, I need
> to bind the row column to a UIInput in the overall backing bean. I also need
> to bind the DataTable to a UIData in the backing bean. I can have a hidden
> field after the table with a validator in the backing bean in order to
> validate the rows.
>
> I thus have access to the UIData object (for getRowCount() and
> setRowIndex()) and the UIInput values.
>
> Code example below, for anyone stumbling across this thread in the future!

Aha!  Now I see what your issue is.   Before, I thought your hidden
component was enclosed in a <h:column>, and I couldn't understand why
you needed to change the row index.    If you're only working within a
row, then by doing this, you'd avoid having to mess around with
setting the row index.

Obviously, if you're validating across rows, then you'll need to do it
as you stated above.

Mime
View raw message