com.sun.webui.jsf.component
Class FileChooser

java.lang.Object
  extended by javax.faces.component.UIComponent
      extended by javax.faces.component.UIComponentBase
          extended by javax.faces.component.UIOutput
              extended by javax.faces.component.UIInput
                  extended by com.sun.webui.jsf.component.WebuiInput
                      extended by com.sun.webui.jsf.component.FileChooser
All Implemented Interfaces:
javax.faces.component.EditableValueHolder, javax.faces.component.NamingContainer, javax.faces.component.StateHolder, javax.faces.component.ValueHolder

public class FileChooser
extends WebuiInput
implements javax.faces.component.NamingContainer

The FileChooser component allows the user to select files and folders.


Field Summary
static java.lang.String ALPHABETIC
          Alphabetic sort field type
static java.lang.String ALPHABETIC_ASC
           
static java.lang.String ALPHABETIC_DSC
           
static java.lang.String FILECHOOSER_ENTERPRESS_HELP_FACET
           
static java.lang.String FILECHOOSER_FILTER_LABEL_FACET
           
static java.lang.String FILECHOOSER_FILTERON_TEXTFIELD_FACET
           
static java.lang.String FILECHOOSER_HIDDEN_BUTTON_FACET
           
static java.lang.String FILECHOOSER_HIDDENFIELD_ID
           
static java.lang.String FILECHOOSER_LABEL_FACET
           
static java.lang.String FILECHOOSER_LISTBOX_FACET
           
static java.lang.String FILECHOOSER_LOOKIN_LABEL_FACET
           
static java.lang.String FILECHOOSER_LOOKIN_TEXTFIELD_FACET
           
static java.lang.String FILECHOOSER_MULTISELECT_HELP_FACET
           
static java.lang.String FILECHOOSER_OPENFOLDER_BUTTON_FACET
           
static java.lang.String FILECHOOSER_SELECT_LABEL_FACET
           
static java.lang.String FILECHOOSER_SELECTED_TEXTFIELD_FACET
           
static java.lang.String FILECHOOSER_SERVERNAME_LABEL_FACET
           
static java.lang.String FILECHOOSER_SERVERNAME_STATICTEXT_FACET
          default component ids
static java.lang.String FILECHOOSER_SORT_LABEL_FACET
           
static java.lang.String FILECHOOSER_SORTMENU_FACET
           
static java.lang.String FILECHOOSER_UPLEVEL_BUTTON_FACET
           
static java.lang.String HYPHEN
           
static java.lang.String LASTMODIFIED
          Sort "by last modified" field type
static java.lang.String LASTMODIFIED_ASC
           
static java.lang.String LASTMODIFIED_DSC
           
static java.lang.String SIZE
          Sort "by size" field type
static java.lang.String SIZE_ASC
           
static java.lang.String SIZE_DSC
           
 
Fields inherited from class javax.faces.component.UIInput
COMPONENT_FAMILY, COMPONENT_TYPE, CONVERSION_MESSAGE_ID, REQUIRED_MESSAGE_ID, UPDATE_MESSAGE_ID
 
Fields inherited from interface javax.faces.component.NamingContainer
SEPARATOR_CHAR
 
Constructor Summary
FileChooser()
          Default constructor.
 
Method Summary
 void displayAlert(java.lang.String summary, java.lang.String detail, java.lang.String[] summaryArgs, java.lang.String[] detailArgs)
          This method handles the display of error messages.
 java.lang.Object getConvertedValue(javax.faces.context.FacesContext context, FileChooser chooser, java.lang.Object submittedValue)
          Overloaded getConvertedValue called by our renderer.
 java.lang.Object getConvertedValue(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, java.lang.Object submittedValue)
          Create a value for the fileChooser component based on the submitted value, which are the user selections.
 java.lang.String getCurrentFolder()
          Return the current folder.
 java.lang.String getDelimiterChar()
           
 javax.faces.component.UIComponent getEnterInlineHelp()
          Return a component that implements the inline help for the filter text field.
 java.lang.String getEscapeChar()
           
 java.lang.String getFamily()
          Return the family for this component.
 javax.faces.component.UIComponent getFileChooserTitle()
          Return a component that implements the title text.
 javax.faces.component.UIComponent getFilterLabel()
          Return a component that implements the filter input field label.
 javax.faces.component.UIComponent getFilterTextField()
          Return a component that implements the filter input field.
 javax.faces.component.UIComponent getHiddenFCButton()
          Get a hidden button.
 javax.faces.component.UIComponent getListComponent()
          Return a component that implements the list of files and folders.
 java.lang.Object getLookin()
           
 javax.faces.component.UIComponent getLookInLabel()
          Return a component that implements the look in input field label.
 javax.faces.component.UIComponent getLookInTextField()
          Return a component that implements the look in input field.
 com.sun.webui.jsf.model.ResourceModel getModel()
           
 javax.faces.component.UIComponent getMultiSelectHelp()
          Return a component that implements the inline help for selecting multiple rows from the listbox.
 javax.faces.component.UIComponent getOpenFolderButton()
          Return a component that implements the open folder button.
 java.lang.String getParentFolder()
          Return the current folder's parent folder.
 java.lang.String[] getRoots()
           
 int getRows()
           
 java.lang.Object getSelected()
          This attribute represents the value of the fileChooser.
 javax.faces.component.UIComponent getSelectedTextField()
          Return a component that implements the selected file(s) or folder(s) input field.
 javax.faces.component.UIComponent getSelectLabel()
          Return a component that implements the selected file(s) or folder(s) input field label.
 java.lang.String getSeparatorString()
          Return the path element separator.
 javax.faces.component.UIComponent getServerNameLabel()
          Return a component that implements the server name field label.
 javax.faces.component.UIComponent getServerNameText()
          Return a component that implements the server name field.
 javax.faces.component.UIComponent getSortComponent()
          Return a component that implements the sort criteria menu.
 javax.faces.component.UIComponent getSortComponentLabel()
          Return a component that implements the sort criteria menu.
 java.lang.String getSortField()
           
 java.lang.String getStyle()
           
 java.lang.String getStyleClass()
           
 int getTabIndex()
          Position of this element in the tabbing order of the current document.
 javax.faces.component.UIComponent getUpLevelButton(boolean disabled)
          Return a component that implements the move up button.
 java.lang.Object getValue()
           
 javax.el.ValueExpression getValueExpression(java.lang.String name)
          Return the ValueExpression stored for the specified name (if any), respecting any property aliases.
 boolean isDescending()
           
 boolean isDisabled()
           
 boolean isFileAndFolderChooser()
           
 boolean isFolderChooser()
           
 boolean isMultiple()
           
 boolean isReadOnly()
           
 boolean isRequired()
           
 boolean isVisible()
          Use the visible attribute to indicate whether the component should be viewable by the user in the rendered HTML page.
 void processDecodes(javax.faces.context.FacesContext context)
          Override the default UIComponentBase.processDecodes(javax.faces.context.FacesContext) processing to perform the following steps.
 void processValidators(javax.faces.context.FacesContext context)
          Override the default UIComponentBase.processValidators(javax.faces.context.FacesContext) processing to perform the following steps.
 void restoreState(javax.faces.context.FacesContext _context, java.lang.Object _state)
          Restore the state of this component.
 java.lang.Object saveState(javax.faces.context.FacesContext _context)
          Save the state of this component.
 void setDescending(boolean descending)
          Set descending to true to sort from the highest value to lowest value, such as Z-A for alphabetic, or largest file to smallest for sorting on file size.
 void setDisabled(boolean disabled)
          Indicates that activation of this component by the user is not currently permitted.
 void setFileAndFolderChooser(boolean flag)
           
 void setFolderChooser(boolean chooser)
           
 void setLookin(java.lang.Object lookin)
          Use this attribute to specify the initial folder to display in the Look In text field.
 void setModel(com.sun.webui.jsf.model.ResourceModel model)
          Specifies the model associated with the FileChooser.
 void setMultiple(boolean multiple)
          Set multiple to true to allow multiple files or folders to be selected from the list.
 void setReadOnly(boolean readOnly)
          If readOnly is set to true, the value of the component is rendered as text, preceded by the label if one was defined.
 void setRows(int rows)
          The number of items to display in the listbox.
 void setSelected(java.lang.Object selected)
          This attribute represents the value of the fileChooser.
 void setSortField(java.lang.String sortField)
          Field to use to sort the list of files.
 void setStyle(java.lang.String style)
          CSS style(s) to be applied to the outermost HTML element when this component is rendered.
 void setStyleClass(java.lang.String styleClass)
          CSS style class(es) to be applied to the outermost HTML element when this component is rendered.
 void setTabIndex(int tabIndex)
          Position of this element in the tabbing order of the current document.
 void setValueExpression(java.lang.String name, javax.el.ValueExpression binding)
          Set the ValueExpression stored for the specified name (if any), respecting any property aliases.
 void setVisible(boolean visible)
          Use the visible attribute to indicate whether the component should be viewable by the user in the rendered HTML page.
 void updateModel(javax.faces.context.FacesContext context)
          Perform the following algorithm to update the model data associated with this UIInput, if any, as appropriate.
 void validate(javax.faces.context.FacesContext context)
          Retrieve the submitted value with getSubmittedValue().
 void validateFilterComponent(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, java.lang.Object value)
          This validation method is in addition to any that might be part of the component when specified as a facet.
 void validateLookInComponent(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, java.lang.Object value)
          This validation method is in addition to any that might be part of the component when specified as a facet.
 void validateSelectComponent(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, java.lang.Object value)
          This validation method is in addition to any that might be part of the component if specified as a facet.
 void validateSortComponent(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, java.lang.Object value)
          This validation method is in addition to any that might be part of the component if specified as a facet.
 
Methods inherited from class com.sun.webui.jsf.component.WebuiInput
broadcast, getValidator, getValidatorExpression, getValueChangeListener, getValueChangeListenerExpression, processUpdates, setConverter, setId, setImmediate, setRendered, setRequired, setValidatorExpression, setValueChangeListenerExpression
 
Methods inherited from class javax.faces.component.UIInput
addValidator, addValueChangeListener, decode, getConverterMessage, getRequiredMessage, getSubmittedValue, getValidatorMessage, getValidators, getValueChangeListeners, isImmediate, isLocalValueSet, isValid, removeValidator, removeValueChangeListener, resetValue, setConverterMessage, setLocalValueSet, setRequiredMessage, setSubmittedValue, setValid, setValidator, setValidatorMessage, setValue, setValueChangeListener
 
Methods inherited from class javax.faces.component.UIOutput
getConverter, getLocalValue
 
Methods inherited from class javax.faces.component.UIComponentBase
encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientId, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getParent, getRendererType, getRendersChildren, getValueBinding, invokeOnComponent, isRendered, isTransient, processRestoreState, processSaveState, queueEvent, restoreAttachedState, saveAttachedState, setParent, setRendererType, setTransient, setValueBinding
 
Methods inherited from class javax.faces.component.UIComponent
encodeAll, getContainerClientId
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.faces.component.ValueHolder
getConverter, getLocalValue
 

Field Detail

ALPHABETIC

public static final java.lang.String ALPHABETIC
Alphabetic sort field type

See Also:
Constant Field Values

ALPHABETIC_ASC

public static final java.lang.String ALPHABETIC_ASC
See Also:
Constant Field Values

ALPHABETIC_DSC

public static final java.lang.String ALPHABETIC_DSC
See Also:
Constant Field Values

SIZE

public static final java.lang.String SIZE
Sort "by size" field type

See Also:
Constant Field Values

SIZE_ASC

public static final java.lang.String SIZE_ASC
See Also:
Constant Field Values

SIZE_DSC

public static final java.lang.String SIZE_DSC
See Also:
Constant Field Values

LASTMODIFIED

public static final java.lang.String LASTMODIFIED
Sort "by last modified" field type

See Also:
Constant Field Values

LASTMODIFIED_ASC

public static final java.lang.String LASTMODIFIED_ASC
See Also:
Constant Field Values

LASTMODIFIED_DSC

public static final java.lang.String LASTMODIFIED_DSC
See Also:
Constant Field Values

FILECHOOSER_SERVERNAME_STATICTEXT_FACET

public static java.lang.String FILECHOOSER_SERVERNAME_STATICTEXT_FACET
default component ids


FILECHOOSER_SERVERNAME_LABEL_FACET

public static java.lang.String FILECHOOSER_SERVERNAME_LABEL_FACET

FILECHOOSER_ENTERPRESS_HELP_FACET

public static java.lang.String FILECHOOSER_ENTERPRESS_HELP_FACET

FILECHOOSER_MULTISELECT_HELP_FACET

public static java.lang.String FILECHOOSER_MULTISELECT_HELP_FACET

FILECHOOSER_LOOKIN_TEXTFIELD_FACET

public static java.lang.String FILECHOOSER_LOOKIN_TEXTFIELD_FACET

FILECHOOSER_LOOKIN_LABEL_FACET

public static java.lang.String FILECHOOSER_LOOKIN_LABEL_FACET

FILECHOOSER_LABEL_FACET

public static java.lang.String FILECHOOSER_LABEL_FACET

FILECHOOSER_FILTERON_TEXTFIELD_FACET

public static java.lang.String FILECHOOSER_FILTERON_TEXTFIELD_FACET

FILECHOOSER_FILTER_LABEL_FACET

public static java.lang.String FILECHOOSER_FILTER_LABEL_FACET

FILECHOOSER_SELECTED_TEXTFIELD_FACET

public static java.lang.String FILECHOOSER_SELECTED_TEXTFIELD_FACET

FILECHOOSER_SELECT_LABEL_FACET

public static java.lang.String FILECHOOSER_SELECT_LABEL_FACET

FILECHOOSER_UPLEVEL_BUTTON_FACET

public static java.lang.String FILECHOOSER_UPLEVEL_BUTTON_FACET

FILECHOOSER_OPENFOLDER_BUTTON_FACET

public static java.lang.String FILECHOOSER_OPENFOLDER_BUTTON_FACET

FILECHOOSER_SORTMENU_FACET

public static java.lang.String FILECHOOSER_SORTMENU_FACET

FILECHOOSER_SORT_LABEL_FACET

public static java.lang.String FILECHOOSER_SORT_LABEL_FACET

FILECHOOSER_HIDDEN_BUTTON_FACET

public static java.lang.String FILECHOOSER_HIDDEN_BUTTON_FACET

FILECHOOSER_LISTBOX_FACET

public static java.lang.String FILECHOOSER_LISTBOX_FACET

FILECHOOSER_HIDDENFIELD_ID

public static java.lang.String FILECHOOSER_HIDDENFIELD_ID

HYPHEN

public static final java.lang.String HYPHEN
See Also:
Constant Field Values
Constructor Detail

FileChooser

public FileChooser()
Default constructor.

Method Detail

getFamily

public java.lang.String getFamily()

Return the family for this component.

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

getEscapeChar

public java.lang.String getEscapeChar()

getDelimiterChar

public java.lang.String getDelimiterChar()

getCurrentFolder

public java.lang.String getCurrentFolder()
Return the current folder. The value of getModel().getCurrentDir() is returned.


getSeparatorString

public java.lang.String getSeparatorString()
Return the path element separator. The value of getModel().getSeparatorString() is returned.


getParentFolder

public java.lang.String getParentFolder()
Return the current folder's parent folder. The value of getModel().getParentFolder() is returned. If model is FileChooserModel and there is no parent folder null is returned.


setFileAndFolderChooser

public void setFileAndFolderChooser(boolean flag)

isFileAndFolderChooser

public boolean isFileAndFolderChooser()

isFolderChooser

public boolean isFolderChooser()

setFolderChooser

public void setFolderChooser(boolean chooser)

getModel

public com.sun.webui.jsf.model.ResourceModel getModel()

getRoots

public java.lang.String[] getRoots()

processDecodes

public void processDecodes(javax.faces.context.FacesContext context)

Override the default UIComponentBase.processDecodes(javax.faces.context.FacesContext) processing to perform the following steps.

Overrides:
processDecodes in class WebuiInput
Parameters:
context - FacesContext for the current request
Throws:
java.lang.NullPointerException - if context is null

processValidators

public void processValidators(javax.faces.context.FacesContext context)

Override the default UIComponentBase.processValidators(javax.faces.context.FacesContext) processing to perform the following steps.

Overrides:
processValidators in class WebuiInput
Parameters:
context - FacesContext for the current request
Throws:
java.lang.NullPointerException - if context is null

validate

public void validate(javax.faces.context.FacesContext context)

Retrieve the submitted value with getSubmittedValue(). If this returns null, exit without further processing. (This indicates that no value was submitted for fileChooser.) Convert the submitted value into a "local value" of the appropriate data type by calling getConvertedValue(javax.faces.context.FacesContext, java.lang.Object). Validate the property by calling validateValue(javax.faces.context.FacesContext, java.lang.Object). If the valid property of this component is still true, retrieve the previous value of the component (with getValue()), store the new local value using setValue(), and reset the submitted value to null. If the local value is different from the previous value of this component, fire a ValueChangeEvent to be broadcast to all interested listeners. processing to perform the following steps.

Overrides:
validate in class javax.faces.component.UIInput
Parameters:
context - FacesContext for the current request
Throws:
java.lang.NullPointerException - if context is null

validateLookInComponent

public void validateLookInComponent(javax.faces.context.FacesContext context,
                                    javax.faces.component.UIComponent component,
                                    java.lang.Object value)
                             throws javax.faces.validator.ValidatorException
This validation method is in addition to any that might be part of the component when specified as a facet. Throw a ValidatorException with a FacesMessage explaining what happened. Called from ChooserLookInValidator.

Throws:
javax.faces.validator.ValidatorException

validateFilterComponent

public void validateFilterComponent(javax.faces.context.FacesContext context,
                                    javax.faces.component.UIComponent component,
                                    java.lang.Object value)
                             throws javax.faces.validator.ValidatorException
This validation method is in addition to any that might be part of the component when specified as a facet. Throw a ValidatorException with a FacesMessage explaining what happened. Called from ChooserFilterValidator.

Throws:
javax.faces.validator.ValidatorException

validateSortComponent

public void validateSortComponent(javax.faces.context.FacesContext context,
                                  javax.faces.component.UIComponent component,
                                  java.lang.Object value)
                           throws javax.faces.validator.ValidatorException
This validation method is in addition to any that might be part of the component if specified as a facet. Throw a ValidatorException with a FacesMessage explaining what happened. Called from ChooserSortValidator.

Throws:
javax.faces.validator.ValidatorException

validateSelectComponent

public void validateSelectComponent(javax.faces.context.FacesContext context,
                                    javax.faces.component.UIComponent component,
                                    java.lang.Object value)
                             throws javax.faces.validator.ValidatorException
This validation method is in addition to any that might be part of the component if specified as a facet. Throw a ValidatorException with a FacesMessage explaining what happened. Called from ChooserSelectValidator.

Throws:
javax.faces.validator.ValidatorException

updateModel

public void updateModel(javax.faces.context.FacesContext context)
Perform the following algorithm to update the model data associated with this UIInput, if any, as appropriate. If the valid property of filechooser is false, take no further action. If the localValueSet property of this component is false, take no further action. If no ValueBinding for value exists, take no further action. Call setValue() method of the ValueBinding to update the value that the ValueBinding points at. If the setValue() method returns successfully: o Clear the local value of this UIInput. o Set the localValueSet property of this UIInput to false. If the setValue() method call fails: o Enqueue an error message by calling addMessage() on the specified FacesContext instance. o Set the valid property of this UIInput to false.

Overrides:
updateModel in class javax.faces.component.UIInput

getConvertedValue

public java.lang.Object getConvertedValue(javax.faces.context.FacesContext context,
                                          javax.faces.component.UIComponent component,
                                          java.lang.Object submittedValue)
                                   throws javax.faces.convert.ConverterException
Create a value for the fileChooser component based on the submitted value, which are the user selections. The selections may be absolute or relative paths. The result is an array of objects.

Returns:
- an object that reflects the value of the fileChooser component.
Throws:
javax.faces.convert.ConverterException

getConvertedValue

public java.lang.Object getConvertedValue(javax.faces.context.FacesContext context,
                                          FileChooser chooser,
                                          java.lang.Object submittedValue)
                                   throws javax.faces.convert.ConverterException
Overloaded getConvertedValue called by our renderer. We have this method because the we want the implementation of getConvertedValue to exist in the component and not solely in the renderer. However JSF by convention defers to the renderer first in getConvertedValue and if there isn't a renderer will getConvetedValue(FacesContext, UIComponent, Object) calls this method. Typically our renderer is registered as the renferer for this component. Therefore it calls this method to obtain the the value when the other getConvertedValue is called and tries exectute its getConvertedValue.

Throws:
javax.faces.convert.ConverterException

getServerNameText

public javax.faces.component.UIComponent getServerNameText()
Return a component that implements the server name field. If a facet named serverNameText is found that component is returned. Otherwise a StaticText component is returned. It is assigned the id
getId() + "_serverNameText"

If the facet is not defined then the returned StaticText component is recreated every time this method is called.

Returns:
- the server name field component

getEnterInlineHelp

public javax.faces.component.UIComponent getEnterInlineHelp()
Return a component that implements the inline help for the filter text field. If a facet named enterPressHelp is found that component is returned. Otherwise a HelpInline component is returned. It is assigned the id
getId() + "_enterPressHelp"

If the facet is not defined then the returned StaticText component is created every time this method is called.

Returns:
the inline help component

getMultiSelectHelp

public javax.faces.component.UIComponent getMultiSelectHelp()
Return a component that implements the inline help for selecting multiple rows from the listbox. If the isMultiple returns false, null is returned.
If a facet named multiSelectHelp is found that component is returned. Otherwise a HelpInline component is returned. It is assigned the id
getId() + "_multiSelectHelp"

If the facet is not defined then the returned HelpInline component is created every time this method is called.

Returns:
the inline help component

getServerNameLabel

public javax.faces.component.UIComponent getServerNameLabel()
Return a component that implements the server name field label. If a facet named serverLabel is found that component is returned. Otherwise a Label component is returned. It is assigned the id
getId() + "_serverLabel"

If the facet is not defined then the returned Label component is created every time this method is called.

Returns:
the server name field label component

getFileChooserTitle

public javax.faces.component.UIComponent getFileChooserTitle()
Return a component that implements the title text. If a facet named fileChooserLabel is found that component is returned. Otherwise a StaticText component is returned. It is assigned the id
getId() + "_fileChooserLabel"

If the facet is not defined then the returned StaticText component is created every time this method is called.

Returns:
the FileChooser title component

getLookInTextField

public javax.faces.component.UIComponent getLookInTextField()
Return a component that implements the look in input field. If a facet named lookinField is found that component is returned. Otherwise a TextField component is returned. It is assigned the id
getId() + "_lookinField"

If the facet is not defined then the returned TextField component is re-intialized every time this method is called.

Returns:
the look in input field component

getLookInLabel

public javax.faces.component.UIComponent getLookInLabel()
Return a component that implements the look in input field label. If a facet named lookinLabel is found that component is returned. Otherwise a Label component is returned. It is assigned the id
getId() + "_lookinLabel"

If the facet is not defined then the returned Label component is re-intialized every time this method is called.

Returns:
the look in input field label component

getFilterTextField

public javax.faces.component.UIComponent getFilterTextField()
Return a component that implements the filter input field. If a facet named filterField is found that component is returned. Otherwise a TextField component is returned. It is assigned the id
getId() + "_filterField"

If the facet is not defined then the returned TextField component is re-intialized every time this method is called.

Returns:
the filter input field component

getFilterLabel

public javax.faces.component.UIComponent getFilterLabel()
Return a component that implements the filter input field label. If a facet named filterLabel is found that component is returned. Otherwise a Label component is returned. It is assigned the id
getId() + "_filterLabel"

If the facet is not defined then the returned Label component is re-intialized every time this method is called.

Returns:
the filter input field label component

getSelectedTextField

public javax.faces.component.UIComponent getSelectedTextField()
Return a component that implements the selected file(s) or folder(s) input field. If a facet named selectedField is found that component is returned. Otherwise a TextField component is returned. It is assigned the id
getId() + "_selectedField"

If the facet is not defined then the returned TextField component is re-intialized every time this method is called.

Returns:
the select text field component. This text field displays the list of selected items.

getSelectLabel

public javax.faces.component.UIComponent getSelectLabel()
Return a component that implements the selected file(s) or folder(s) input field label. If a facet named selectedLabel is found that component is returned. Otherwise a Label component is returned. It is assigned the id
getId() + "_selectedLabel"

If the facet is not defined then the returned Label component is re-intialized every time this method is called.

Returns:
- returns the selected text field label component

getSortComponent

public javax.faces.component.UIComponent getSortComponent()
Return a component that implements the sort criteria menu. If a facet named sortMenu is found that component is returned. Otherwise a DropDown component is returned. It is assigned the id
getId() + "_sortMenu"

If the facet is not defined then the returned DropDown component is re-intialized every time this method is called.

Returns:
the dropdown sort menu component

getSortComponentLabel

public javax.faces.component.UIComponent getSortComponentLabel()
Return a component that implements the sort criteria menu. If a facet named sortMenu is found that component is returned. Otherwise a DropDown component is returned. It is assigned the id
getId() + "_sortMenu"

If the facet is not defined then the returned DropDown component is re-intialized every time this method is called.

Returns:
the dropdown sort menu component

getListComponent

public javax.faces.component.UIComponent getListComponent()
Return a component that implements the list of files and folders. It is assigned the id
getId() + "_listEntries"

The returned Listbox component is re-intialized every time this method is called.

Returns:
the dropdown sort menu component

getUpLevelButton

public javax.faces.component.UIComponent getUpLevelButton(boolean disabled)
Return a component that implements the move up button. If a facet named upButton is found that component is returned. Otherwise a Button component is returned. It is assigned the id
getId() + "_upButton"

If the facet is not defined then the returned Button component is re-intialized every time this method is called.

Parameters:
disabled - Flag indicating button is disabled
Returns:
the button component for moving up the folder hierarchy

getOpenFolderButton

public javax.faces.component.UIComponent getOpenFolderButton()
Return a component that implements the open folder button. If a facet named openButton is found that component is returned. Otherwise a Button component is returned. It is assigned the id
getId() + "_openButton"

If the facet is not defined then the returned Button component is re-intialized every time this method is called.

Returns:
the OpenFolder button component.

getHiddenFCButton

public javax.faces.component.UIComponent getHiddenFCButton()
Get a hidden button. In order to associate all user actions with an ActionEvent and have a single ActionListener to listen for these events a hidden button is being created to monitor changes in texh filed values. When a user enters data in a text field and hits enter a click of this hidden button will be initiated using Javascript.

Returns:
the hidden button component.

restoreState

public void restoreState(javax.faces.context.FacesContext _context,
                         java.lang.Object _state)

Restore the state of this component.

Specified by:
restoreState in interface javax.faces.component.StateHolder
Overrides:
restoreState in class WebuiInput

saveState

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

Save the state of this component.

Specified by:
saveState in interface javax.faces.component.StateHolder
Overrides:
saveState in class WebuiInput

displayAlert

public void displayAlert(java.lang.String summary,
                         java.lang.String detail,
                         java.lang.String[] summaryArgs,
                         java.lang.String[] detailArgs)
This method handles the display of error messages.

Parameters:
summary - The error message summary
detail - The error message detail

getValueExpression

public javax.el.ValueExpression getValueExpression(java.lang.String name)

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

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

setValueExpression

public void setValueExpression(java.lang.String name,
                               javax.el.ValueExpression binding)

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

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

isRequired

public boolean isRequired()
Specified by:
isRequired in interface javax.faces.component.EditableValueHolder
Overrides:
isRequired in class javax.faces.component.UIInput

isVisible

public boolean isVisible()

Use the visible attribute to indicate whether the component should be viewable by the user in the rendered HTML page. If set to false, the HTML code for the component is present in the page, but the component is hidden with style attributes. By default, visible is set to true, so HTML for the component HTML is included and visible to the user. If the component is not visible, it can still be processed on subsequent form submissions because the HTML is present.


setVisible

public void setVisible(boolean visible)

Use the visible attribute to indicate whether the component should be viewable by the user in the rendered HTML page. If set to false, the HTML code for the component is present in the page, but the component is hidden with style attributes. By default, visible is set to true, so HTML for the component HTML is included and visible to the user. If the component is not visible, it can still be processed on subsequent form submissions because the HTML is present.

See Also:
isVisible()

getTabIndex

public int getTabIndex()

Position of this element in the tabbing order of the current document. Tabbing order determines the sequence in which elements receive focus when the tab key is pressed. The value must be an integer between 0 and 32767.


setTabIndex

public void setTabIndex(int tabIndex)

Position of this element in the tabbing order of the current document. Tabbing order determines the sequence in which elements receive focus when the tab key is pressed. The value must be an integer between 0 and 32767.

See Also:
getTabIndex()

getValue

public java.lang.Object getValue()
Specified by:
getValue in interface javax.faces.component.ValueHolder
Overrides:
getValue in class javax.faces.component.UIOutput

isDescending

public boolean isDescending()

setDescending

public void setDescending(boolean descending)

Set descending to true to sort from the highest value to lowest value, such as Z-A for alphabetic, or largest file to smallest for sorting on file size. The default is to sort in ascending order.

See Also:
isDescending()

isDisabled

public boolean isDisabled()

setDisabled

public void setDisabled(boolean disabled)

Indicates that activation of this component by the user is not currently permitted.

See Also:
isDisabled()

getLookin

public java.lang.Object getLookin()

setLookin

public void setLookin(java.lang.Object lookin)

Use this attribute to specify the initial folder to display in the Look In text field. The contents of this folder will be displayed. Only java.io.File or java.lang.String objects can be bound to this attribute.

See Also:
getLookin()

setModel

public void setModel(com.sun.webui.jsf.model.ResourceModel model)

Specifies the model associated with the FileChooser. The model provides the file chooser with content displayed in the file chooser's list. It provides other services as defined incom.sun.webui.jsf.model.ResourceModel. If the model attribute is not assigned a value, a FileChooserModel is used as the ResourceModel instance. A value binding assigned to this attribute must return an instance of ResourceModel.

See Also:
getModel()

isMultiple

public boolean isMultiple()

setMultiple

public void setMultiple(boolean multiple)

Set multiple to true to allow multiple files or folders to be selected from the list. The default is false, which allows only one item to be selected.

See Also:
isMultiple()

isReadOnly

public boolean isReadOnly()

setReadOnly

public void setReadOnly(boolean readOnly)

If readOnly is set to true, the value of the component is rendered as text, preceded by the label if one was defined.

See Also:
isReadOnly()

getRows

public int getRows()

setRows

public void setRows(int rows)

The number of items to display in the listbox. The value must be greater than or equal to one. The default value is 12. Invalid values are ignored and the value is set to 12.

See Also:
getRows()

getSelected

public java.lang.Object getSelected()

This attribute represents the value of the fileChooser. Depending on the value of the folderChooser attribute, the value of the selected attribute can consist of selected files or folders from the listbox and/or paths to files or folders entered into the Selected File field.

If the multiple attribute is true, the selected attribute must be bound to one of the following:

If the multiple attribute is false, the selected attribute must be bound to one of the following:

If a type other than these is contained in a list type or bound directly to the selected attribute, then you must specify a converter with the converter attribute.


setSelected

public void setSelected(java.lang.Object selected)

This attribute represents the value of the fileChooser. Depending on the value of the folderChooser attribute, the value of the selected attribute can consist of selected files or folders from the listbox and/or paths to files or folders entered into the Selected File field.

If the multiple attribute is true, the selected attribute must be bound to one of the following:

If the multiple attribute is false, the selected attribute must be bound to one of the following:

If a type other than these is contained in a list type or bound directly to the selected attribute, then you must specify a converter with the converter attribute.

See Also:
getSelected()

getSortField

public java.lang.String getSortField()

setSortField

public void setSortField(java.lang.String sortField)

Field to use to sort the list of files. Valid values are:

Note that these values are case sensitive. By default, the list is sorted alphabetically.

See Also:
getSortField()

getStyle

public java.lang.String getStyle()

setStyle

public void setStyle(java.lang.String style)

CSS style(s) to be applied to the outermost HTML element when this component is rendered.

See Also:
getStyle()

getStyleClass

public java.lang.String getStyleClass()

setStyleClass

public void setStyleClass(java.lang.String styleClass)

CSS style class(es) to be applied to the outermost HTML element when this component is rendered.

See Also:
getStyleClass()


Copyright © 2008 Sun Microsystems, Inc. All Rights Reserved.