Uploaded image for project: 'Click'
  1. Click
  2. CLK-382

Add ability to safely detect if Context is available on ContextStack

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.5 M1
    • 1.5 M2
    • core
    • None

    Description

      If is not currently safe to access Context in a Control constructor since Click could instantiate the Control during resource deployment phase. Context is not available during deployment phase.

      Invoking Context.getThreadLocalContext throws exception if a Context is not on the stack.

      We should add a static query method that detects if Context is available or not. This provides us the ability to use Context in the Control constructor, as long as we check if Context is available or not.

      Attachments

        Activity

          People

            sabob Bob Schellink
            sabob Bob Schellink
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: