4 Replies Latest reply on Jan 15, 2009 3:39 PM by shiocaltz

    extendedDataTable+java datamodel

      hello,
      i'm trying to use the extendedDataTable component with a
      javax.faces.model.ListDataModel.
      if i have an action ajax submit on the same form with the datatable, but outside the data dataTable, i get the

      Caused by: javax.faces.el.EvaluationException: java.lang.IllegalArgumentException
      at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:91)
      at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:91)
      ... 50 more
      Caused by: java.lang.IllegalArgumentException
      at javax.faces.model.ListDataModel.getRowData(ListDataModel.java:139)
      at ro.jxeelab.erp.jsf.test.SandboxAdapter.callFromExternalAction(SandboxAdapter.java:121)
      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:597)
      at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:329)
      at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:342)
      at org.jboss.el.parser.AstPropertySuffix.invoke(AstPropertySuffix.java:58)
      at org.jboss.el.parser.AstValue.invoke(AstValue.java:96)
      at org.jboss.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
      at com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68)
      at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:77)
      ... 51 more

      it seems to an el expression but the only expression i have on the form is the action its self.

      so.... please help :)

      ty alot

        • 1. Re: extendedDataTable+java datamodel
          ilya_shaikovsky

          use ExtendedTableDataModel

          • 2. Re: extendedDataTable+java datamodel

            uau, that wast fast.... thank for replying in such a short notice.

            i have tried the ExtendedTableDataModel, i provided in it's constructor a class implementing the DataProvider interface.

            the action triggered by the button on the same form but outside the table doesn't throw exception anymore, but i still can't get the selected row on the table. The table's getRowData method returns null. The button only has an action, nu ajaxSingle or bypassUpdates flags set.

            ty

            • 3. Re: extendedDataTable+java datamodel
              nbelaevski

              Hello,

              What version do you use?

              • 4. Re: extendedDataTable+java datamodel

                hello,
                i am using version 3.3.0 CR3.
                I have solved the problem by implementing that interface, but i still need to figure out how to determine the correct object that is on the selected row, given the context of sorting. If the table is not sorted, then i get the object that it should be, but if i sort the grid by any header, the rowKeyVar gets all messed up so the selected object is not the real one.

                Any ideas on this issue?

                Or else maybe you have another way of determining the selected object when the submit is not from within the table...
                Thanks