コミュニティアチーブメントバーを展開する。

Submissions are now open for the 2026 Adobe Experience Maker Awards.

Use "granite:class" and "granite:data" in the new CF editor

Avatar

Community Advisor and Adobe Champion

2025/03/11

Request for Feature Enhancement (RFE) Summary: Ability to use "granite:class" and "granite:data" in the new CF editor
Use-case:

We developed a show/hide fields plugin for the new CF editor based on a type selection made in a select field. For this purpose we used the example provivided in the docs:

https://developer.adobe.com/uix/docs/services/aem-cf-editor/api/data/#setting-styles-to-the-field

api.setStyles(fieldName, {"display": "none"});

However, this is not an optimal solution, as we need to hide each field per name instead of creating a generic plugin that could be reused on any content fragment. If we had an option to retrieve the value of a custom data attribute, then our plugin could be reusable.

Current/Experienced Behavior: The "granite:class" and "granite:data" set in the CF model is not present in the HTML, and custom data attributes cannot be retrieved by custom plugins.
Improved/Expected Behavior: The "granite:class" and "granite:data" set in the CF model is present in the HTML, and custom data attributes can be retrieved by custom plugins.
Environment Details (AEM version/service pack, any other specifics if applicable): AEMaaCS, release 2024.10.18311.20241017T104455Z
Customer-name/Organization name: Assa Abloy
Screenshot (if applicable): Screenshot 2025-03-11 at 22.52.17.png
Code package (if applicable):
<confirmation-title
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/textfield"
fieldLabel="Confirmation title"
granite:class="mycustomclass"
metaType="text-single"
name="confirmationTitle"
valueType="string">
<granite:data jcr:primaryType="nt:unstructured"
mycustomdata="123" />
</confirmation-title>
2件のコメント

Avatar

Community Advisor and Adobe Champion

2025/03/24

Here is an update that makes this even a bigger problem for my team. If a CF model contains any custom data attributes, then the CF using that model cannot be created in the new CF editor. This makes it impossible for us to use the same CF models in the old and new editor. 

The expected behavior would be that even though the custom data attributes cannot be used in the new CF editor right now, at least they should not cause errors when trying to create/edit CFs whose model contains custom data attributes.

Screenshot 2025-03-04 at 13.36.05.png

I hope this gets addressed soon so we can use both editors in the transition phase.

 

BR,

Daniel

Avatar

Administrator

2025/03/26

@daniel-strmecki 

Thanks for proposing this idea.
This has been reported to the engineering under the internal reference SITES-30308. The product team will triage this request to verify feasibility based on the prioritization model. This post will be updated according to Jira's status.
変更されたステータス: Investigating