AnsweredAssumed Answered

How JSP and BEAN work ?

Question asked by milona on Mar 6, 2008
Latest reply on Mar 6, 2008 by gavinc
Hello!

I don't understand how jsp and beans works with Alfresco.

web-client-config-wizards.xml contains :
wizard name="createSpace" managed-bean="CreateSpaceWizard"
                 title-id="create_space_title" description-id="create_space_desc"
                 icon="/images/icons/create_space_large.gif">
            <step name="create-from" title-id="starting_space" description-id="create_space_step1_desc">
               <page path="/jsp/spaces/create-space-wizard/create-from.jsp"
                     title-id="create_space_step1_title"
                     description-id="create_space_step1_desc"
                     instruction-id="default_instruction" />
            </step>
            <step name="options" title-id="space_options" description-id="create_space_step2_desc">
               <condition if="#{CreateSpaceWizard.createFrom == 'scratch'}">
                  <page path="/jsp/spaces/create-space-wizard/from-scratch.jsp"
                        title-id="create_space_step2_title"
                        description-id="create_space_step2_desc"
                        instruction-id="default_instruction" />
               </condition>
               <condition if="#{CreateSpaceWizard.createFrom == 'existing'}">
                  <page path="/jsp/spaces/create-space-wizard/from-existing.jsp"
                        title-id="create_space_step2_title"
                        description-id="create_space_step2_desc"
                        instruction-id="default_instruction" />
               </condition>
               <condition if="#{CreateSpaceWizard.createFrom == 'template'}">
                  <page path="/jsp/spaces/create-space-wizard/from-template.jsp"
                        title-id="create_space_step2_title"
                        description-id="create_space_step2_desc"
                        instruction-id="default_instruction" />
               </condition>
            </step>

I would like to delete the step 1 from this wizard and modifie the variable WizardManager.bean.createFrom to only be always equal to "template".

This file create-from.jsp is called during step 1, and I don't need it:
<h:panelGrid columns="1">
<h:outputText value="#{msg.how_to_create_space}"/>
<h:selectOneRadio id="create-from" value="#{WizardManager.bean.createFrom}" layout="pageDirection">
<f:selectItem itemValue="scratch" itemLabel="#{msg.from_scratch}" />
<f:selectItem itemValue="existing" itemLabel="#{msg.based_on_existing_space}" />
<f:selectItem itemValue="template" itemLabel="#{msg.using_a_template}" />
</h:selectOneRadio>
</h:panelGrid>

Please could you give me clues ?

Thank you

Outcomes