com.sun.j2ee.blueprints.ui.progressbar
Class ProgressBarComponent

java.lang.Object
  extended by javax.faces.component.UIComponent
      extended by javax.faces.component.UIComponentBase
          extended by javax.faces.component.UICommand
              extended by com.sun.j2ee.blueprints.ui.progressbar.ProgressBarComponent
All Implemented Interfaces:
javax.faces.component.ActionSource, javax.faces.component.StateHolder

public class ProgressBarComponent
extends javax.faces.component.UICommand

Component that shows the progress of a long-running process.


Field Summary
static java.lang.String COMPONENT_FAMILY
          The standard component family for this component.
static int INDETERMINATE_INCREMENT_DEFAULT
          The default indeterminate increment value.
static int INDETERMINATE_INTERVAL_DEFAULT
          The default indeterminate interval value.
static int INDETERMINATE_SECTION_DEFAULT
          The default indeterminate section value.
static java.lang.String RENDERER_TYPE
          The standard renderer type for this component.
 
Fields inherited from class javax.faces.component.UICommand
COMPONENT_TYPE
 
Constructor Summary
ProgressBarComponent()
           
 
Method Summary
 java.lang.String getFamily()
          Return the component family for this component.
 int getIndeterminateIncrement()
          Get the percentage by which the bar's display will be incremented for an indeterminate case.
 int getIndeterminateInterval()
          Get the interval in milliseconds between updates to the bar's display for an indeterminate case.
 int getIndeterminateSection()
          Get a percentage indicating the length of the bar's middle section for an indeterminate case.
 int getInterval()
          Return the polling interval (in milliseconds) between ajax requests.
 java.lang.String getOnComplete()
          Get a scripting function that will be executed when progress is complete.
 java.lang.String getOnFail()
          Get a scripting function that will be executed when progress fails.
 java.lang.String getOnPoll()
          Get a scripting function that will be executed each time progress is updated.
 java.lang.String getOnUpdate()
          Get a scripting function that will be executed each time progress is updated.
 javax.faces.el.MethodBinding getPauseOperation()
          Get a method binding that is invoked to pause the long-running process.
 int getPercentage()
          Return the percentage of completion to be shown in the progress bar.
 java.lang.String getPercentageText()
          Get text that indicates the progress made so far.
 javax.faces.el.MethodBinding getResumeOperation()
          Get a method binding that is invoked to resume the long-running process.
 javax.faces.el.MethodBinding getStartOperation()
          Get a method binding that is invoked to start the long-running process.
 javax.faces.el.MethodBinding getStopOperation()
          Get a method binding that is invoked to stop the long-running process.
 java.lang.String getStyle()
          CSS style(s) to be applied when this component is rendered.
 java.lang.String getStyleClass()
          CSS style class(es) to be applied when this component is rendered.
 javax.faces.el.ValueBinding getValueBinding(java.lang.String name)
          Return the ValueBinding stored for the specified name (if any), respecting any property aliases.
 boolean isAutoStart()
          Get whether the component should begin polling when the page loads.
 boolean isFailed()
          Get whether the operation has failed.
 void restoreState(javax.faces.context.FacesContext context, java.lang.Object state)
           
 java.lang.Object saveState(javax.faces.context.FacesContext context)
          Return the state to be saved for this component.
 void setAutoStart(boolean autoStart)
          Set whether the component should begin polling when the page loads.
 void setFailed(boolean failed)
          Set whether the operation has failed.
 void setIndeterminateIncrement(int indeterminateIncrement)
          Set the percentage by which the bar's display will be incremented for an indeterminate case.
 void setIndeterminateInterval(int indeterminateInterval)
          Set the interval in milliseconds between updates to the bar's display for an indeterminate case.
 void setIndeterminateSection(int indeterminateSection)
          Set a percentage indicating the length of the bar's middle section for an indeterminate case.
 void setInterval(int newInterval)
          Set the polling interval (in milliseconds) between ajax requests.
 void setOnComplete(java.lang.String onComplete)
          Set a scripting function that will be executed when progress is complete.
 void setOnFail(java.lang.String onFail)
          Set a scripting function that will be executed when progress fails.
 void setOnPoll(java.lang.String onPoll)
          Set a scripting function that will be executed each time progress is updated.
 void setOnUpdate(java.lang.String onUpdate)
          Set a scripting function that will be executed each time progress is updated.
 void setPauseOperation(javax.faces.el.MethodBinding pauseOperation)
          Set a method binding that is invoked to pause the long-running process.
 void setPercentage(int percentage)
          Set the percentage of completion to be shown in the progress bar.
 void setPercentageText(java.lang.String percentageText)
          Set text that indicates the progress made so far.
 void setResumeOperation(javax.faces.el.MethodBinding resumeOperation)
          Set a method binding that is invoked to resume the long-running process.
 void setStartOperation(javax.faces.el.MethodBinding startOperation)
          Set a method binding that is invoked to start the long-running process.
 void setStopOperation(javax.faces.el.MethodBinding stopOperation)
          Set a method binding that is invoked to stop the long-running process.
 void setStyle(java.lang.String style)
          CSS style(s) to be applied when this component is rendered.
 void setStyleClass(java.lang.String styleClass)
          CSS style class(es) to be applied when this component is rendered.
 void setValueBinding(java.lang.String name, javax.faces.el.ValueBinding binding)
          Set the ValueBinding stored for the specified name (if any), respecting any property aliases.
 
Methods inherited from class javax.faces.component.UICommand
addActionListener, broadcast, getAction, getActionListener, getActionListeners, getValue, isImmediate, queueEvent, removeActionListener, setAction, setActionListener, setImmediate, setValue
 
Methods inherited from class javax.faces.component.UIComponentBase
addFacesListener, decode, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientId, getFacesContext, getFacesListeners, getFacet, getFacets, getFacetsAndChildren, getId, getParent, getRenderer, getRendererType, getRendersChildren, isRendered, isTransient, processDecodes, processRestoreState, processSaveState, processUpdates, processValidators, removeFacesListener, restoreAttachedState, saveAttachedState, setId, setParent, setRendered, setRendererType, setTransient
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COMPONENT_FAMILY

public static final java.lang.String COMPONENT_FAMILY

The standard component family for this component.

See Also:
Constant Field Values

RENDERER_TYPE

public static final java.lang.String RENDERER_TYPE

The standard renderer type for this component.

See Also:
Constant Field Values

INDETERMINATE_SECTION_DEFAULT

public static final int INDETERMINATE_SECTION_DEFAULT

The default indeterminate section value.

See Also:
Constant Field Values

INDETERMINATE_INTERVAL_DEFAULT

public static final int INDETERMINATE_INTERVAL_DEFAULT

The default indeterminate interval value.

See Also:
Constant Field Values

INDETERMINATE_INCREMENT_DEFAULT

public static final int INDETERMINATE_INCREMENT_DEFAULT

The default indeterminate increment value.

See Also:
Constant Field Values
Constructor Detail

ProgressBarComponent

public ProgressBarComponent()
Method Detail

getFamily

public java.lang.String getFamily()

Return the component family for this component.

Overrides:
getFamily in class javax.faces.component.UICommand

getValueBinding

public javax.faces.el.ValueBinding getValueBinding(java.lang.String name)

Return the ValueBinding stored for the specified name (if any), respecting any property aliases.

Overrides:
getValueBinding in class javax.faces.component.UIComponentBase
Parameters:
name - Name of value binding to retrieve

setValueBinding

public void setValueBinding(java.lang.String name,
                            javax.faces.el.ValueBinding binding)

Set the ValueBinding stored for the specified name (if any), respecting any property aliases.

Overrides:
setValueBinding in class javax.faces.component.UIComponentBase
Parameters:
name - Name of value binding to set
binding - ValueBinding to set, or null to remove

getInterval

public int getInterval()

Return the polling interval (in milliseconds) between ajax requests.


setInterval

public void setInterval(int newInterval)

Set the polling interval (in milliseconds) between ajax requests.


getPercentage

public int getPercentage()

Return the percentage of completion to be shown in the progress bar.


setPercentage

public void setPercentage(int percentage)

Set the percentage of completion to be shown in the progress bar.


getPercentageText

public java.lang.String getPercentageText()

Get text that indicates the progress made so far.


setPercentageText

public void setPercentageText(java.lang.String percentageText)

Set text that indicates the progress made so far.


getStartOperation

public javax.faces.el.MethodBinding getStartOperation()

Get a method binding that is invoked to start the long-running process. The method signature must be: public void xxxx(FacesContext fc). You can obtain parameters, including the progress bar client ID (bpui_progressbar_clientId), from the external request parameter map.


setStartOperation

public void setStartOperation(javax.faces.el.MethodBinding startOperation)

Set a method binding that is invoked to start the long-running process. The method signature must be: public void xxxx(FacesContext fc). You can obtain parameters, including the progress bar client ID (bpui_progressbar_clientId), from the external request parameter map.


getPauseOperation

public javax.faces.el.MethodBinding getPauseOperation()

Get a method binding that is invoked to pause the long-running process. The method signature must be: public void xxxx(FacesContext fc). You can obtain parameters, including the progress bar client ID (bpui_progressbar_clientId), from the external request parameter map.


setPauseOperation

public void setPauseOperation(javax.faces.el.MethodBinding pauseOperation)

Set a method binding that is invoked to pause the long-running process. The method signature must be: public void xxxx(FacesContext fc). You can obtain parameters, including the progress bar client ID (bpui_progressbar_clientId), from the external request parameter map.


getResumeOperation

public javax.faces.el.MethodBinding getResumeOperation()

Get a method binding that is invoked to resume the long-running process. The method signature must be: public void xxxx(FacesContext fc). You can obtain parameters, including the progress bar client ID (bpui_progressbar_clientId), from the external request parameter map.


setResumeOperation

public void setResumeOperation(javax.faces.el.MethodBinding resumeOperation)

Set a method binding that is invoked to resume the long-running process. The method signature must be: public void xxxx(FacesContext fc). You can obtain parameters, including the progress bar client ID (bpui_progressbar_clientId), from the external request parameter map.


getStopOperation

public javax.faces.el.MethodBinding getStopOperation()

Get a method binding that is invoked to stop the long-running process. The method signature must be: public void xxxx(FacesContext fc). You can obtain parameters, including the progress bar client ID (bpui_progressbar_clientId), from the external request parameter map.


setStopOperation

public void setStopOperation(javax.faces.el.MethodBinding stopOperation)

Set a method binding that is invoked to stop the long-running process. The method signature must be: public void xxxx(FacesContext fc). You can obtain parameters, including the progress bar client ID (bpui_progressbar_clientId), from the external request parameter map.


getOnComplete

public java.lang.String getOnComplete()

Get a scripting function that will be executed when progress is complete.


setOnComplete

public void setOnComplete(java.lang.String onComplete)

Set a scripting function that will be executed when progress is complete.


getOnFail

public java.lang.String getOnFail()

Get a scripting function that will be executed when progress fails.


setOnFail

public void setOnFail(java.lang.String onFail)

Set a scripting function that will be executed when progress fails.


getOnUpdate

public java.lang.String getOnUpdate()

Get a scripting function that will be executed each time progress is updated.


setOnUpdate

public void setOnUpdate(java.lang.String onUpdate)

Set a scripting function that will be executed each time progress is updated.


getOnPoll

public java.lang.String getOnPoll()

Get a scripting function that will be executed each time progress is updated.


setOnPoll

public void setOnPoll(java.lang.String onPoll)

Set a scripting function that will be executed each time progress is updated.


isAutoStart

public boolean isAutoStart()

Get whether the component should begin polling when the page loads.


setAutoStart

public void setAutoStart(boolean autoStart)

Set whether the component should begin polling when the page loads.


isFailed

public boolean isFailed()

Get whether the operation has failed. This property, if used, must be bound.


setFailed

public void setFailed(boolean failed)

Set whether the operation has failed. This property, if used, must be bound.


getIndeterminateSection

public int getIndeterminateSection()

Get a percentage indicating the length of the bar's middle section for an indeterminate case.


setIndeterminateSection

public void setIndeterminateSection(int indeterminateSection)

Set a percentage indicating the length of the bar's middle section for an indeterminate case.


getIndeterminateInterval

public int getIndeterminateInterval()

Get the interval in milliseconds between updates to the bar's display for an indeterminate case.


setIndeterminateInterval

public void setIndeterminateInterval(int indeterminateInterval)

Set the interval in milliseconds between updates to the bar's display for an indeterminate case.


getIndeterminateIncrement

public int getIndeterminateIncrement()

Get the percentage by which the bar's display will be incremented for an indeterminate case.


setIndeterminateIncrement

public void setIndeterminateIncrement(int indeterminateIncrement)

Set the percentage by which the bar's display will be incremented for an indeterminate case.


getStyle

public java.lang.String getStyle()

CSS style(s) to be applied when this component is rendered.


setStyle

public void setStyle(java.lang.String style)

CSS style(s) to be applied when this component is rendered.

See Also:
getStyle()

getStyleClass

public java.lang.String getStyleClass()

CSS style class(es) to be applied when this component is rendered.


setStyleClass

public void setStyleClass(java.lang.String styleClass)

CSS style class(es) to be applied when this component is rendered.

See Also:
getStyleClass()

saveState

public java.lang.Object saveState(javax.faces.context.FacesContext context)

Return the state to be saved for this component.

Specified by:
saveState in interface javax.faces.component.StateHolder
Overrides:
saveState in class javax.faces.component.UICommand
Parameters:
context - FacesContext for the current request

restoreState

public void restoreState(javax.faces.context.FacesContext context,
                         java.lang.Object state)
Specified by:
restoreState in interface javax.faces.component.StateHolder
Overrides:
restoreState in class javax.faces.component.UICommand