cancel
Showing results for 
Search instead for 
Did you mean: 

Component holder multiple widget connections between reference editor and editor area. (Cockpit NG)

Former Member
0 Kudos

Hi,

I have strange problem with widget connections. In my *backoffice-widgets.xml configuration file I have defined for example only once for Default Reference Editor and com.hybris.cockpitng.backoffice.collectionEditorAreaGroup. Unfortunately when I open the backoffice and go to Application Orchestrator, Component Holder section. Then edit socket connections for Default Reference Editor this connections are duplicate.

This leads to a situation when I click on a field with reference editor, popup open up for me twice. Once the correct content while the other is gray with no value.

Could you help understand what is wrong.

I would add that currently I have two perspectives one default which comes out of the box from Hybris and second custom perspective which I configured manually.

Many thanks for help.

Regards, Miroslaw

Accepted Solutions (1)

Accepted Solutions (1)

former_member632755
Active Contributor
0 Kudos

Hi,

in general you should not instantiate editors at all. If you take a look at the default widgets.xml you will find that the editr you mention is refered to with id starting with STUB_. Internally it is implementing com.hybris.cockpitng.engine.ComponentWidgetAdapterAware and therefore can be traeated like a widget (may have connections defined and you can see it in the Component Holder section of the orchestrator).

Such "widgets" are created on demand, every time an output socket communtication from the STUBS happens.

This is of course a low level mechanism and I'm mentioning it here just to explain a bit the mechanics of our solution. In the end the answer is that you should not declaratively create instances of the reference editor (and any other Editor).

Cheers, Wojtek

former_member632755
Active Contributor
0 Kudos

One more thing... Be sure that you do not have duplicated widget connections. Two connections mean two events meant two instances (in case of a STUB or template widget). If you have copied widgets and connections it is probably it - duplicated connections.

Cheers

Answers (6)

Answers (6)

Former Member
0 Kudos

Hi Wojciech,

it is possible to extends from editor or widget (controller). I mean override some methods?

Need I change definition xml or something like this?

Regards, Miroslaw

former_member632755
Active Contributor
0 Kudos

Hi,

since you are beginning with backoffice I expect that you do not need any sophisticated features. To make the long story short - you have to selectively copy only the new widgets you added in your new perspective along with their connections (you will recognize them easily in the xml by their id's). The rest comes from the backoffice and should not be copied to your extensions' widget.xmls.

Again I encourage you to play with default backoffice (with no custom extensions) and than add an extensions generated via ybackoffice (ant extgen) with a custom widget that will become available within a new perspective. When you check the result xml in the orchestrator and than compare what is in backoffice-widgets.xml and the generated extension *widgets.xml file all will become clear to you.

Cheers, Wojtek

Former Member
0 Kudos

Your last answer is probably the case. I was following wiki page where was written that to save your custom layout from ng cockpit you need to go into application orchestartor, then click hybris logo on the top right open widget.xml and copy into your custom backoffice extension. Then even if you click reset to default you should have your custom layaout. So how should I proceed in this case? This probably means that I have one STUB definition on backoffice and the second in my custom backoffice. So what should I do? 🙂

Cheers.

Former Member
0 Kudos

Hi,

unfortunately I have still this problem even with default backoffice.xml which comes from hybris installation. Should I create default reference editor and default reference editor for every perspective separately? Regards, Miroslaw

Former Member
0 Kudos

Hi Wojtek,

many thanks for your answer. Probably I found where the problem is. I manually copied my custom configuration to backoffice.xml in backofice extension because I wanted to solve this problem which I rised in this topic https://answers.sap.com/questions/12750561/how-really-reset-to-defaults-works-in-orchestrator.html could you please take a look? Thats why I have duplicate actions.

Regards, Miroslaw

former_member632755
Active Contributor
0 Kudos

Hi,

could you attach you configuration files (widgets configuration(s))? Maybe also some screenshots could help.

Cheers, Wojtek