You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by "Larry.Liu" <xi...@wizitsoft.com> on 2009/12/10 05:54:05 UTC

Some thoughts about creating a wizard component.

Hi,

We are working on creating a wizard component in ofbiz, shown as below.


------------------------------------------------------------------------------
  -
  -                                           Previous | Next |
Submit
  -
  -   Wizard Step1
  -   Wizard Step2->                      Wizard step 2
body
  -   Wizard Step3
  -
  -
  -                                           Previous | Next |
Submit
  -

-------------------------------------------------------------------------------

Here are some thoughts on the design, can anybody help to give some advice
on
this design, will there be any potential problem or is there any better
choice
based on ofbiz? Thanks in advance.

1. Define the wizard and wizardStep entities
    1. Wizard entity will contains information about the whole wizard, like
        1. It's title.
    2. WizardStep entity will contains information about one specified step
in
       the whole wizard, like
        1. Title for this step,
        2. Link target for this step,
        3. Foreign-key to the parent wizard entity.
    Here, maybe menu is a better choice, any advice or comment here?

2. Create a decorator for the wizard layout, which contains four parts,
shown
as the above graph.

3. If you want to create a new wizard, let's say, including three steps, you
will define three screens, all decorated by the wizard decorator we defined
above. Actual "body screen" will be passed through to the decorator like
main-decorator.

Wizard and WizardStep information will also be pass through to the
decorator,
then the decorator will handle the follow display.

    1. Wizard steps list display on the left, it will list all the steps of
    current wizard and highlight the current step.
    2. Next step, previous step and submit button display, for instance, if
    user is on the first step, button "Next" will not be displayed, if the
user
    is on the last step, button "Next" will be hidden and button "Submit"
will
    be shown.

Is there any advice or comment on this design, will there be any potential
problem?

Thanks in advance.

Regards,
Liu Xiangqian

Wizitsoft Information Technology Ltd.
www.wizitsoft.com | (86) 010-62670653 ext 614