- EN
- PT-BR
Create a Sling Model for an AEM component called "Sample V1" that displays a title and description. The title field must be required and of type textfield. The description field is optional and of type RickText. Make sure it supports adaptive Resource and Request.
Core module:
sample/v1: Create a package called sample in the path core\src\main\java\com\sample_project_aem_cloud\core\models\
SampleImpl.java: A Java class in the package core\src\main\java\com\sample_project_aem_cloud\core\models\sample\v1 that fetches a title and description from a content node and makes them available to the HTML template. Make sure it supports adaptive Resource and Request.
Create an AEM HTL component named Sample V1 that renders a title and description. The title field must be required and of type textfield. The description field is optional and of type RickText. Provide the necessary files with appropriate file names for the component, _cq_dialog configuration, _cq_template configuration, _cq_design_dialog, and _cq_editConfig.
Ensure the following structure in the ui.apps Module:
sample/v1/sample/sample.html: An HTML file that displays the title and description, using HTL elements.
sample/v1/sample/_cq_dialog/content.xml: Create a dialog for a title and description field.
sample/v1/sample/_cq_editConfig/content.xml: Create the editConfig to update the page when adding, editing, and deleting the component on the page.
sample/v1/sample/_cq_template/content.xml: Create cqTemplate with sample data for title and description
sample/v1/sample/_cq_design_dialog/content.xml:
sample/v1/sample/.content.xm: Component definition
Prompt 1:
Crie um Sling Model para um componente AEM chamado "Sample V1" que exiba uma título e uma descrição. O campo título deve ser obrigatório e do tipo textfield. O Campo descrição é opcional e do tipo RickText. Garanta que ele suporte Resource e Request adaptáveis.
Módulo core:
Crie um componente AEM HTL chamado Sample V1 que renderize um título e uma descrição. O campo título deve ser obrigatório e do tipo textfield. O Campo descrição é opcional e do tipo RickText. Forneça os arquivos necessários com nomes de arquivo apropriados para o componente, configuração de _cq_dialog, configuração _cq_template, _cq_design_dialog e _cq_editConfig.
Garanta a seguinte estrutura no Módulo ui.apps:
sample/v1/sample/sample.html: Um arquivo HTML que exiba o título e a descrição, usando elementos HTL.
sample/v1/sample/_cq_dialog/content.xml: Crie um dialogo para um campo title e description.
sample/v1/sample/_cq_editConfig/content.xml: crie o editConfig para atualizar a página ao adiconar, editar e excluir o componente na página.
sample/v1/sample/_cq_template/content.xml: crie o cqTemplate com dados exemplos para título e descrição
sample/v1/sample/_cq_design_dialog/content.xml:
sample/v1/sample/.content.xm: definição do componente
sample/.content.xml: definição de uma folder, ou seja, sling:folder