How to get session inside slingmodel



Dear All,


I have one requirement like below. When Author will put the SKU Id in dialog , as shown in below,



After author will put the SKU Id (for example 12345) , then this ID will search in content/dam/site/skuid folder and the document where this sku id is attached will come as link .


I am trying to do this logic inside

private void initModel() throws Exception {


But , I am not getting any session "or" resource inside  initModel().


Can anybody tell me how can I achieve the above scenario ?

View Entire Topic