pgb.weekList is a List<Integer>
pgb.weekIndex is an Integer
pgb.daysOfWeek is a List<Integer>
<x:dataTable
id="listTableView"
value="#{pgb.weekList}"
binding="#{pgb.weekIndex }"
var="row">
As you stated, row will indeed successively contain each of the
integers in weekList.
There's a number of ways to get at the current value of row, but you'd
need to tell us what you're hoping to accomplish before we can suggest
a method that will work best in your situation.
As Simon stated, you can always bind the UIData component to your
backing bean, and then call uiData.getRowData(). getRowIndex() will
only give you the table row, and not necessarily the value of your
current integer in the list.
On 2/6/07, kal stevens <[EMAIL PROTECTED]> wrote:
I wanted the integer to be accessible through my java code.
I could make it a UIData I guess.
But because the "Value" in the table was a list of integers, I wanted to
bind the value over which I am iterating to my bean.
I also tried
<x:inputHidden value=#{row} binding="#{pgb.weekIndex}"/>
Is that not supported? is there a better way of doing it?
I assumed that because my value was a List<Integer>, that the variable "row"
would be an Integer, and I could bind it to my bean.
Thanks
On 2/6/07, Simon Kitching <[EMAIL PROTECTED]> wrote:
> kal stevens wrote:
> > Could someone help me out and tell me what is wrong with this
> > I am trying to bind the current value through the iteration to my bean.
> >
> > pgb.weekList is a List<Integer>
> > pgb.weekIndex is an Integer
> > pgb.daysOfWeek is a List<Integer>
> >
> >
> > <x:dataTable
> > id="listTableView"
> > value="#{ pgb.weekList}"
> > binding="#{pgb.weekIndex }"
> > var="row">
>
> The binding attribute must point to a method like this:
> public void setXXX(UIComponent component);
>
> In the case above, a UIData object will be passed to the method, ie the
> object implementing the x:dataTable.
>
> I have no idea what you are trying to achieve by binding to some Integer..
>
> Regards,
>
> Simon
>