Announcement Announcement Module
Collapse
No announcement yet.
AbstractWizardFormController: How NOT TO Hard-code the pages Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • AbstractWizardFormController: How NOT TO Hard-code the pages

    Hi,

    Is there a way not to hard-code the pages in the constructor of a subclassed AbstractWizardFormController? Please look below for my examples:

    public class MyWizardController extends AbstractWizardFormController {
    public MyWizardController () {
    setPages(new String[]
    {"createName",
    "createAddress",
    "createPhone"});
    }
    }

    My DD:
    <bean id="myWizardController" class="com.myapp.MyWizardController ">
    <property name="validator"><ref
    bean="myValidator"/></property>
    </bean>
    <bean id="myValidator" class="com.myapp.MyValidator"/>

    Is there a way to specify those views (i.e. "createName", "createAddress", "createPhone") in the DD instead of putting them in the constructor?

    Thanks for all your help!!

  • #2
    I got it all figured out:

    Here's what's should be include in the DD:

    <bean id="myWizardController"
    class="com.myapp.MyWizardController ">
    <property name="validator"><ref
    bean="myValidator"/>
    </property>
    <property name="pages">
    <list>
    <value>createPersonName</value>
    <value>createPersonAddress</value>
    <value>createPersonPhone</value>
    </list>
    </property>
    </bean>

    Comment

    Working...
    X