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

AbstractWebSocketProcessor.onClose() rewrites possibly wider processed and stored touchedPages to only Page itself

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Cannot Reproduce
    • 8.0.0, 7.7.0
    • None
    • Java 8, Tomcat 8.5.6, Firefox 53.0.2, Wicket 7.7.0 (most probably 8.0.0 affected as well by seeing just code)

    Description

      scenario:

      • When setResponsePage(new NewResponsePage(customParams)) is called e.g. within AjaxLink.onClick() on a Page
      • and default RenderStrategy.REDIRECT_TO_BUFFER is used
      • PersistentRequestAdapter.storeTouchedPages() stores (Page and NewResponsePage) to pageStore and as setSessionAttribute()
      • unfortunatelly AbstractWebSocketProcessor.onClose() touch and stores only a Page (on the same session attribute)

      problem:
      A new request on NewResponsePage always instantiate NewResponsePage (once we using custom NoOpPageStore implements IPageStore)

      solutions:

      1. restrict ourselves to default constructor with PageParams
        • BUT when trigerring AjaxLink.onClick() on NewResponsePage newly instantiated (button) component within Border could not be found (because of queueToBorder feature)
      2. use 1 + RenderStrategy.REDIRECT_TO_RENDER
        • solves the previous BUT
        • less performing (and a lot of code changes we wanna avoid)
      3. use DefaultPageManagerProvider
        • less performing (we wanna avoid)
      4. swallow onClose broadcast
        • a bit hard with wicket-native-websocket-javax package
        • could there be some support for that?
      5. some other easier solution - any idea?

      Attachments

        Issue Links

          Activity

            People

              mgrigorov Martin Tzvetanov Grigorov
              honzik Jan Cerny
              Votes:
              4 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: