Hi, is it somehow possible to inject both a resource and a request where the request is optional and should not break injection when not available?
@Model(adaptables = {Resource.class, SlingHttpServletRequest.class})
public class MyModel {
@Inject
private Resource resource;
@Self
@Optional
private SlingHttpServletRequest request;
}
In my case injection fails with SlingHttpServletRequest not adaptable from
JcrNodeResource.
Thanks,
O.
