Skip to Content
2
Former Member
Sep 10, 2014 at 04:35 PM

How to configue a custom controller for new item wizard?

308 Views

I want to create a custom 'after done' logic for a new item wizard. The wizard fields should be configured in a "wizardConfig_.xml" file. I don't want to use the after-done-wizard-script for beanshell or groovy, I wan't to overwrite the done method in the wizard controller.

How I have to configure the *-spring-wizard beans? Wich (platform.cockpit) wizard should I take? Wich (platform.cockpit) wizard page should i take?

Current implementation (wich doesn't work):

 <bean id="mediaContainerCreateWizard" class="de.hybris.platform.cockpit.wizards.generic.GenericItemWizard" scope="prototype">
         <property name="title" value="Media Container Wizard"/>
         <property name="currentStringType" value="MediaContainer"/>
         <property name="pages">
             <list>
                 <bean class="de.hybris.platform.cockpit.wizards.generic.GenericItemMandatoryPage">
                     <property name="id" value="mediaContainerWizardPage"/>
                     <property name="title" value="Media Container Wizard"/>
                     <property name="controller">
                         <bean class="my.medias.wizard.MyMediaContainerCreateWizardController" />
                     </property>
                 </bean>
             </list>
         </property>
     </bean>
     
     <bean id="mediaContainerCreateWizardConfig" class="de.hybris.platform.cockpit.wizards.generic.CreateWizardConfiguration">
         <property name="templateCode" value="MediaContainer"/>
         <property name="wizardBeanId" value="mediaContainerCreateWizard"/>
         <property name="restrictToPerspectives">
             <set>
                 <value>productcockpit.perspective.product</value>
             </set>
         </property>
     </bean>


Regards, Johannes