More Related Content
Similar to Sightly - AEM6 UI Development using JS and JAVA (20)
Sightly - AEM6 UI Development using JS and JAVA
- 2. Sightly is HTML5
• Expression Language ${ }
• Data Atrributes (data-sly)
• Adding a script
• <div data-sly-include=”footer.jsp”/>
- 6. data-sly
• use
• include
• resource
• list
• unwrap
• test
• text
• attribute
• element
• template & call
- 7. WCMUse
• activate
• getPageManager
• getCurrentPage
• getPageProperties
• getProperties
• getCurrentStyle
• getResourceResolver
• getRequest
• getResponse
• getSlingScriptHelper
- 8. Key Pointers
• Sightly is not OSGi
• @Component, @Reference et. al. will not work
- 10. Adding a Component
• <div data-sly-resource=”${‘topnav’ @
resourceType=’training/components/
topnav’}”></div>
- 14. i18n
• create a dictionary (no change)
• In sightly code: ${‘today' @i18n}
- 15. Sling Models
• @Model(adaptables=Resource.class)
public class SomeModel {
@Inject
private String propertyName;
}
• SomeModel model = resource.adaptTo(SomeModel.class)