2 Replies Latest reply on Aug 22, 2009 2:58 AM by elf

    a4j:commandLink inside rich:dataTabel generates NoRowAvailab

      Hi,

      I am getting this messge:

      javax.faces.model.NoRowAvailableException

      I am trying to click on an a4j:commandLink contained within a rich:dataTable.

      My JSP code is this:

      <rich:dataTable binding="#{producthandler.detailTable}" value="#{producthandler.productsBySelectedCategory}" var="product" width="100%">
       <rich:column>
       <f:facet name="header">
       <h:outputText value="" />
       </f:facet>
       <h:inputText value="0" style="width:20px"/>
       <a4j:form>
       <a4j:commandLink value="#{product.price}" ajaxSingle="true" actionListener="#{producthandler.test}" />
       </a4j:form>
       <hr />
       </rich:column>
      </rich:dataTable>
      


      My (abbreviated) source file is this:
      public class ProductsHandler extends BaseHandler {
       private HtmlDataTable _detailTable;
      
       public HtmlDataTable getDetailTable() {
       return _detailTable;
       }
      
       public void setDetailTable(HtmlDataTable table) {
       _detailTable = table;
       }
      
       public void test(ActionEvent event){
       Object rowData = _detailTable.getRowData();
       }
      }
      


      It gets to this line:
      Object rowData = _detailTable.getRowData();

      ...and generates a NoRowAvailableException.

      Can someone please tell me how to fix this. I have searched all over, and experimented with a lot of different setting. Nothing works.