3 Replies Latest reply on Mar 12, 2010 2:29 PM by JohanVelthuis

    php dataservice datagrid form problem

    JohanVelthuis Level 1

      I think this is a bug, this is what I did:

      I created a viewstack in my application and a navigatorcomponent in it with a datagrid.

      I created a dataservice php, generate template from database.

      I drag the getAll... dataservice call to the datagrid.

      So far it works when I run the application, but then...

       

      I create a new component for my viewstack

      I rightclick the get...ByItemID and choose Generate Form, follow the wizard and create a new DataType

      Because the formelement where I can set the Id is colliding with the detailform, I put them in a vgroup, (request: It would be nice if the generated form is generated at my current cursor position)

      Now the form als works fine.

       

      But when I rerun my application and go directly to the page with the datagrid, the datagrid triggers an error:(see the bottom of this thread).

      And it doesnt load the data in the datagrid.

       

      By coincident I discovered that if I go the the form page and I use the default TextInput to load one item (even with id=0, so there is no data), and after that I open the page with the datagrid it does load the data.

       

      Since the procedure should be that the form pops up after clicking an element in the datagrid, this behaviour is not desirable.

       

      I hope someone has a workaround or knows how to solve the problem.

       

      Thanks Johan Velthuis

       

      Error Message:

      ArgumentError: Can't find ManagedQuery or ManagedOperation named: getAllRegBegeleiders
          at mx.data::RPCDataServiceAdapter/executeQuery()[C:\depot\DataServices\branches\dune_rc\fram eworks\projects\data\src\mx\data\RPCDataServiceAdapter.as:325]
          at mx.data::RPCDataServiceAdapter/processDataMessage()[C:\depot\DataServices\branches\dune_r c\frameworks\projects\data\src\mx\data\RPCDataServiceAdapter.as:920]
          at RPCDataServiceRequest/invoke()[C:\depot\DataServices\branches\dune_rc\frameworks\projects \data\src\mx\data\RPCDataServiceAdapter.as:1668]
          at mx.data::DataStore/http://www.adobe.com/2006/flex/mx/internal::invoke()[C:\depot\DataServices\branches\dune_r c\frameworks\projects\data\src\mx\data\DataStore.as:3343]
          at <anonymous>()[C:\depot\DataServices\branches\dune_rc\frameworks\projects\data\src\mx\data \DataStore.as:1579]
          at mx.data::DataStore/http://www.adobe.com/2006/flex/mx/internal::fill()[C:\depot\DataServices\branches\dune_rc\ frameworks\projects\data\src\mx\data\DataStore.as:1597]
          at mx.data::ConcreteDataService/internalFill()[C:\depot\DataServices\branches\dune_rc\framew orks\projects\data\src\mx\data\ConcreteDataService.as:6925]
          at <anonymous>()[C:\depot\DataServices\branches\dune_rc\frameworks\projects\data\src\mx\data \ConcreteDataService.as:1221]
          at mx.data::ConcreteDataService/fill()[C:\depot\DataServices\branches\dune_rc\frameworks\pro jects\data\src\mx\data\ConcreteDataService.as:1240]
          at mx.data::ConcreteDataService/executeQuery()[C:\depot\DataServices\branches\dune_rc\framew orks\projects\data\src\mx\data\ConcreteDataService.as:1254]
          at mx.data::DataManager/executeQuery()[C:\depot\DataServices\branches\dune_rc\frameworks\pro jects\data\src\mx\data\DataManager.as:1355]
          at Function/http://adobe.com/AS3/2006/builtin::apply()
          at mx.data::ManagedOperation/queryProxy()[C:\depot\DataServices\branches\dune_rc\frameworks\ projects\data\src\mx\data\ManagedOperation.as:524]
          at mx.rpc.remoting::Operation/send()[E:\dev\gumbo_beta2\frameworks\projects\rpc\src\mx\rpc\r emoting\Operation.as:212]
          at _Super_RegBegeleidersService/getAllRegBegeleiders()[/Users/jv/Documents/Adobe Flash Builder Beta 2/tofAdmin/src/services/regbegeleidersservice/_Super_RegBegeleidersService.as:198]
          at components::begeleiderOverzicht/dgBegeleider_creationCompleteHandler()[/Users/jv/Document s/Adobe Flash Builder Beta 2/tofAdmin/src/components/begeleiderOverzicht.mxml:41]
          at components::begeleiderOverzicht/__dgBegeleider_creationComplete()[/Users/jv/Documents/Ado be Flash Builder Beta 2/tofAdmin/src/components/begeleiderOverzicht.mxml:63]
          at flash.events::EventDispatcher/dispatchEventFunction()
          at flash.events::EventDispatcher/dispatchEvent()
          at mx.core::UIComponent/dispatchEvent()[E:\dev\gumbo_beta2\frameworks\projects\framework\src \mx\core\UIComponent.as:11749]
          at mx.core::UIComponent/set initialized()[E:\dev\gumbo_beta2\frameworks\projects\framework\src\mx\core\UIComponent.as :1525]
          at mx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\gumbo_beta2\frameworks\projects \framework\src\mx\managers\LayoutManager.as:759]
          at mx.managers::LayoutManager/doPhasedInstantiationCallback()[E:\dev\gumbo_beta2\frameworks\ projects\framework\src\mx\managers\LayoutManager.as:1069]

        • 1. Re: php dataservice datagrid form problem
          JohanVelthuis Level 1

          I managed to get things work on another computer in a new project.

          I'm going to check on my other project tomorrow, but I think it has something to do with setting the following property:

           

          project properties -> data/services -> Enable Service Manager to use single service instance (Singleton) during code generation


          With it turned on it seems to work.

          • 2. Re: php dataservice datagrid form problem
            Radhakrishna Bhat Level 3

            Hello,

             

            We were not able to reproduce the issue here. Can you please share your PHP Server info and MySQL database dump if it is reproducible on a new project again? (Without enabling singleton code generation).

             

             

            -Radhakrishna

            • 3. Re: php dataservice datagrid form problem
              JohanVelthuis Level 1

              Hello Radhakrishna,

               

              I havent been sitting behind that computer since, when I do, I'll send you the phpinfo() dump from that computer.

               

              Since the mysql is on a remote server and the same procedure works from my laptop, I think it isn't in the database.

              The sqldatabase is from a client and I can't send you a complete dump, but maybe next week I can send you some files (.as, .php and a sqldump with anonimized records.

               

              you're profile says user, not adobe employee, you're question makes me think that you're a developer on flash builder or flex 4. Please forgive me my curiosity, but can you tell me what you do?