



Import =, defaultInjectionStrategy = DefaultInjectionStrategy.OPTIONAL) Annotations is a feature that Adobe CQ5 provides in Editor Mode, it allows the author to write a note on a component so the other authors or himself/herself. Import .annotations.DefaultInjectionStrategy Here's the sample class in that first link that shows the "message" which needs data from the Resource (first and last name) and data from the Request (path): package In that example it creates a model that needs to read some values from the resource and others from the request, so the adaptable you would use depends on what values you need within your model. So whether you use one adaptable or the other (or both at once) depends on what you need in your model. Which are automatically mapped from Sling objects, typically "Many Sling projects want to be able to create model objects - POJOs Click or tap the required component (components that can be annotated will be highlighted with a blue border) to add the annotation and open the dialog: Here you can use the appropriate field and/or icon to. SlingHttpServletRequest object (where you don’t want to create a Click or tap the Add Annotation icon (plus symbol at the left of the toolbar) to start adding annotations. "There are use cases where you may need to get a Request object insideĪ Sling Model or you want to adapt your Sling Model using a
