wiki:AjaxEditorControlsAndValidation

Version 15 (modified by ticheler, 16 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: add new tabs to Advanced editor: 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

  • Vote proposed : 20090326
  • Vote passed: 20090328
    • Jeroen Ticheler +1
    • Andrea Carboni +1
    • Patrizia Monteduro +1
    • Emanuele Tajariol +1
    • Francois Prunayre +1
    • Simon Pigot +1
    • Archie Warnock +1

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' or 'check' or a different tab is selected – this allows the 'reset' button to work more closely to what the user might expect.
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 XSD validation errors can be obtained through a callback and supplied to the editor to display alongside the appropriate elements.
4. Additional advanced editor/viewer tabs for ISO19139: It is possible to use the GeoNetwork xslts in the advanced editor & viewer to provide some other views of the metadata record (ie. alternatives to the packages of metadata such as 'Identification'). The proposal is to add three additional tabs (as useful examples) to the 'Advanced' editor/viewer for ISO19139:

  • Minimum - display only the elements that the standard says are mandatory - see minimumview.png in the attachments for an example of how this will look (viewer)
  • Core - display the elements that the standard says are the core elements for a geographic dataset (table 3 in the 19115 standard) - see coreview.png in the attachments for an example of how this will look (viewer)
  • All - display all the elements in the metadata record

Each of these tabs is intended to show a particular set of elements in the metadata record. In the case of Minimum and Core, if an element that either of these tabs expects to find is missing, then the viewer will say that the element is 'missing'.
5. 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. Two services have been implemented in the BlueNetMEST sandbox that provide these metadocuments to support external editors:

  • 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

Risks

Participants

  • As above

Attachments (2)

Download all attachments as: .zip

Note: See TracWiki for help on using the wiki.