You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Samuel Cheung <sy...@gmail.com> on 2005/03/24 17:24:54 UTC

Wizard like component

Hi,

Can some one please tell me if there is Wizard like component for MyFaces?
Thank you.

Sam

Re: Wizard like component

Posted by steve rock <st...@gmail.com>.
Rolled my own, 3 step wizard. Was pretty simple with JSF. Like
Manfried suggests going from one step to the next is really tied to
the business rules.

In your backing bean add functions like this. 

protected void processStep() {
        switch (step) {
            case 1:
                clearPlaylistSongList();
                break;
            case 2:
                if (movingForwardStep == true) {                    
                     songAutoMatch();                    
                }
                break;
            case 3:
                makeValidSongList();
                break;
            default:
                log.warn("processStep(): Invalid step choosen. " + step);
                break;
        }
    }

 public void previousStep(ActionEvent event) {
        if (step > MIN_STEP) {
            step--;
            movingForwardStep = false;
            processStep();
            log.debug("previousStep(): " + this.toString());
        }
    }


 public void nextStep(ActionEvent event) {
        if (step < MAX_STEP && step >= MIN_STEP) {
            step++;
            movingForwardStep = true;
            processStep();
            log.debug("nextStep(): " + this.toString());
        }
    }


I tied previous and next buttons to these funtions and my business
logic was implemented by processStep().

In my JSF page I has 3 panels, one for each step. Only one visible at
a time based on step.

Cheers,
-Steve

On Thu, 24 Mar 2005 20:05:20 +0100, Manfred Geiler
<ma...@gmail.com> wrote:
> Not yet.
> Do you have concrete ideas what such a component might look like and
> how it's behaviour should be specified? No easy task IMHO, for wizards
> normally are closely tied to the business logic.
> 
> What might be interesting for you:
> One of the goals of Shale (Struts 2.0) is to provide an easy framework
> for wizards.
> 
> -M
> 
> 
> On Thu, 24 Mar 2005 10:24:54 -0600, Samuel Cheung <sy...@gmail.com> wrote:
> > Hi,
> >
> > Can some one please tell me if there is Wizard like component for MyFaces?
> > Thank you.
> >
> > Sam
> >
>

Re: Wizard like component

Posted by Manfred Geiler <ma...@gmail.com>.
Not yet.
Do you have concrete ideas what such a component might look like and
how it's behaviour should be specified? No easy task IMHO, for wizards
normally are closely tied to the business logic.

What might be interesting for you:
One of the goals of Shale (Struts 2.0) is to provide an easy framework
for wizards.

-M


On Thu, 24 Mar 2005 10:24:54 -0600, Samuel Cheung <sy...@gmail.com> wrote:
> Hi,
> 
> Can some one please tell me if there is Wizard like component for MyFaces?
> Thank you.
> 
> Sam
>