Hybris backoffice customization
Scenario:
Solution:
Since, Title type doesn't have create-wizard component declared, So generic Item type create-wizard will be picked.
To declare it in running system
- Open backoffice with admin user.
- Open Application Orchestrator by pressing F4 key.
- Click on Hybris symbol Y (Top right corner) and select show cockpit-config.xml
- Scroll down to last line in XML(ctr+end)
- Past the below XML code just before tag
- Click on store and save the file
- Press F4 again to close the Application Orchestrator
- Test your changes
XML
<context type="Title" component="create-wizard" module="platformbackoffice">
<wz:flow xmlns:wz="http://www.hybris.com/cockpitng/config/wizard-config" xmlns:advanced-search="http://www.hybris.com/cockpitng/config/advancedsearch" xmlns:df="http://www.hybris.com/cockpitng/component/dynamicForms" xmlns:dsb="http://www.hybris.com/cockpitng/config/dashboard" xmlns:editorArea="http://www.hybris.com/cockpitng/component/editorArea" xmlns:explorer-tree="http://www.hybris.com/cockpitng/config/explorertree" xmlns:list-view="http://www.hybris.com/cockpitng/component/listView" xmlns:simple-search="http://www.hybris.com/cockpitng/config/simplesearch" xmlns:y="http://www.hybris.com/cockpit/config/hybris" id="TitleWizard" title="create.title(ctx.TYPE_CODE)">
<wz:prepare id="titlePrepare">
<wz:initialize property="newTitle" type="ctx.TYPE_CODE"/>
</wz:prepare>
<wz:step id="step1" sublabel="Create a new Title">
<wz:content id="step1.content">
<wz:property-list root="newTitle">
<wz:property qualifier="code" type="java.lang.String"/>
</wz:property-list>
</wz:content>
<wz:navigation id="step1.navigation">
<wz:cancel/>
<wz:done visible="!#empty(newTitle.code)">
<wz:save property="newTitle"/>
</wz:done>
</wz:navigation>
</wz:step>
</wz:flow>
</context>
To persist this permanently, you need to declare it in you custom backoffice extension(create it if you don't have one) and past the below code in your *-backoffice-config.xml file.
<context type="Title" component="create-wizard">
<wz:flow id="TitleWizard" title="create.title(ctx.TYPE_CODE)">
<wz:prepare id="titlePrepare">
<wz:initialize property="newTitle" type="ctx.TYPE_CODE"/>
</wz:prepare>
<wz:step id="step1" sublabel="Create a Title">
<wz:content id="step1.content">
<wz:property-list root="newTitle">
<wz:property qualifier="code" type="java.lang.String"/>
</wz:property-list>
</wz:content>
<wz:navigation id="step1.navigation">
<wz:cancel/>
<wz:done>
<wz:save property="newTitle"/>
</wz:done>
</wz:navigation>
</wz:step>
</wz:flow>
</context>
Comments
Post a Comment