i think a possibility to pass additional parameters to sling components included by sling:include or SlingRequestDispatcher would be helpful.
example: <sling:include path="content" resourceType="/apps/xxx/parsys"> <sling:parameter name="allowedComponents" value="/apps/xxx/component1,/apps/xxx/component2,/apps/xxx/component3"/> <sling:parameter name="css-class" value="section"/> <sling:parameter name="custom-object" value="<%=referenceToACustomObject%>"/> </sling:include> internally, the parameters could be collected in the RequestDispatcherOptions instance, and passed via request attribute to the including component. a convenience class or new methods in an existing interface like SlingHttpServletRequest can provide access to a map of "IncludeParameters". of course, an application can do this already today by setting request parameters manually to pass them to the component. but this has a drawback: the application has to ensure to clean up the request parameters after the component was rendered. and there is no defined "contract" how to pass include parameters to a component. one could argue that sling components should only "parameterized" using existing sling capabilities like selectors and extensions, perhaps suffixes. but these capabilities are somewhat limited when passing complex parameter values or even object references as shown in the example above. WDYT? stefan
