4 Replies Latest reply on Apr 19, 2011 5:18 PM by jgomezp

    Dynamic DataScroller Richfaces

    jgomezp

      Hi, I have some like this in my code:

      this function so good

      <h:form>
                      <h1><h:outputText value="List"/></h1>
                        <rich:datascroller for="auction" maxPages="5"/>
                      <rich:dataTable value="#{componente}" var="item"  id="auction" rows="10">
                          <rich:column>
                              <f:facet name="header">
                                  <h:outputText value="Arcod"/>
                              </f:facet>
                              <h:outputText value="#{item.arcod}"/>
                          </rich:column>

       

      but I'm tring to make dynamic datascroller :

      this function so bad


      HtmlDataTable dataTable = new HtmlDataTable();

           dataTable.setValueExpression("value", context.getApplication().getExpressionFactory().createValueExpression(context.getELContext(), "#{componente}", Componente.class));
              dataTable.setId("auction");
              dataTable.setVar("item");
              dataTable.setRows(10);

           padre.getChildren().add(dataTable);

           HtmlDatascroller datascroller = new HtmlDatascroller();
              datascroller.setFor("auction");
              datascroller.setMaxPages(5);
              padre.getChildren().add(datascroller);

       

      can somebody helpme????