cancel
Showing results for 
Search instead for 
Did you mean: 

Disable a dropbox on unchecking a boolean attribute dynamically

Former Member
0 Kudos

Hello All,

I need to disable a drobbox on unchecking the boolean attribute which is a checkbox.

former_member620692
Active Contributor
0 Kudos

Where? In storefront or in back office applications (hMC, *cockpit, backoffice)? What version of Hybris are you using? You should add all this while posting your question.

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member620692
Active Contributor
0 Kudos

Hi - given below is an example from the OOTB implementation:

 <context type="hmc_treenode_impex_import_wizard" component="create-wizard" module="platformbackoffice">
     <wz:flow xmlns:wz="http://www.hybris.com/cockpitng/config/wizard-config">
         <wz:prepare id="impExImportPrepare">
             <wz:initialize property="importForm" type="de.hybris.platform.platformbackoffice.widgets.impex.ImpExImportForm"/>
         </wz:prepare>
         <wz:step id="step2" label="impex.import.detailedconfig.label" sublabel="impex.import.detailedconfig.sublabel">
             <wz:content id="step1.content">
                 <wz:property-list root="importForm">
                     <wz:property editor="com.hybris.cockpitng.editor.boolean.checkbox" qualifier="distributedImpex"/>
                     <wz:property editor="com.hybris.cockpitng.editor.defaultenum" qualifier="errorMode" type="java.lang.Enum(ErrorMode)"/>
                 </wz:property-list>
             </wz:content>
         </wz:step>
     </wz:flow>
 </context>
 <context type="hmc_treenode_impex_import_wizard" component="configurableFlowDynamicForms" module="platformbackoffice">
     <df:dynamicForms xmlns:df="http://www.hybris.com/cockpitng/component/dynamicForms">
         <df:attribute disabledIf="distributedImpex==true" id="dynaErrorMode" qualifier="errorMode" triggeredOn="distributedImpex" visibleIf="distributedImpex==false"/>
     </df:dynamicForms>
 </context>

To understand how it works, you can go to System > Import in backoffice. Click UPLOAD and select any file and proceed to the next step (i.e. Step#2). There, you will see a checkbox, Distributed Mode: and below that, there is a dropdown, Error mode:. Check/uncheck the checkbox and see the effect on the dropdown.

Former Member
0 Kudos

Hello,

I am adding this in backoffice(hybris 5.7).