pt.digitalis.dif.presentation.views.jsp.taglibs.objects
Class WizardDefinition

java.lang.Object
  extended by pt.digitalis.dif.presentation.views.jsp.taglibs.objects.WizardDefinition

public class WizardDefinition
extends Object

Helper class that defines a wizard to be rendered on an HTML page

Author:
Pedro Viegas pviegas@digitalis.pt
Created on:
Jan 22, 2009

Field Summary
static String HTML_ACTION_PARAMETER
          The wizard's form navigation action parameter hidden field
static String HTML_EXECUTION_STATE_PARAMETER
          A parameter to control if the wizard step has executed
static String HTML_STEP_PARAMETER
          The wizard's form active step parameter hidden field
static String HTML_TO_STEP_PARAMETER
          The wizard's form navigation go to step parameter hidden field
static String LEFT_INDEX_LAYOUT
          The index layout rendered in the left of the wizard container
static String TOP_INDEX_LAYOUT
          The index layout rendered in the top of the wizard container
static int TOP_INDEX_MAX_CHARS
          Max chars that the top index may contain.
static int TOP_INDEX_SINGLE_MAX_CHARS
          Max chars that the top index may contain in a single title.
 
Constructor Summary
WizardDefinition(String name, List<WizardStepItem> items)
          Default constructor
WizardDefinition(String name, List<WizardStepItem> items, int activeStep)
          Default constructor
 
Method Summary
 int getActiveStep()
           
 Boolean getCanFinish()
           
 String getDescription()
           
 String getFormLayout()
          Inspector for the 'formLayout' attribute.
 Boolean getHasIndexPage()
           
 Integer getHeight()
          Inspector for the 'height' attribute.
 String getIndexLayout()
           
 List<WizardStepItem> getItems()
           
 String getName()
           
 Boolean getReadonly()
          Inspector for the 'readonly' attribute.
 Boolean getShowIndex()
           
 String getSubmitTitle()
          Inspector for the 'submitTitle' attribute.
 String getTitle()
           
 String getTitlePrefix()
          Inspector for the 'titlePrefix' attribute.
 Boolean getTopNavigation()
          Inspector for the 'topNavigation' attribute.
static int getWizardActiveStepNumber(pt.digitalis.dif.controller.interfaces.IDIFRequest request, String wizardName, boolean hasIndex, boolean canNavigate, WizardDefinition wizardDef)
           
 Boolean getWrapWithForm()
          Inspector for the 'wrapWithForm' attribute.
 boolean isNoRequiredIndicator()
          Inspector for the 'noRequiredIndicator' attribute.
 boolean isShowTitlePrefix()
          Inspector for the 'showTitlePrefix' attribute.
 void setActiveStep(int activeStep)
           
 void setCanFinish(Boolean canFinish)
           
 void setDescription(String description)
           
 void setFormLayout(String formLayout)
          Modifier for the 'formLayout' attribute.
 void setHasIndexPage(Boolean hasIndexPage)
           
 void setHeight(Integer height)
          Modifier for the 'height' attribute.
 void setIndexLayout(String indexLayout)
           
 void setItems(List<WizardStepItem> items)
           
 void setName(String name)
           
 void setNoRequiredIndicator(boolean noRequiredIndicator)
          Modifier for the 'noRequiredIndicator' attribute.
 void setReadonly(Boolean readonly)
          Modifier for the 'readonly' attribute.
 void setShowIndex(Boolean showIndex)
           
 void setShowTitlePrefix(boolean showTitlePrefix)
          Modifier for the 'showTitlePrefix' attribute.
 void setSubmitTitle(String submitTitle)
          Modifier for the 'submitTitle' attribute.
 void setTitle(String title)
           
 void setTitlePrefix(String titlePrefix)
          Modifier for the 'titlePrefix' attribute.
 void setTopNavigation(Boolean topNavigation)
          Modifier for the 'topNavigation' attribute.
 void setWrapWithForm(Boolean wrapWithForm)
          Modifier for the 'wrapWithForm' attribute.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HTML_ACTION_PARAMETER

public static final String HTML_ACTION_PARAMETER
The wizard's form navigation action parameter hidden field

See Also:
Constant Field Values

HTML_EXECUTION_STATE_PARAMETER

public static final String HTML_EXECUTION_STATE_PARAMETER
A parameter to control if the wizard step has executed

See Also:
Constant Field Values

HTML_STEP_PARAMETER

public static final String HTML_STEP_PARAMETER
The wizard's form active step parameter hidden field

See Also:
Constant Field Values

HTML_TO_STEP_PARAMETER

public static final String HTML_TO_STEP_PARAMETER
The wizard's form navigation go to step parameter hidden field

See Also:
Constant Field Values

LEFT_INDEX_LAYOUT

public static final String LEFT_INDEX_LAYOUT
The index layout rendered in the left of the wizard container

See Also:
Constant Field Values

TOP_INDEX_LAYOUT

public static final String TOP_INDEX_LAYOUT
The index layout rendered in the top of the wizard container

See Also:
Constant Field Values

TOP_INDEX_MAX_CHARS

public static final int TOP_INDEX_MAX_CHARS
Max chars that the top index may contain. More will force a dynamic shortening of the step names

See Also:
Constant Field Values

TOP_INDEX_SINGLE_MAX_CHARS

public static final int TOP_INDEX_SINGLE_MAX_CHARS
Max chars that the top index may contain in a single title. More will force a truncate operation on these specific titles

See Also:
Constant Field Values
Constructor Detail

WizardDefinition

public WizardDefinition(String name,
                        List<WizardStepItem> items)
Default constructor

Parameters:
name -
items -

WizardDefinition

public WizardDefinition(String name,
                        List<WizardStepItem> items,
                        int activeStep)
Default constructor

Parameters:
name -
items -
activeStep -
Method Detail

getWizardActiveStepNumber

public static int getWizardActiveStepNumber(pt.digitalis.dif.controller.interfaces.IDIFRequest request,
                                            String wizardName,
                                            boolean hasIndex,
                                            boolean canNavigate,
                                            WizardDefinition wizardDef)
Parameters:
request - the current stage dif request
wizardName - the wizard/form name
hasIndex - if the wizard has an index page
canNavigate - if the wizard can navigate from the present step
wizardDef - a wizard definition object instance if available
Returns:
the current active step number

getActiveStep

public int getActiveStep()
Returns:
the activeStep

getCanFinish

public Boolean getCanFinish()
Returns:
the canFinish

getDescription

public String getDescription()
Returns:
the description

getFormLayout

public String getFormLayout()
Inspector for the 'formLayout' attribute.

Returns:
the formLayout value

getHasIndexPage

public Boolean getHasIndexPage()
Returns:
the hasIndexPage

getHeight

public Integer getHeight()
Inspector for the 'height' attribute.

Returns:
the height value

getIndexLayout

public String getIndexLayout()
Returns:
the indexLayout

getItems

public List<WizardStepItem> getItems()
Returns:
the items

getName

public String getName()
Returns:
the name

getReadonly

public Boolean getReadonly()
Inspector for the 'readonly' attribute.

Returns:
the readonly value

getShowIndex

public Boolean getShowIndex()
Returns:
the showIndex

getSubmitTitle

public String getSubmitTitle()
Inspector for the 'submitTitle' attribute.

Returns:
the submitTitle value

getTitle

public String getTitle()
Returns:
the title

getTitlePrefix

public String getTitlePrefix()
Inspector for the 'titlePrefix' attribute.

Returns:
the titlePrefix value

getTopNavigation

public Boolean getTopNavigation()
Inspector for the 'topNavigation' attribute.

Returns:
the topNavigation value

getWrapWithForm

public Boolean getWrapWithForm()
Inspector for the 'wrapWithForm' attribute.

Returns:
the wrapWithForm value

isNoRequiredIndicator

public boolean isNoRequiredIndicator()
Inspector for the 'noRequiredIndicator' attribute.

Returns:
the noRequiredIndicator value

isShowTitlePrefix

public boolean isShowTitlePrefix()
Inspector for the 'showTitlePrefix' attribute.

Returns:
the showTitlePrefix value

setActiveStep

public void setActiveStep(int activeStep)
Parameters:
activeStep - the activeStep to set

setCanFinish

public void setCanFinish(Boolean canFinish)
Parameters:
canFinish - the canFinish to set

setDescription

public void setDescription(String description)
Parameters:
description - the description to set

setFormLayout

public void setFormLayout(String formLayout)
Modifier for the 'formLayout' attribute.

Parameters:
formLayout - the new formLayout value to set

setHasIndexPage

public void setHasIndexPage(Boolean hasIndexPage)
Parameters:
hasIndexPage - the hasIndexPage to set

setHeight

public void setHeight(Integer height)
Modifier for the 'height' attribute.

Parameters:
height - the new height value to set

setIndexLayout

public void setIndexLayout(String indexLayout)
Parameters:
indexLayout - the indexLayout to set

setItems

public void setItems(List<WizardStepItem> items)
Parameters:
items - the items to set

setName

public void setName(String name)
Parameters:
name - the name to set

setNoRequiredIndicator

public void setNoRequiredIndicator(boolean noRequiredIndicator)
Modifier for the 'noRequiredIndicator' attribute.

Parameters:
noRequiredIndicator - the new noRequiredIndicator value to set

setReadonly

public void setReadonly(Boolean readonly)
Modifier for the 'readonly' attribute.

Parameters:
readonly - the new readonly value to set

setShowIndex

public void setShowIndex(Boolean showIndex)
Parameters:
showIndex - the showIndex to set

setShowTitlePrefix

public void setShowTitlePrefix(boolean showTitlePrefix)
Modifier for the 'showTitlePrefix' attribute.

Parameters:
showTitlePrefix - the new showTitlePrefix value to set

setSubmitTitle

public void setSubmitTitle(String submitTitle)
Modifier for the 'submitTitle' attribute.

Parameters:
submitTitle - the new submitTitle value to set

setTitle

public void setTitle(String title)
Parameters:
title - the title to set

setTitlePrefix

public void setTitlePrefix(String titlePrefix)
Modifier for the 'titlePrefix' attribute.

Parameters:
titlePrefix - the new titlePrefix value to set

setTopNavigation

public void setTopNavigation(Boolean topNavigation)
Modifier for the 'topNavigation' attribute.

Parameters:
topNavigation - the new topNavigation value to set

setWrapWithForm

public void setWrapWithForm(Boolean wrapWithForm)
Modifier for the 'wrapWithForm' attribute.

Parameters:
wrapWithForm - the new wrapWithForm value to set


Copyright © 2010 Digitalis Informática Lda. All Rights Reserved.