1 Reply Latest reply on Feb 8, 2010 10:14 AM by Antari

    Enable data paging with parameters count() on new php function issue (BUG?)

    Antari

      I've got my app prototyped quickly with the default settings in Flex Builder 4.  Now I'm going back and adding/modifying features to polish the app off.

       

      For this application I'm using PHP5 as the server side.

       

      The data paging is really cool and simple to call using the default settings.  However, I'm running into issues with customizing the data paging feature.

       

      This is the default header of the php function that was created for me:

      public function getTblbrowserrecord_paged($startIndex, $numItems){...}

       

      Instead of dumping all data back to the function I want to be able to search on certain fields so I created a new function called:

       

      getTblbrowserrecord_search_paged ($szName, $szIP, $szRule, $szURL, $szDateLow, $szDateHigh, $szCode, $startIndex, $numItems  ) {...}

       

      The new function is tested and operates as designed.

       

      I set the input types of the variables and return type (Tblbrowserrecord[]) of the new function then went to enable data paging.  The first screen came up and asked me for the key to use which I selected.  The next screen came up and asked me for the number of records which I set to 100 then went to select the count operation.

       

      I initially selected the automatically created count() function but it came up with the error " Count operation parameters should match the paged operation parameters list."

       

      So I created another function to match the search function's parameter's list:

       

      public function count_searched($szName, $szIP, $szRule, $szURL, $szDateLow, $szDateHigh, $szCode, $startIndex, $numItems)  {...}

       

      But I still ge the error "Count operation parameters should match the paged operation parameters list."

       

      But they DO match.  I looked at the default functions that were created by FB4 and noticed that the automatically generated function count() has no parameters and the paged function has the two functions $startIndex and $numItems which are not identical yet they work.  I tried removing those two fields from the count function but got the same results.

       

      What am I doing wrong?

       

      Thanks!