Skip to content
This repository has been archived by the owner on Nov 23, 2021. It is now read-only.

AemComponent

Daniel Madejek edited this page Jul 13, 2016 · 3 revisions

AEM Component in authoring

Introduction

In Bobcat we can create a PageObject which represents component that can be added from AEM Sidekick and that can be used in AemParsys

Sample class

This is fragment of ImageComponent.class - it represents Image from Geometrix

Image in Sidekick

(...)
@PageObject
@AemComponent(cssClassName = "image", group = "General", name = "Image")
public class ImageComponent {

  @Inject
  private AemDialog dialog;

  @DialogField(css = ".cq-smartfile-_46_47file")
  private AemImage image;
(...)  
}

@AemComponent

@AemComponent(cssClassName = "image", group = "General", name = "Image")

This annotation allows to mark which component is represented by this class. Thanks to it it can be used by AemParsys

  • cssClassName - css class which this component has when put in parsys
  • group - component group
  • name - name of component

##AemDialog

@Inject
private AemDialog dialog;

This field gives access to component dialog

##DialogField

@DialogField(css = ".cq-smartfile-_46_47file")
private AemImage image;

This gives access to field in dialog

Dialog and dialog field

Getting started with Bobcat

  1. Getting started

AEM Related Features

  1. Authoring tutorial - Classic
  1. AEM Classic Authoring Advanced usage
  1. Authoring tutorial - Touch UI
Clone this wiki locally