cancel
Showing results for 
Search instead for 
Did you mean: 

How to set the value of a qualifier dynamically in config.xml

Former Member
0 Kudos

Hi Team,

I have a requirement to set the value of "id" i.e catalogItemID dynamically at the time of opening popup for creating catalog. This id I am generating from a service and I want to set this value to "catalogItemID".

Below is the *config.xml entry for creating catalog. When the create item popup will open by that time the id should be set to : qualifier="catalogItemID".

     <wz:flow xmlns:wz="http://www.hybris.com/cockpitng/config/wizard-config" id="CatalogItem" title="Create new Catalog Item">
         <wz:prepare id="productPrepare">
             <wz:initialize property="newProduct" type="ctx.TYPE_CODE"/>
         </wz:prepare>

             <wz:content id="step1.content">
                         <wz:property-list root="newProduct">
                            <wz:property qualifier="catalogItemID" type="java.lang.String"/>
                     <wz:property qualifier="shortDesc" type="java.lang.String"  />
                     <wz:property qualifier="longDesc"  type="java.lang.String" />
                     <wz:property qualifier="catalogItemType" />
                 </wz:property-list>
             </wz:content>
             <wz:navigation id="step1.navigation">
                 <wz:cancel/>
                 <wz:done>
                     <wz:save property="newProduct"/>
                 </wz:done>
             </wz:navigation>
         </wz:step>


Please suggest me to address this requirement.

Thanks, Kesari

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member679962
Active Participant
0 Kudos

Hi Kesari,

You'd have to use the prepare step of Configurable Flow Wizard widget. After you initialize new item you can assign values to its properties. It's described here and here. The only problem is providing proper values in the context sent to the Wizard. Default Backoffice mashup connects Create Action to Configurable Flow widget through Property Extractor widget. This way only typeCode is passed to the Wizard. You have to figure out what's the best way of providing additional values yourself, as it's project dependant. Example idea might be creating custom widget extending Property Extractor in which you could add additional values to the context before sending it to the Wizard.

Best regards, Marcin