How to create a QForm datagrid and edit page

thread: 5 messages  |  last: a year ago  |  started: friday, january 22, 2010, 1:54 am pst


#1  |  Spikesiegel Spain
Friday, January 22, 2010, 1:54 AM PST

Hello,

I'm a new user. I'm trying to work with Qcodo but i can't make my application works.
I generated the code for the tables in my DB, but now i want to edit and create new pages using information from my tables.
I'm trying to follow the examples at the site but I can make them work with my tables and when I look into the files I saw a lot of things Qcodo created by I can't understand.

Can anybody explain me step by step how can I create a simple Qcodo page where I can see in a datagrid the information I have stored in a table. For example this one:

Table User
Fields User_name, pass, profile.   --Profile storage values 1 and 0 but I want

to show “Normal” instead of 0 and “Administrator” instead of 1.

Please, any help will be welcome.

#2  |  Patrick Ranger (Montreal, Qc) Canada
Friday, January 22, 2010, 4:57 AM PST

Hello Spikesiegel,

Welcome to QCodo. If you successfully ran the code generator, then you are almost there. When code generating, QCodo creates for you :
- Data classes, which is your Database / Object mapping, in the includes/data_classes directory
- Data meta controls, including meta datagrids, in the includes/data_meta_controls directory
- Drafts, which are basically forms with simple functionnalities, in the www/drafts directory.

The first thing you should do after code generating is point your browser to the drafts directory and start working with the drafts QCodo created for you.

Let me know how it works out.

-Patrick

P.S. By the way, I don't know what editor you are using, but I strongly suggest you use a stong PHP editor. I personnaly use Eclipse with PHP Development Tools : http://www.eclipse.org/pdt/

#3  |  comradwt (Santa Monica, CA) United States of America
Tuesday, February 23, 2010, 8:55 PM PST

Patrick, thanks for getting back to me.  Anyway, the code has already been generated by another person and placed in the appropriate project area.  Thus, I have been editing the drafts that were copied into project area.  Currently, the page in question has a QForm with a QDataGrid as a child.  In each of the rows, I need to add a QForm which will have a text field and button for submitting the data.  I think that I might have found something close to what I'm aiming for here they are using a checkbox:

http://examples.qcodo.com/examples/dynamic/select.php

-Conrad



#4  |  comradwt (Santa Monica, CA) United States of America
Wednesday, February 24, 2010, 5:27 AM PST

I thought doing something similar using a form instead of a checkbox would work but it did not.  At this time, the page doesn't render and I'm getting the following error messages:

Accompanying HTML Include File does not exist: ““#0 /Users/conradwt/test.dir/projects/test/includes/libs/qcodo/_core/qform/QFormBase.class.php(250): QFormBase->__set('HtmlIncludeFile...', NULL)

#5  |  Patrick Ranger (Montreal, Qc) Canada
Wednesday, February 24, 2010, 7:43 AM PST

These last 2 questions should have been in this thread . Moving answers there.



Copyright © 2005 - 2012, Quasidea Development, LLC
This open-source framework for PHP is released under the terms of The MIT License.