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

Add ability to safely detect if Context is available on ContextStack

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.5 M1
    • Fix Version/s: 1.5 M2
    • Component/s: core
    • Labels:
      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.

        Activity

        Hide
        sabob Bob Schellink added a comment -

        fixed in trunk.

        Show
        sabob Bob Schellink added a comment - fixed in trunk.

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development