Lightweight, Component-based, and Database-oriented Web Application Framework

About | Overview | Documentation


Documentation > Tutorial > 8.2 Admin page: List management testing

8.2 Admin page: List management testing


Below is the example of text-based guestbook archive content to be used to test the functions of database operations provided by the admin page. Just copy the text-based content below, paste it into the text editor and save it as gb_archive.txt.

Tanya   | grangert@bdva.net  | Sorry forgot to put my Email address last time. | 1996-10-16 | 10:41:16

Melinda | mklayb@unf.com     | Happy Birthday to you, Peace always, Melinda    | 1996-10-12 | 13:48:23

TSC     | tsc@onr.net        | Many blessings for a very happy birthday.       | 1996-10-11 | 21:59:54

Claudia | cgreco@aol.org     | Happy birthday, Imagination + Will = Magick     | 1996-10-11 | 21:46:39

Rogerio | roger@alphanet.com | Nice page!!!                                    | 1996-10-04 | 09:51:07

Bill    | hanagan@acs.ca     | H @ O are #1 :)                                 | 1996-09-29 | 15:55:49

Claudia | cgreco@aol.org     | We need absolutely a new album                  | 1996-09-21 | 11:22:51

FLATTUS | flattus@lsi.com    | We like to play "She's Gone" in a reggae style. | 1996-09-15 | 12:54:25

David   | dave@sprynet.org   | The Temptones CD is excellence!!                | 1996-09-11 | 15:22:53

Gabriel | gab@viseotron.au   | A great page for a great Band!                  | 1996-09-07 | 17:39:24

Wendy   | brixton@vais.com   | Keep up the good work!                          | 1996-08-09 | 20:54:57

Mike    | mdavi@jersey.org   | Great info! Thanks!                             | 1996-07-29 | 19:07:48

Susan   | swilli@orion.com   | Love your web page.                             | 1996-07-26 | 17:50:30

The gb_archive.txt text-based file should now contains the archive of guestbook entries which fields and rows are splited by the "|" and "\n" characters. However, the module (mygb_entry_text2db_insert.pm) that will be used to extract the above guestbook archive content use "\t" character to split the fields of each row entry. Read the documentation on webman_text2db_map component-type module for more information about this particular configuration setting since it's the base module of mygb_entry_text2db_insert.pm module.

Go back to ADT's browser window/tab. At the "Link Structure/Reference" page section, open the "Update Reference" operation sub-section for "Admin" node and then list its "webman_component_selector" DYNAMIC_MODULE type reference parameter settings as shown below.


For "mygb_entry_text2db_insert" module's reference made via "webman_component_selector" DYNAMIC_MODULE type reference, at the "Operation" column click the "Set Param[05]" link. The list of current parameter settings of "mygb_entry_text2db_insert" module's reference that automatically added by the automatic code generator script should be displayed as below.


As shown above, set the parameter setting for "spliter_col" parameter name with the "|" character. Click the "Set" button and the new parameter setting will be added as shown below. Also apply this particular "spliter_col" parameter setting to both "mygb_entry_text2db_update" and "mygb_entry_text2db_delete" modules' references.


Go back to browser's window/tab of mygb application and open/refresh the "Admin" main link page. All previous entries might be listed as below.


The admin page above provides almost complete basic database item handling functions on guestbook data entries. The admin can dynamically sort the entries based on a single field by clicking the field names displayed at the header row of the list. The list result can also be filtered by using the combination of selected field names (nickname, email, and wmf_date_created). At the "Selections & Operation" column, items can be selected and then proceeded with the "Update" or "Delete" operation links.

Click the "Insert" operation link and the form page for multiple row items insert support will be displayed as below.


As shown above, at the bottom of the form page there is "Upload Text File" link that provide support to insert multiple row of items from single text-based file. Click the "Upload Text File" link and then set the previously saved gb_archive.txt file as the text-based file to be used. Below is the form page that might be displayed regarding to this particular task.


Click the "Upload" button to start extract the content of gb_archive.txt file for the purpose of multiple row items insert operation. The list of item-rows extracted from the file should be displayed in the confirmation page as shown below.


Slide down until reach at the bottom of the confirmation page. The "_status_" column of each rows should display "Ok" status means that the items to be inserted are still not exist in the current table of the list. Do remember that in sub-section 8.1, the combination of nickname, wmf_date_created, and wmf_time_created fields are used as the key-fields for text-based input service to unqiuely identifies item entries from inside the table.


At the bottom of the confirmation page click the "Confirm" button to proceed the insert operation. After the insert operation complete the page will redirect back to the main page of the list. New row of entries extracted from the gb_archive.txt file should now be displayed inside the main list page as shown below.


With the current number of list entries do try to explore and experiment all the available functions provided by the admin page. Don't worry to lose some of the entries since you can easily loaded it back from the gb_archive.txt backup text file.