1 Reply Latest reply on Oct 27, 2008 3:15 PM by Fab Mars

    how can I get row index and use it in my code

    Germiyan Ogul Newbie

      I need to get row index from a rich datatable and use it in my code to get some results. I searched forum and google it is said that I need to use UIData and bind it to datatable.

      After I did this, I started get the error below

      binding="#{invoiceHome.issueData}": Target Unreachable, identifier 'invoiceHome' resolved to null

      This is my code

      <rich:dataTable id="receiptList" var="ii"
      value="#{invoiceHome.instance.itemInvoice}" binding="#{invoiceHome.issueData}" >

      private UIData issueData;
      public UIData getIssueData() {
       return issueData;
       public void setIssueData(UIData issueData) {
       this.issueData = issueData;

      What is wrong with my code? Is there another way to retrieve row index?

        • 1. Re: how can I get row index and use it in my code
          Fab Mars Novice

          What is your problem? succeeding in some data table binding, or getting the row index in a datatable ?

          I'll assume this is the row index. Then the rowKeyVar in the rich:dataTable tag will do that.
          Use <rich:dataTable ......... rowKeyVar="myVariable">
          And then, #{myVariable} in the page code is the row numbr, zero-based.

          If now you're trying to do some binding, your java code is ok, but the error doesn't say that. The error says invoiceHome is the problem, not invoiceHome.issueData. In your shoes, I'd check the <managed-bean> declaration of #{invoiceHome} in your faces-config