users@woodstock.java.net

Wizard step: controlling create time of server-side child components

From: Vanessa Black <Vanessa.Black_at_Sun.COM>
Date: Thu, 12 Jun 2008 11:31:44 -0600

Hi Folks,

I have a wizard with steps that contain components created on the server side. I need the server side component on step two to be created only after the Next button on step 1 is pressed (because it depends on what was chosen on step 1).  As I have it now, the value of the server side components when the bean is initialized is the value that is used when the user navigates to the step that uses the component (the bean is in session scope).

Here is an example snippet;

<webuijsf:wizard id="wizard" title="A wizard">
                                <webuijsf:wizardStep id="step1"          
                                                     summary="The First Step"
                                                     title="The First Step"
                                                     eventListener="#{Wizard1Bean.firstStepEventListener}">   
                              
                                    <webuijsf:staticText binding="#{Wizard1Bean.firstStepText}" />
                                </webuijsf:wizardStep>  
                               
                                <webuijsf:wizardStep id="step2"          
                                                     summary="The Second Step"
                                                     title="The Second Step">  
                                    <webuijsf:staticText binding="#{Wizard1Bean.secondStepText}" />
                                </webuijsf:wizardStep>    
                            </webuijsf:wizard> 


Is there a way to force the wizard to evaluate
#{Wizard1Bean.secondStepText} when the user actually gets to the second step? I've tried using rendered attribute and have it change from false to true once the second step was reached but - no change to behaviour.

Thanks,

Vanessa