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

Remove 'final' keyword from method AbstractResource#respond

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.5.3
    • 1.5.4, 6.0.0-beta1
    • wicket
    • None

    Description

      I need a transactional layer between the method call newResourceResponse(attributes); and data.getWriteCallback().writeData(attributes); cause the ResourceResponse holds a transactional reference which can not be closed until the data.getWriteCallback().writeData(attributes); was called. At this moment there is no ability to do such transactional handling.

      For now I have a workaround with a DelegateResource which calls a sendReseponse method inside the respond method

      public void sendResponse(final ResourceResponse resourceResponse)
        {
            final AbstractResource resource = new AbstractResource()
            {
      
              @Override
              protected ResourceResponse newResourceResponse(final Attributes attributes)
              {
                return resourceResponse;
              }
            };
      
            resource.respond(attributes);
        }
      

      Attachments

        Activity

          People

            pete Peter Ertl
            hbmann Hauke Rabe
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: