Form with Grid under Run application wizard does not work properly

masino.sinaga, Sun Jul 10 2022, 06:10AM

Here are the steps to reproduce the issue:
1. Create a new project, for example, name it as "mydemo"; so far so good; no error,
2. Click on the icon that has tooltip "Run application wizard", the new dialog window appears; so far so good; no error,
3. In "Module id", I select "main"; so far so good; no error,
4. In "Connection" directive has the corrrect value, since it has been defined in the first step above,
5. In "Primary table (master)" directive, I chose one of my table; so far so good; no error,
6. In "Primary index", I leave it blank
7. In "Tables" checkbox, it has been selected by default,
8. In "Form" section, I enabled all the options besided the default option for "Tablet" option,
9. In "Database" section, I leave the default option as selected for "Use DBTable",
10. Click on "Append to module" button; there is a question dialog box, I chose "Yes"; so far so good; no error,
11. I click on the button icon with tooltip "Compile and preselect selected application"; so far so good; no error,
12. I can access the generated web application via this URL: http://localhost:8010/mydemo/main.php?XDEBUG_SESSION_STOP
13. However, here is the issue I found: each time I clicked on the row in the grid of the generated web application, the selected data will not be displayed on the form under the table. There are three textboxes on the form, and all of them have values of dbedit.
Re: Form with Grid under Run application wizard does not work properly
administrator, Sun Jul 10 2022, 06:42AM

Reproduced, and we will investigate. The function works well if you create a new module. The main application is used as the basic entry point of your application and usually contains the login screen. Appending modules usually is used to add a form for master-detail relationships, or to create forms in building blocks. We suffer from 'blindness' as we never use the main this way.
Re: Form with Grid under Run application wizard does not work properly
administrator, Sun Jul 10 2022, 07:28AM

Acknowledged as a bug, You can follow progress here: https://www.phspeed.com/bt/index.php?do=details&task_id=403
Re: Form with Grid under Run application wizard does not work properly
administrator, Sun Jul 10 2022, 07:33AM

As a quick fix. Select the form and locate the data source property. It is undefined. Select the data source and run your application.
Re: Form with Grid under Run application wizard does not work properly
administrator, Sun Jul 10 2022, 07:59AM

We will update the documentation, and apply a notification when performing an append, as the developers rejected this as a bug. If you create a new module then the datasource is automatically applied. But if you append a module, it cannot overwrite the datasource of the form, as it could already have one. Buildingblocks don't have a form, causing additional problems. So it is actually designed that way. But I can see that it causes confusion, as I was confused as well. That is why we will put a notification to the generator form.
Re: Form with Grid under Run application wizard does not work properly
masino.sinaga, Sun Jul 10 2022, 08:11AM

All right, then. Understood. Thank you for your quick response.