Just an FYI, to use less components you could shorten your use of
output text components to:

      <x:dataTable
                id="listTableView"
                value="#{pgb.weekList}"
                binding="#{pgb.weekIndex }"
                var="row">
           <x:columns value="#{pgb.daysOfWeek}" var="column">
               <h:outputText value="(#{row},#{column})"/>
           </x:columns>
       </x:dataTable>

Nothing to do with your problem, but just in case you didn't know EL
supports this.

On 2/6/07, kal stevens <[EMAIL PROTECTED]> 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">
            <x:columns value="#{pgb.daysOfWeek}" var="column">
                <h:outputText value="("/>
                <h:outputText value="#{row}"/>
                <h:outputText value=","/>
                <h:outputText value="#{column}"/>
                <h:outputText value=")"/>
            </x:columns>
        </x:dataTable>

This is the output when I take out the binding
(0,0) (0,1) (0,2) (0,3) (0,4) (0,5) (0,6)
(1,0) (1,1) (1,2) (1,3) (1,4) (1,5) (1,6)


I get the following exception
 Caused by: javax.faces.el.EvaluationException: Bean:
com.stevens.pgb.PGB, property: weekIndex
        at
org.apache.myfaces.el.PropertyResolverImpl.setProperty(PropertyResolverImpl.java:410)
        at
org.apache.myfaces.el.PropertyResolverImpl.setValue(PropertyResolverImpl.java:173)
        ... 54 more
Caused by: java.lang.IllegalArgumentException: argument
type mismatch
        at sun.reflect.NativeMethodAccessorImpl.invoke0
(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at
org.apache.myfaces.el.PropertyResolverImpl.setProperty(PropertyResolverImpl.java:406)
        ... 55 more


Reply via email to