Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-6346

Exporter always return null if related sling model is adapted from SlingHttpServletReqeust

    XMLWordPrintableJSON

Details

    Description

      The new exporter feature for Sling Models always return null if the adaptables is set to SlingHttpServletReqeust for the relevant Sling Model.

      Example:

      @Model(adaptables = SlingHttpServletRequest.class,
             adapters = TestModel.class,
             resourceType = "core/wcm/components/test")
      @Exporter(name = "jackson",
                extensions = "json")
      public class TestModel {
      
          @ValueMapValue
          private String test;
      
          public String getTest() {
              return test;
          }
      }
      

      Issue will be fixed with:
      https://github.com/apache/sling/pull/187

      Attachments

        Issue Links

          Activity

            People

              justinedelson Justin Edelson
              bupauli Burkhard Pauli
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: