Solved
While Creating SPA Component Model cant get data into json of other method apart of Injected
In my en.model.json I can't fetch data from the method which doesn't have any inject or @9944223
For the below sample code In en.model.json queryedData is not coming up
@Model(adaptables = SlingHttpServletRequest.class, adapters = { SampleModel.class,
ComponentExporter.class }, resourceType = SampleModel.RESOURCE_TYPE, defaultInjectionStrategy = DefaultInjectionStrategy.OPTIONAL)
@Exporter(name = ExporterConstants.SLING_MODEL_EXPORTER_NAME, extensions = ExporterConstants.SLING_MODEL_EXTENSION)
public class SampleModel {
private static final Logger log = LoggerFactory.getLogger(SampleModel.class);
static final String RESOURCE_TYPE = "aem-example/components/sample";
@ValueMapValue
@14766979
private int count;
@ValueMapValue
@14766979
private String path;
public List<String> queryedData(){
List<String> abc = new ArrayList<>();
abc.add("Sample");
abc.add("Return");
return abc;
}
}
In en.model.json queryedData is not coming up