1 Reply Latest reply on May 23, 2011 3:13 AM by liuliu

    I want to send a Array of two dimensions to javascrpt

    yaseralhs

      I need to use function in java scrpt  this function is needed for array tow dimension,I fill in the Array List of the DB  and retrieved to Backing  Bean but

      I ca'tn send to jsf page or to java scrpt finction

       

      note:I used Google Chart Tools

       

      /////////////////////////// java scrpt code///////

      function onDrow(name){

          data.addRows(name.length);

          var h;

          for (h=0;h<name.length; h++) {

       

              var j;

              for ( j=0;j<4; j++) {

               if(h==0){

                     data.setCell(h, j,name[h][j]);

                      }

                  if(h==1){

                      data.setCell(h, j,name[h][j]);

                  }

                  if(h==2){

                   data.setCell(h, j,name[h][j]);

                  }

                  if(h==3){

                    data.setCell(h,j, name[h][j]);

                  }

       

              }//end of for

       

          }//end

      ////////////////////////////////////////////////////////////jsf code

      <a4j:commandButton onclick="  onDrow();" id="y4" value="Set" render="rr" />