1 Reply Latest reply on Dec 1, 2009 5:07 AM by SrinivasAnnam

    FB4 + PHP Get Paged Issue

    karkara+ Level 1

      Hello people,

       

      I´m developing new projects in Flex 4 - Flash Builder 4, with Php back end. I´m happy with the new wizard connection; really helpfull.

      Well, i get a little issue during the GET PAGED function. The PhP get_paged method don´t require any arguments. Just like this: public function getKeeks_paged() : AsyncToken . When i TEST the function in FB4, it works perfectly; i configure the startIndex and numIntens, and it return the correct values. But, when i try to use the PAGED method on the system, it ask me the arguments. How do i pass the arguments? I tryed some alternatives, but the only way i get it correctly is modifying the PHP PAGED method, including the startIndex and numItens.

       

      public function getKeeks_paged(startIndex:int,numItens:int) : AsyncToken
          {
              var _internal_operation:AbstractOperation = _serviceControl.getOperation("getKeeks_paged");
              var _internal_token:AsyncToken = _internal_operation.send(startIndex,numItens) ;

       

              return _internal_token;
          } 

       

      Am i correct doing this? is this a really issue from FB4? or i can pass that values another way?

       

      Thank you all for reading and helping me / us!

        • 1. Re: FB4 + PHP Get Paged Issue
          SrinivasAnnam Adobe Employee

          Hi,

           

             Did you generate this PHP file using new "Sample Generation" dialog in Flash Builder 4? If so, It generates a function like "get<TABLE_NAME>_paged($startIndex, $numItems)" inside the PHP file which takes two arguments and paging is automatically enabled.

           

             Whenever paging is enabled on an operation, these two parameters are hidden in "Data/Services" panel & AS files that get generated. When you drag & drop this operation to any list based component ( i.e. List, DataGrid, AdvancedDataGrid etc..) , these two parameters (startIndex & numItems) are automatically passed at runtime using internal calculations based on page size & position of scrollbar. So, you need not pass these parameters explicitly. That is the reason why you don't see then in "Data/Services" panel & AS file.

           

            This is the intended behavior & you need not add those two parameters manually in the AS file.

           

            Let us know incase you need any clarifications regarding the same. We will be more than happy to help you.

           

          Regards

          Srinivas Annam

          http://srinivasannam.wordpress.com