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

Bulk Edit : How to restrict category list to Stage Version while bulk editing

0 Kudos
955

Hybris version v1811.

One of the requirement client requested for bulk edit is to restrict the listing of Category list to only from stage catalog version.

For regular area we are able to do it using ReferenceSearchCondition, but on analysis what i found is that the Bulk edit is generated by utilizing the wizard configuration in backoffice-cockpit-config.xml

 <context type="Product" merge-by="type" component="bulk-edit-wizard">
     <wz:flow id="bulkEditWizard" title="bulkedit.wizard.title" size="large">
           <wz:step id="step1" label="bulkedit.wizard.step.select.attributes" sublabel="bulkedit.wizard.step.select.sublabel">
 

in Step2 of the flow it utlize the bean definition BulkEditRenderer to generate the same

         <wz:step id="step2" label="bulkedit.wizard.step.change.attributes" sublabel="bulkedit.wizard.step.change.sublabel">
             <wz:content id="step2.content">
                 <wz:custom-view id="attributesEdit" lang="zul" merge-mode="replace">
                     <wz:renderer spring-bean="bulkEditRenderer" >
                         <wz:parameter>
                             <wz:name>bulkEditFormModelKey</wz:name>
                             <wz:value>bulkEditForm</wz:value>
                         </wz:parameter>
                         <wz:parameter>
                             <wz:name>editor:description</wz:name>
                             <wz:value>com.hybris.cockpitng.editor.localized(com.hybris.cockpitng.editor.wysiwyg)</wz:value>
                         </wz:parameter>
                     </wz:renderer>
                 </wz:custom-view>
             </wz:content>
         </wz:step>

Is there a way to restrict the category attribute to show results from stage catalog alone by passing parameter during bulk edit?

View Entire Topic
0 Kudos

mp_arineo

1. You need to use {} around the value if u want it to be evaluated

2. For a reference serach context you will have an access only to the template object - if you have initialised it properly then just use <wz:value>{parentObject.catalogVersion}</wz:value>.

You can debug here to see how the condition value and your params are resolved

com.hybris.cockpitng.editor.commonreferenceeditor.ReferenceEditorSearchConditionHandler#getAllSearchQueryConditions