This repository has been archived by the owner on Nov 23, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 40
Working with parsys
Mikołaj Mański edited this page Jul 29, 2016
·
1 revision
We can get any parsys by providing it's data-path HTML attribute to the AuthorPage#getParsys
method which is implemented as shown below:
public Parsys getParsys(String dataPath) {
String path = DataPathUtil.normalize(dataPath); // discard the numeric appendix if present
return parsyses.stream() //
.filter(parsys -> StringUtils.contains(parsys.getDataPath(), path)) //
.findFirst() //
.orElseThrow(() -> new IllegalStateException("Parsys not found"));
}
Using parsys we can insert a component into it or delete it from there. When it comes to components, the methods that are responsible for handling them are also using ther data-paths. This is the implementation of Parsys#getComponent
method:
public Component getComponent(String dataPath) {
String componentDataPath = DataPathUtil.normalize(dataPath); // discard the numeric appendix if present
return componentList.stream() //
.filter(containsDataPath(componentDataPath)) //
.findFirst() //
.orElseThrow(() -> new IllegalStateException("Component not present in the parsys"));}
If youw want to know more about Data paths please refer to the Component descriptions tutorial.
- Configuring Bobcat
- Selenium enhancements
- Cucumber enhancements
- Traffic analyzer
- Email support
- Reporting
- Cloud integration
- Mobile integration
- Executing tests on different environments
- Working with multiple threads
- Tips and tricks
- Authoring tutorial - Classic
- AEM Classic Authoring Advanced usage
- Siteadmin
- Sidekick
- Aem Component
- Working with author pages
- Working with Publish pages
- Advanced component interactions
- Working with Context Menu
- Using Aem Content Tree
- Aem Content Finder
- Storing component configurations
- Working with packages
- Jcr Support
- Authoring tutorial - Touch UI
- Adding and editing a component
- Sites management tutorial