I'm thinking of developing an extension to htmlobject
called Easy or Ajax that aids in development. Perhaps
it would support both ajax and non ajax modes.
* template, profile, data, list, baseurl would all be
specified as part of the object
* for ajax mode the UI would be one page with multiple
forms in divs that are hidden/shown
* the superclass would output the edit form generated
from all of this into a div called 'edit'
* the list of data to work on would be output into a
div called 'list'
* under the list would be the buttons: new, and delete
* next to each list item would be a delete checkbox
* each list item will be a link to edit that item
* user can fill in the form and click Submit button
* after the user has entered the data the profile will
be used to validate it with js regex.
* After validation the js code will make another
httpmxl_request call to the backend to submit the data.
the backend will also validate with the same regexp
from profile bc the user could always disable js and
push back anything
* a return code will be sent to the callback with the
action (new, edit/update, delete) and success or
failure with a reason for the failure
* Upon success of new data sent to the backend, the
edit form is blanked and the item is added to the list
- a problem here is what format is the list in vs
what format would be taken from the new data?
- this may require a form element to be added called
list description
* or user clicks a link to edit an entry
-the js code will call the backend to get the data
with httpxml_request and push it into the form in the
edit div. It may also cache the data in xml on the
client side
* upon successful edit, the form is blanked and the
list item is updated
* delete code uses js confirm dialog for verification
* delete pushes list of ids to backend using
httpxml_request. response from server is success or
failure with reason
* after successful delete those items deleted are
removed from the list using dom