cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

[DefaultComponentWidgetAdapter] Stub widget slot for socketId: referenceEditorOutput could not be found

Former Member
0 Kudos
665

1) Created one class like below

public class ExampleMultiReferenceEditor extends DefaultMultiReferenceEditor {

@Override public void render(Component parent, EditorContext context, EditorListener listener) {

     // some business logic
     
     if (getProduct().getCode().equalsIgnoreCase("XX")
                  {
             context.setParameter("restrictToType", XModel._TYPECODE);
             
         }

         else {
             context.setParameter("restrictToType", X1Model._TYPECODE);
         }
     
     }

     super.render(parent, context, listener);
 }

}

As per the above logic specific model(X or X1 Model) is assigning in backoffice.Once click on specific model CREATE WIZARD IS NOT OPENING and error like this "ERROR [hybrisHTTP21] [DefaultComponentWidgetAdapter] Stub widget slot for socketId: referenceEditorOutput could not be found"

Could you please anyone help me on this.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Jacek,

I did included these also in my widgets xml but still I was facing issues on refresh and save of the object in widgets.

Figured it out. There was a change in code of DefaultEditorAreaController.handleObjectUpdatedEvent(CockpitEvent) from 6.3 to 6.7 which was causing the issue.

Firstly, the passing of objects was just data in 6.3 which now is Collections.singletonList in 6.7 and also streaming the collection in the method mentioned. This code was not in place in our custom EditorAreaController which was causing issues.

Thus even though having all changes in place I was facing issues. Finally got through it.

Thanks for your help.

former_member625836
Active Contributor
0 Kudos

Hi,

It looks to me that you have completely new editor that extends DefaultMultiReferenceEditor, yet does not define required sockets. Please update your editor's definition.xml file so that all sockets are there.

Cheers, Jacek

Former Member
0 Kudos

Hi Jacek, Yes you are right, a completely new editor that extends DefaultMultiReferenceEditor.

Here is what I included in the definition.xml of my editor:

 <editor-definition id="com.custom.corebackofficewidgets.removeall"
                    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                    xsi:noNamespaceSchemaLocation="http://www.hybris.com/schema/cockpitng/editor-definition.xsd">
 
     <name>Remove All Editor</name>
     <description>Remove All editor is a custom editor to remove all the values from the collection|list|set</description>
     <author>hybris</author>
     <version>0.1</version>
 
     <type>de.hybris.platform.core.model.ItemModel</type>
     <editorClassName>com.custom.backoffice.widgets.editor.CustomRemoveAllEditor</editorClassName>
 
     <sockets>
         <input id="referenceEditorInput"/>
         <output id="referenceEditorOutput" type="java.util.Map"/>
         <output id="referenceSelected" type="com.hybris.cockpitng.data.TypeAwareSelectionContext"/>
         <output id="referenceSearchCtx" type="com.hybris.cockpitng.data.TypeAwareSelectionContext"/>
     </sockets>
 
 
 </editor-definition>

But I did include all the sockets, I don't get the error mentioned above on the console nor I get the widget that should come up on selecting the object.

Thanks,Viji

former_member625836
Active Contributor
0 Kudos

Hi Viji,

Most probably you are still missing some connections:

 <widget-connection sourceWidgetId="STUB_com.custom.corebackofficewidgets.removeall" outputId="referenceEditorOutput" targetWidgetId="configurableFlow" inputId="context"/>
 <widget-connection sourceWidgetId="configurableFlow" outputId="wizardResult" targetWidgetId="STUB_com.custom.corebackofficewidgets.removeall" inputId="referenceEditorInput"/>
 <widget-connection sourceWidgetId="STUB_com.custom.corebackofficewidgets.removeall" outputId="referenceSelected" targetWidgetId="collectionEditorAreaGroup" inputId="inputDataInput"/>

Cheers, Jacek

Ask a Question