Skip to Content

Backoffice - Is it possible to change the editor used for classification attributes values in product Model ?

I tried the below configuration but did not help

 <context type="Product" component="editor-area">
 <editorArea:editorArea xmlns:editorArea="">
 <editorArea:customTab name="" spring-bean="classificationTabEditorAreaRenderer"  merge-mode="replace">
     <editorArea:section name="hmc.section.product.untypedfeatures"  merge-mode="replace">
     <editorArea:attribute xmlns="" merge-mode="replace" qualifier="untypedFeatures" description="hmc.text.product.untypedfeatures" editor="com.hybris.cockpitng.editor.localized(com.hybris.cockpitng.editor.wysiwyg)"/>

Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • Best Answer
    Posted on Oct 23, 2018 at 08:31 PM

    got it working with below configurations , hope this is the correct way


     `<!-- Editors -->
     <cng:map-extender bean="editorRegistry" property="defaultEditorMapping">
             <cng:put key-type="java.lang.String" value-type="java.lang.String">
                 <entry key="^FeatureValue\((.*)\)$" value="com.hybris.cockpitng.editor.myfeaturevalue"/>

    Created a new Custom Editor similar to the FeatureValueEditor

    and set the default editor in the render(Component parent, EditorContext context, EditorListener listener) method

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Oct 23, 2018 at 07:33 AM

    No it isnt, as the complete tab is rendered by the classificationTabEditorAreaRenderer.

    The renderer ignores any additional configuration.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Oct 23, 2018 at 06:54 PM

    It's partially true what wrote (not possible by configuration only), but actually you can override the classificationTabEditorAreaRenderer bean, and it's method createEditor(), which will allow to show a different editor.

    The class ClassificationTabEditorAreaRenderer indeed ignores any configuration, but this could be also overridden, by overriding the render() method, and put the 'configuration' parameter inside the widget's model. Then in the createEditor method we can get this config and read the 'editor' attribute.

    We might capture this as an improvement, but the steps above should be sufficient to replace the classification editor.

    Thanks, Marcin

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.