r9 - 01 Feb 2007 - 18:24:37 - ChristianFoliniYou are here: TWiki >  Main Web > Task14Start

Task14Start - Do CRUD for table request

See TasksExplained? for more infos about tasks. This task is based on the template at TaskTemplateStart

Status : closed
Category : gui
Date opened : 2007-01-25
Description : Create, read, update and delete for table request
Referenced in stories/tasks : WebStatistics Story6Start Task15Start
Testsuite : test/functional/main_controller_test.rb, test/integration/user_story6_test.rb
Commited revision : 70

Remarks :

  • See Task13Start for table scheme.
  • crud should work without javascript too.

Table of contents

Changelog

2007-01-25 - started

  • Managed to get the list displayed and update the detailarea.
  • When loading the page, the first item in the table, order by weight, is being displayed in the rules detailarea.
  • The element selected is being highlighted thanks to rjs call: page.call 'Element.addClassName', 'element_id', 'class_name'

Do not forget to remove the requestcrud code before closing this task.

2007-01-26 - read / display is working

2007-01-29 - update request works

Additionally i did the functional tests up to this code level.

2007-01-30 - a concept for the detailarea

The detailarea for the request comes in multiple stages.

Empty / Creating new request

There is no detail request on display. No request highlighted on request list.

Buttons: Add Request
Possible Paths out of this stage: Click Add and get to the display existing request
Entry paths: Button Clear

Display existing request

Detail request is displayed. Request is highlighted in request list.

Buttons: Clear, Update Request, Delete Request Possible Paths out of this stage: Clear: -> Empty; Update: -> same form; Delete: -> Empty
Entry paths: Button Clear

How to determine which action to take when the submit button is clicked

We have to set a flag. I'll call it actionflag.

Values:

  • clear : empty detailarea, make it ready for entering new request
  • add : add request has been clicked
  • save : save/update has been clicked
  • delete : delete has been clicked

2007-01-31 - CRUD done, tests too

I did functional and integration tests of the advanced form:

     colin = regular_user
   colin.clicks_clear
   colin.adds_request("GET", "/index.html", 1001)
   colin.adds_request("POST", "/index.php", 1002)
   colin.adds_request("GET", "/index.cgi", 1003)
   colin.adds_request("GET", "/start.html", 1004)
   colin.requests_detailarea(4)
   colin.requests_detailarea(3)
        ...

The CRUD does not work without javascript so far as the detailarea has to have multiple submit buttons, that overwrite an action flag when being clicked. It would be very tricky to change this behaviour.

2007-02-01 - Ajax added

The basic operations on the request item all come with ajax now. Tests done too. Closing the task.

TaskStati
TaskStatus? closed
Task-Categories gui
Edit | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r9 < r8 < r7 < r6 < r5 | More topic actions
Main.TaskTemplateStart moved from Main.TaskTemplate on 19 Jan 2007 - 12:41 by ChristianFolini
 

No permission to view WebTopBar?

No permission to view WebBottomBar?