Uploaded image for project: 'Spring Web Flow'
  1. Spring Web Flow
  2. SWF-937

Decorating by ValidateAllDecoration non existing element causes js error with no console help.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0.4
    • Fix Version/s: 2.0.5
    • Component/s: JavaScript
    • Labels:
      None

      Description

      In ValidateAllDecoration when we did not found element there is js exception without console error.

      It is in apply function:

      var element = dojo.byId(this.elementId);
      this.originalHandler = element[this.event]; // here element is null

      You can reproduce it as exercise 9 in Developing Rich Web Applications with Spring training

      <button id="searchButton">${findLabel}</button> <!-- I want decorate this button -->
      <script type="text/javascript">
      Spring.addDecoration(new Spring.ValidateAllDecoration(

      { elementId : "searchButtona", <!-- here I make mistake --> event : 'onclick' }

      ));
      </script>

        Attachments

          Activity

            People

            Assignee:
            jeremyg484 Jeremy Grelle
            Reporter:
            pedrowaty Sebastian Pietrowski
            Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: