Skip to Content
author's profile photo Former Member
Former Member

How to use the com.hybris.cockpitng.editor.defaultmap Editor in cockpitng

Hi, we try to use the maptype in our items.xml, because we have many fields which have value per lets call it "CustomMapKeyType". So we declare in the items.xml:

             <maptype code="custommappable:java.lang.String"
                 argumenttype="CustomMapKeyType"
                 returntype="java.lang.String"
                 autocreate="true"
                 generate="false"/>

     <itemtype code="CustomMapKeyType"
                  jaloclass="de...jalo.CustomMapKeyType"
                  autocreate="true"
                  generate="true">
         <attributes>
             <attribute qualifier="code" type="java.lang.String" >
                 <persistence type="property"/>
             </attribute>
             
             <attribute qualifier="name" type="java.lang.String">                    
                 <modifiers initial="true" optional="false" />
                 <persistence type="property"/>
             </attribute>
             ...

         </attributes>        
         <indexes>
             <index name="CustomMapKeyTypeCodeIx" unique="true">
                 <key attribute="code" />
             </index>
             ...
         </indexes>
     </itemtype>

and then for some other type's property like this:

 <attribute qualifier="custommappableTitle" type="custommappable:java.lang.String">

In the -backoffice-config.xml we have for the editor area:

 <ea:attribute qualifier="custommappableTitle" />

When we show our custommappableTitle field in the editor it is picking the "com.hybris.cockpitng.editor.defaultmap" editor, but if I click on the "+" sign to add values it is showing empty value for "Key". In the hmc I am able to fill this attribute and the values added are shown in the cockpitng with the CustomMapKeyType(PK) format.

Do you have any hints how to populate the "Key" field for the "com.hybris.cockpitng.editor.defaultmap" editor when adding value?

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Posted on Dec 10, 2014 at 03:44 PM

    Hi,

    please share the definition of CustomMapKeyType. I will give it a try while it should work out of the box.

    Cheers, WOjtek

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Wojciech, I added it to the question above. One thing I see is that we define the uniqueness of the "code" property in an index instead with the "unique" attribute, is it possible that this is the issue?

  • Posted on Dec 11, 2014 at 12:15 PM

    Hi,

    I have tried it and apparently the use case is not supported in backjoffice. Since this is a serious problem I will report an improvement (a blocker) and my team will try to fill this gap as soon as possible.

    Cheers, Wojtek

    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.