Uploaded image for project: 'Tapestry'
  1. Tapestry
  2. TAPESTRY-1476

Component events for input translation and validation

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.0
    • Fix Version/s: 5.0.7
    • Component/s: None
    • Labels:
      None

      Description

      It seems to me we could leverage the existing component event hierarchy to allow for tightly customized input translation and parsing.

      I would propose three component events:

      "toclient" : corresponds to Translator.toClient(). Passed an object as the context (possibly null), result must be a String.

      "parseclient": corresponds to Translator.parseClient(). Passed a string as the context, returns an object or throws ValidationException.

      "validate": corresponds to Validator.validateInput(). Passed an object (provided by the translator). No return value. May throw ValidationException.

      We'll have to come up with a better mechanism for allowing event handler methods to throw an exception. Currently, I suspect, that you would get Javassist compile errors if you try!

        Attachments

          Activity

            People

            • Assignee:
              hlship Howard M. Lewis Ship
              Reporter:
              hlship Howard M. Lewis Ship
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: