@via annotation and adaptable attribute in model
I have read so many threads regarding @via and adatbale but still not sure whats the correct answers : if anyone can give clear picture on this
1) first question is when we use ????????????????????????????????
a) @Model(adaptables = SlingHttpServletRequest.class) or
b) @Model(adaptables =Resource.class)
Answers I found when need to do deal with resource properties use a) and when reuire sling objcet then go fr 2nd )
2)
@Inject
page currentPage ...is working in both condition how ?
or we have to use like below
@Model(adaptables = SlingHttpServletRequest.class)
@Inject
@Via("resource")
private PageDecorator currentPage;
3)
(adaptables=SlingHttpServletRequest.class) public interface MyModel {
// will return request.getResource().getValueMap().get("propertyName", String.class)//that is exactly mean by via resource
("resource") String getPropertyName(); }
in the same context what does it mean by via request:??????????????????
and how it will get called if we do
????????????
(adaptables=Resource.class)
@Inject @Via(request)
Resource resource;
4) if we use @Model(adaptables =Resource.class)
cant we inject request response currentdesgin and all other sling object ?????????????????
@inject @via(request)
SlingHttpServletrequest request;
p.s. i have checked all article and pages related to sling model available out there ...
wat are the senerio when we have to use @via("request") and @via("resource")

