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

sling:include should allow override of resource type

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3
    • Component/s: Scripting
    • Labels:
      None

      Description

      when including an existing resource either via path or resource attribute it should be possible to force creation of a synthetic resource by specifying a different resourcetype.

      1. includetaghandler2-r618638.patch
        3 kB
        Tobias Bocanegra
      2. includetaghandler-r618638.patch
        2 kB
        Tobias Bocanegra

        Activity

        Hide
        tripod Tobias Bocanegra added a comment -

        implements suggested improvement

        Show
        tripod Tobias Bocanegra added a comment - implements suggested improvement
        Hide
        bdelacretaz Bertrand Delacretaz added a comment -

        The SlingDispatcher already has an OPT_FORCE_RESOURCE_TYPE option, to force a resource type on the included Resource, while avoiding the creation of a SyntheticResource which has much weaker semantics.

        I'll have a look at that, create some tests and fix it if needed - the implementation at the taglib level should then be trivial.

        Show
        bdelacretaz Bertrand Delacretaz added a comment - The SlingDispatcher already has an OPT_FORCE_RESOURCE_TYPE option, to force a resource type on the included Resource, while avoiding the creation of a SyntheticResource which has much weaker semantics. I'll have a look at that, create some tests and fix it if needed - the implementation at the taglib level should then be trivial.
        Hide
        bdelacretaz Bertrand Delacretaz added a comment -

        Implemented in revision 618697, but at the SlingHelper helper, and tested via ESP in the launchpad-webapp integration tests.

        Leaving this issue open as this might not completely solve your problem, but at least the ScriptHelper now supports the "force resource type" option in include methods.

        Show
        bdelacretaz Bertrand Delacretaz added a comment - Implemented in revision 618697, but at the SlingHelper helper, and tested via ESP in the launchpad-webapp integration tests. Leaving this issue open as this might not completely solve your problem, but at least the ScriptHelper now supports the "force resource type" option in include methods.
        Hide
        tripod Tobias Bocanegra added a comment -

        fixes uses the request dispatcher option OPT_FORCE_RESOURCE_TYPE instead of synthetic resource.

        Show
        tripod Tobias Bocanegra added a comment - fixes uses the request dispatcher option OPT_FORCE_RESOURCE_TYPE instead of synthetic resource.
        Hide
        fmeschbe Felix Meschberger added a comment - - edited

        Applied the secon patch creating the dispatcher options instead of the synthetic resource.

        Fixed in Rev. 618955.

        Please close, if this fixes your issue. Thanks.

        Show
        fmeschbe Felix Meschberger added a comment - - edited Applied the secon patch creating the dispatcher options instead of the synthetic resource. Fixed in Rev. 618955. Please close, if this fixes your issue. Thanks.
        Hide
        tripod Tobias Bocanegra added a comment -

        thanks

        Show
        tripod Tobias Bocanegra added a comment - thanks

          People

          • Assignee:
            fmeschbe Felix Meschberger
            Reporter:
            tripod Tobias Bocanegra
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development