Uploaded image for project: 'Struts 2'
  1. Struts 2
  2. WW-2498

Avoid NPE when parseContent attribute is missing on dojo tags/context

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.1.1
    • 2.1.1
    • Plugin - Dojo Tags
    • None
    • Patch

    Description

      If the Head.PARSE_CONTENT is not available in the context the relevant Dojo tag throws a NPE.
      Undoubtedly users will frequently forget to set parseContent on the page's head tag, or on the respective widget tag so this patch provides default handling for the case where parseContent is null.

      The objective of this patch is to reduce the potential for support queries regarding the NPE within struts 2.

      The patch is the equivalent to WW-2398 only the affected code is repeated in Tree, TabbedPanel, Autocompleter, Submit, TreeNode, DateTimePicker and TextArea

      See also dev discussion: http://www.mail-archive.com/dev@struts.apache.org/msg30811.html

      Attachments

        1. dojoPluginParseContent.patch
          8 kB
          Jeromy Evans

        Issue Links

          Activity

            People

              jeromy Jeromy Evans
              jeromy Jeromy Evans
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: