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

Set Request Cycle in ThreadLocal

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.0 branch (discontinued), 1.3.0-beta1
    • wicket
    • None

    Description

      I want to request a static set method on RequestCycle to set the cycle in the current ThreadLocal, so that Wicket can create components and such in a different thread than where the HTTP request entered.
      Without this a WicketRuntimeException("Can not set the attribute. No RequestCycle available") is thrown from the Session.setAttribute method.

      Suggested implementation:
      public static void set(RequestCycle cycle)

      { current.set(cycle); }

      This is similar to the static set methods for Session and Application.

      This method can also be protected if desired.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            smellycat Robert
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment