How to get wcmmode from the class using @Model(adaptables=Resource.class in AEM 6.3
In AEM 63, I created a class using sling model adaptables to Resource.class instead of SlingHttpServletRequest.class because I need to use this method to get MyComponent myComponent = resourceResolver.getResource(myComponentPath), it doesn't work if adaptables=SlingHttpServletRequest.
My question is how to get wcmmode from this MyComponent.class? or get the request from this class?
Thanks.