Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-1011

wicketShow and wicketHide don't check for existence of element before setting display

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.2.6
    • 1.3.0-rc1
    • wicket
    • None

    Description

      If for some reason the element doesn't exist, wicket throws a javascript exception. This can happen if using an ajaxindicatingfallbacklink in an element that gets removed.

      For instance, if you have a list of items that you want to delete via ajax, and you have a delete button on each with an indicator, when the item is successfully deleted, the call to hide the indicator throws an exception. This seems like it should work without an error, and would be easily avoided with a simple check that e exists. Something like the following would be really easy:

      function wicketHide(id) {
      var e=wicketGet(id);
      if ( e )

      { e.style.display = "none"; }

      }

      Attachments

        Activity

          People

            knopp Matej Knopp
            iragsdale Ian Ragsdale
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: