• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

DataServices Grid Wizard Populates, but AddItem Form does not even call the PHP member

Explorer ,
Aug 14, 2010 Aug 14, 2010

Copy link to clipboard

Copied

I am using FB trial. I created a project with PHP backend, and when I click on the 'Connect to Data/Service' link in the Data/Services Tab, I select PHP in the wizard, next, I click 'generate a sample' link and do a 'from database'.


The db connects and I choose my Testtable, [id, text]. OK. (I already have Zend installed and working.)


The wizard is filled with Service details about my TesttableService. NEXT. It shows me the operations. FINISH.


The *.as, and TesttableService.php service files are generated. All is well so far.


I drop a datagrid on my form and link it to the getAllTesttable(), run the project and it works.

I generate a form from the createTesttable() and use defaults: Service Call, New Service Call, TesttableService, createTesttable(), form for input:Y, form for return:Y, make return editable:Y... NEXT.


Input parameters on the next page all look proper and checked. FINISH.

Two forms appear and I run the project. They do not work.

However, if I test the createTesttable() using the 'test operation...' context menu. It adds a record as it should.

When I test the app, using the generated forms, it does not even call the php function (Ive put a error_log() call in that php function).

So, since the 'test operation...' works, I presume the problem is not on the backend. I've traced the code call on the front end and it seems good. I am assuming the problem lies in the construction of the Testtable item parameter somewhere. This is all generated code, I haven't coded a line.

Can anyone help me? This is crazy.

Views

300

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 14, 2010 Aug 14, 2010

Copy link to clipboard

Copied

LATEST

From http://forums.adobe.com/thread/682018?tstart=90

trouble executing "some" auto generated php remote services...?

I think you are not using the "commit" on the service. By default the Data services are "managed".

Data management features allow you to synchronize adding, updating, and deleting of records in a database. Changes you make in the client application are not written to the server until a "commit" method is called. You can call a revert method to roll back changes made in the client application.

So wherever you update or create add "commit" to the service after adding/updating. for eg.

protected function addDbItem(item:dbItem:void

{

     createDbItemResult.token = dbItemService.createDbItem(item);

     dbItemService.commit();

}

Thanks to http://forums.adobe.com/people/Anand%20Gaurav

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines