Default Reference PK Editor
The Default Reference PK editor allows editing a PK field in the create wizards.
Editor Definition
| Name | Default Reference PK Editor |
| ID | com.hybris.cockpitng.editor.onpremise.pk.reference |
| Description | The Default Reference PK editor uses de.hybris.platform.core.PK to fetch ItemModel. It cooperates in edit mode with the standard PK editor, com.hybris.cockpitng.editor.onpremise.pk, to resolve an entity by the PK. It allows narrowing down the allowed entity types by type codes. |
| Type | de.hybris.platform.core.model.ItemModel |
| Author | SAP |
| Inputs | Not applicable |
| Outputs | Not applicable |
Editor Preview
Settings
| Setting | Type | Description |
|---|---|---|
| supportedTypes | java.lang.String | A coma-separated list of type names that the editor should accept. If the PK pasted by the user can be resolved to an entity, the entity is accepted. It happens only if it is of one of the given types, or if it is a subtype of one of those types. |
Additional Information
The main area of the editor application, is a rare case of relation to Item, where a lookup of the whole database might be needed. For example: the legacy Item owner. In standard scenarios, with default configuration, or fallback, the field is not shown to a user. However, in some edge-cases there may be a need to allow user modifying the field. In that case, you can use a configuration similar to:
<context type="Item" component="create-wizard" module="platformbackoffice">
<wz:flow xmlns:wz="http://www.hybris.com/cockpitng/config/wizard-config" id="ItemWizard" title="create.title(ctx.TYPE_CODE)">
<wz:prepare id="itemPrepare">
<wz:initialize property="newObject" type="ctx.TYPE_CODE"/>
</wz:prepare>
<wz:step id="step1" label="flow.allmanadatory">
<wz:content id="step1.content">
<wz:property-list enable-non-declared-includes="true" include-non-declared-mandatory="true" include-non-declared-unique="true" include-non-declared-writable-on-creation="true" root="newObject">
<wz:property editor="com.hybris.cockpitng.editor.onpremise.pk.reference" qualifier="owner">
<wz:editor-parameter>
<wz:name>supportedTypes</wz:name>
<wz:value>Product,Category</wz:value>
</wz:editor-parameter>
</wz:property>
</wz:property-list>
</wz:content>
<wz:navigation id="step1.navigation">
<wz:cancel/>
<wz:done>
<wz:save property="newObject"/>
</wz:done>
</wz:navigation>
</wz:step>
</wz:flow>
</context>