wiki:AjaxEditorControlsAndValidation

Version 9 (modified by simonp, 15 years ago) ( diff )

--

Proposal number : ? Proposal title : Ajax Editor Controls and Editor Enhancements

Date 2009/03/23
Contact(s) Simon Pigot
Last edited Timestamp
Status draft - complete in BlueNetMEST sandbox
Assigned to release 2.4
Resources Available

Overview

  1. Ajax techniques on existing editor controls (add, delete, up, down) and buttons
  2. Enhance file upload - separate file upload submit from editor submit, sanitize filenames, avoid overwriting existing files, display file size
  3. XSD validation messages available as controls on elements as well as in report screen
  4. Tooltips only display when title is clicked on - avoids clutter and server round trips
  5. Change presentation tabs: replace simple mode with Minimum, Core, All elements as per ISO standard document
  6. Trap window close using onbeforeunload event to warn users that they may lose any edits made
  7. Services to support external editors such as that described in the geonetworkui proposal

Proposal Type

  • Type: User interface and core functionality additions
  • App: GeoNetwork
  • Module: DataManager (support new services), EditLib (enhancements), Metadata Services, Jeeves, metadata XSLTs
  • Enhancements to Jeeves to support changes to file upload, XSD validation exception and passing validation errors to GeoNetwork
  • Services for external editors eg. such as that in the XForms editor proposal UserCentricGUI
  • This has been available in the BlueNetMEST sandbox for some time - tested by users in the BlueNet project
  • Subset of EditorEnhancements originally drafted in June 2008

Voting History

  • None yet

Motivations

The current GN editor is a generic – its interface is built by parsing a set of XSDs, combining this info with the XML document to produce a metadocument, then rendering the XML using the metadocument as an HTML form. The rendering is done by XSLT and a small amount of javascript. It works with almost any schema that GN can parse.

The motivation for this proposal is to improve interactivity and functionality of the GN generic editor. At the same time it is clear that a generic editor is not suitable for everyone and that GN needs to support alternatives. The second motivation for this proposal is to support external editors – one way this can be done is to permit serviced-based access to the metadocument format used by the GN generic editor.

Proposal

Some Component descriptions:

1. Store XML + XSD info (the metadocument) in the session – operations maintain the metadocument until save.

  • Add button – server builds only the element to be added, returns it via Ajax call to the javascript which adds it into the form.:
  • Delete button – server removed element and returns geonet:child via Ajax call to the javascript which adds it to the form.:
  • Up/Down – server swaps elements, Ajax swaps elements in the form and controls.:

2. Editor form is not submitted until save/save and close/check – allows reset button to really work as required.
3. XSD validation messages available to the editor as alert controls – schematron error messages are already available via an additional icon. The JDOM elements involved in validation errors can be obtained through a callback on validation.
4. No single editor can satisfy all users. An example of a plug-in GUI that replaces both the javascript layer and the XSLT layer used for the editor is the current Xforms based editor proposal (see UserCentricGUI). This editor runs external to GN (in Orbeon Xforms) and uses GN services to retrieve selected metadata documents plus editing information from GN's XSD parser, combined as a metadocument. Currently, after this editor has finished with the document, it is stored external to GN. However, the document could be returned to GN using any of the services GN currently provides.

Two services are planned (and available for development in the BlueNet MEST):

  • xml.metadocument.get?uuid=<uuid> - a service to retrieve the initial XML document plus XSD based editing information (a metadocument)
  • xml.metadocument.snippet?parent=<parent_element_name>&child=<child_element_name>&schema=<schema_name> - a service to retrieve elements not in the initial XML metadocument (a 'snippet' = a small piece of something)

Backwards Compatibility Issues

Simple mode is set to disappear....

Risks

Participants

  • As above

Attachments (2)

Download all attachments as: .zip

Note: See TracWiki for help on using the wiki.