on ‎2020 Nov 30 6:01 AM
Request clarification before answering.
Hi Leo,
The easiest part of the task is to add configuration like this one below in the backoffice-config.xml
<context type="Product" component="editor-area" merge-by="type">
<editorArea:editorArea xmlns:editorArea="http://www.hybris.com/cockpitng/component/editorArea">
.....
<editorArea:tab name="hmc.tab.product.properties" merge-mode="append" position="1">
<editorArea:customSection name="hmc.properties.classattributes" initiallyOpened="false"
spring-bean="customPropertiesSectionRenderer"/>
.....
</editorArea:tab>
.....
</editorArea:editorArea>
</context>
The attribute that you actually need is initiallyOpened="false"
Unfortunately this is not all. In addition you need to create custom spring-bean. Something like customPropertiesSectionRenderer that extends DefaultEditorAreaSectionRenderer
In this custom renderer you need to override render method and add the following implementation based on the requirements on your project.
Button expandButton = new Button();
expandButton.setSclass("yw-expandCollapse");
expandButton.addEventListener("onClick", e ->
sectionGroupBox.setOpen(!sectionGroupBox.isOpen())
);
Probably you will also need to rework a little bit Groupbox section. But more or less that's all.
Hope this helps.
Best Regards,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.