Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.
SOLVED

Restricting the Core Components

Avatar

Level 2

Hello Community Team,

We are using Adobe Experience Manager v6.5.20 and the customer ask is to restrict the number of characters the Author can add in different components like Text Component, Title Component etc. Also, the customer expectation is to get rid of unwanted checkboxes or fields which are not required for the content author to manage.

 

Since we know all these properties in the core components like Checkboxes, ID field etc comes out of the box and it is not recommended to modify them. Also we are creating custom components by extending the core components and also we are adhering to Adobe's recommendations to use core components whereever its possible.

 

In this situation, is it recommended to provide restrictions to the number of characters to the components.

Is it recommended to get rid of all the properties which are not necessary for authoring etc.

 

Your response would be greatly appreciated.

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @subrahmanyamj ,

In Adobe Experience Manager (AEM), it's generally recommended to follow best practices and guidelines provided by Adobe to ensure system stability, maintainability, and compatibility with future updates. Here are some considerations regarding your questions:

Restricting the Number of Characters:

  1. Text Components: You can enforce character limits for text components by using client-side validation or custom scripts. However, it's important to communicate these restrictions clearly to authors and provide meaningful error messages when the limits are exceeded.

  2. Title Components: Similar to text components, you can enforce character limits for titles using client-side validation or custom scripts.

Removing Unwanted Properties:

  1. Core Component Extension: If you're extending core components to create custom components, you have the flexibility to modify or remove properties that are not required for your specific use case. This approach allows you to tailor components to your project's needs while still benefiting from the core functionality provided by AEM.

  2. Adobe's Recommendations: While Adobe recommends using core components whenever possible, they also understand that customization may be necessary to meet specific requirements. As long as you carefully consider the implications of removing or modifying core component properties and thoroughly test your customizations, it's acceptable to make changes as needed.

Best Practices:

  1. Documentation: Clearly document any customizations or restrictions applied to core components for future reference and maintenance.

  2. Compatibility: Ensure that your customizations remain compatible with future AEM updates by following Adobe's upgrade guides and testing your components after each upgrade.

  3. User Experience: Keep the user experience in mind when implementing restrictions or removing properties. Striking a balance between simplicity for authors and flexibility for content creation is key.

  4. Testing: Thoroughly test your custom components and any associated restrictions to ensure they function as expected in different scenarios.

By carefully considering these factors and adhering to best practices, you can effectively implement restrictions on core components and customize them to meet your project's requirements in AEM.

View solution in original post

4 Replies

Avatar

Level 6

yes, we can customise it by extending core components and restricting the fields that are not required as per the requirement and we can also limit number of characters for text box or title by using maxLength property of type long .

 

To hide particular field from core components in custom component use 

 sling:hideResource="{Boolean}true"

 for this property for the field.

Avatar

Community Advisor
 
Hi,
 

Yes, it is totally fine, and actually, it is expected to update the core components based on your requirements. This must be done through the proxy pattern: Proxy Component Pattern. With this approach, you can simply use Sling Resource Merger to hide any field that is not necessary. You could also add custom validation for any field in the dialog that you need. Please check these resources: AEM Touch UI Dialog Validation: New Best Practice and AEM Dialog Validation.

 

Hope this helps!

 



Esteban Bustamante

Avatar

Correct answer by
Community Advisor

Hi @subrahmanyamj ,

In Adobe Experience Manager (AEM), it's generally recommended to follow best practices and guidelines provided by Adobe to ensure system stability, maintainability, and compatibility with future updates. Here are some considerations regarding your questions:

Restricting the Number of Characters:

  1. Text Components: You can enforce character limits for text components by using client-side validation or custom scripts. However, it's important to communicate these restrictions clearly to authors and provide meaningful error messages when the limits are exceeded.

  2. Title Components: Similar to text components, you can enforce character limits for titles using client-side validation or custom scripts.

Removing Unwanted Properties:

  1. Core Component Extension: If you're extending core components to create custom components, you have the flexibility to modify or remove properties that are not required for your specific use case. This approach allows you to tailor components to your project's needs while still benefiting from the core functionality provided by AEM.

  2. Adobe's Recommendations: While Adobe recommends using core components whenever possible, they also understand that customization may be necessary to meet specific requirements. As long as you carefully consider the implications of removing or modifying core component properties and thoroughly test your customizations, it's acceptable to make changes as needed.

Best Practices:

  1. Documentation: Clearly document any customizations or restrictions applied to core components for future reference and maintenance.

  2. Compatibility: Ensure that your customizations remain compatible with future AEM updates by following Adobe's upgrade guides and testing your components after each upgrade.

  3. User Experience: Keep the user experience in mind when implementing restrictions or removing properties. Striking a balance between simplicity for authors and flexibility for content creation is key.

  4. Testing: Thoroughly test your custom components and any associated restrictions to ensure they function as expected in different scenarios.

By carefully considering these factors and adhering to best practices, you can effectively implement restrictions on core components and customize them to meet your project's requirements in AEM.

Avatar

Administrator

@subrahmanyamj Did you find the suggestions from users helpful? Please let us know if you require more information. Otherwise, please mark the answer as correct for posterity. If you've discovered a solution yourself, we would appreciate it if you could share it with the community. Thank you!



Kautuk Sahni