|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavax.faces.component.UIComponent
javax.faces.component.UIComponentBase
javax.faces.component.UIData
com.ibm.xsp.component.UIDataEx
com.ibm.xsp.component.UIFileDownload
public class UIFileDownload
Abstract File Download Component which handles creating all the internal components used to display the file available for downloading.
By default, the rendererType property must be set to "com.ibm.faces.AttachmentDownload"
This value can be changed by calling the setRendererType()
method.
| Nested Class Summary | |
|---|---|
static class |
UIFileDownload.DownloadVb
Unit: UIFileDownload.java |
static class |
UIFileDownload.InternalCreated
|
static class |
UIFileDownload.InternalHref
|
static class |
UIFileDownload.InternalId
|
static class |
UIFileDownload.InternalLastModified
|
static class |
UIFileDownload.InternalName
|
static class |
UIFileDownload.InternalSizeValue
|
static class |
UIFileDownload.InternalType
|
| Nested classes/interfaces inherited from class javax.faces.component.UIComponentBase |
|---|
javax.faces.component.UIComponentBase.AggregatedIterator, javax.faces.component.UIComponentBase.UnmodifiableIterator |
| Nested classes/interfaces inherited from class javax.faces.component.UIComponent |
|---|
javax.faces.component.UIComponent.StateMap, javax.faces.component.UIComponent.StateMapEntry |
| Field Summary | |
|---|---|
static java.lang.String |
COMPONENT_TYPE
The standard component type for this component. |
static java.lang.String |
RENDERER_TYPE
|
| Fields inherited from class com.ibm.xsp.component.UIDataEx |
|---|
AJAX_GETROWS, DEFAULT_ROWS_PER_PAGE |
| Fields inherited from class javax.faces.component.UIData |
|---|
COMPONENT_FAMILY |
| Fields inherited from class javax.faces.component.UIComponentBase |
|---|
EMPTY_ITERATOR |
| Fields inherited from class javax.faces.component.UIComponent |
|---|
_xspStateId |
| Fields inherited from interface javax.faces.component.NamingContainer |
|---|
SEPARATOR_CHAR |
| Constructor Summary | |
|---|---|
UIFileDownload()
Abstract File Download Component. |
|
| Method Summary | |
|---|---|
void |
addAttr(Attr attr)
Add an Attr, to appear as an attribute in the HTML output of this control or object tag. |
void |
addRowAttr(Attr rowAttr)
Add an Attr, to appear as an attribute on the table row element. |
protected void |
bindBasicColumn(UIColumnEx column,
UIFileDownload.DownloadVb columnValueBinding)
Helper Method for binding a value binding to a specific column |
void |
buildContents(javax.faces.context.FacesContext context,
FacesComponentBuilder builder)
Build the component children and facets, the default implementation is usually: builder.buildAll(context, this, true); // includeFacets=true |
protected java.lang.String |
createExpression(java.lang.String propertyName)
Helper method for creating a value binding expression for a given property |
java.util.List<Attr> |
getAttrs()
The extra attributes to be output on the base element at the root of this control or object tag. |
java.lang.String |
getCreatedStyleClass()
|
java.lang.String |
getCreatedTitle()
Return the value of the createdTitle property. |
java.util.Date |
getCreatedValue()
Return the value of the createdValue property. |
com.ibm.xsp.model.FileDownloadValue |
getCurrentFileDownloadValue()
Returns the current FileDownloadValue of this instance, will be null if not set. |
java.lang.String |
getDeleteImageTitle()
Return the value of the deleteImageTitle property. |
java.lang.String |
getDeleteMessage()
Return the value of the deleteFileMessage property. |
java.lang.String |
getDeleteStyleClass()
|
java.util.Date |
getEffectiveCreatedValue()
|
java.lang.String |
getEffectiveFileNameHrefValue()
|
java.lang.String |
getEffectiveFileNameValue()
Note this is a localizable string displayed in the file name column. |
java.util.Date |
getEffectiveLastModifiedValue()
|
java.lang.String |
getEffectiveSizeValue()
The size value for the current row |
java.lang.String |
getEffectiveTypeValue()
|
UIColumnEx |
getFileCreatedColumn()
|
UIColumnEx |
getFileDeleteColumn()
|
java.lang.String |
getFileId()
The id of the current file, available while iterating through the download component. |
UIColumnEx |
getFileLastModifiedColumn()
|
UIColumnEx |
getFileNameColumn()
|
java.lang.String |
getFileNameHrefValue()
Return the value of the filenameTitle property. |
java.lang.String |
getFileNameTitle()
Return the value of the filenameTitle property. |
java.lang.String |
getFileNameValue()
Return the value of the fileNameValue property. |
UIColumnEx |
getFileSizeColumn()
|
UIColumnEx |
getFileTypeColumn()
|
java.lang.String |
getLastModifiedTitle()
Return the value of the lastModifiedTitle property. |
java.util.Date |
getLastModifiedValue()
Return the value of the lastModifiedValue property. |
java.lang.String |
getModifiedStyleClass()
|
java.lang.String |
getNameStyleClass()
|
protected NumberConverter |
getNumberConverter()
Returns the number converter used to format the file size. |
java.util.List<Attr> |
getRowAttrs()
The extra attributes to be output on the table row element. |
java.lang.String |
getSizeStyleClass()
|
java.lang.String |
getSizeTitle()
Return the value of the sizeTitle property. |
java.lang.String |
getSizeValue()
Return the value of the sizeValue property. |
java.lang.String |
getStyleKitFamily()
The styleKitFamily is basically the default themeId, to use if the "themeId" property is not set on this control instance in the XPage source. |
java.lang.String |
getTypeStyleClass()
|
java.lang.String |
getTypeTitle()
Return the value of the typeTitle property. |
java.lang.String |
getTypeValue()
Return the value of the typeValue property. |
protected int |
getZeroRows(int rows)
|
void |
initAfterContents(javax.faces.context.FacesContext context)
Perform component initialization after it's children and facets are added. |
protected void |
initBasicColumn(javax.faces.context.FacesContext context,
java.lang.String columnTitle,
javax.faces.convert.Converter converter,
java.lang.String styleClass,
javax.faces.el.ValueBinding columnValue)
|
void |
initBeforeContents(javax.faces.context.FacesContext context)
Perform component initialization before its children and facets are added. |
protected void |
initFileDeleteColumn(javax.faces.context.FacesContext context)
Helper method to create the delete control. |
boolean |
isAllowDelete()
Get the boolean value of the allowDelete property. |
boolean |
isDisplayCreated()
Return the value of the displayCreated property. |
boolean |
isDisplayLastModified()
Return the value of the displayLastModified property. |
boolean |
isDisplaySize()
Return the value of the displaySize property. |
boolean |
isDisplayType()
Return the value of the displayType property. |
boolean |
isHideWhen()
Return the value of the hideWhen property. |
boolean |
isReadOnlyMode(javax.faces.context.FacesContext context)
|
boolean |
isRendered()
|
void |
processRestoreState(javax.faces.context.FacesContext context,
java.lang.Object state)
|
protected java.lang.Object |
resolveValue()
|
void |
restoreState(javax.faces.context.FacesContext context,
java.lang.Object _state)
|
java.lang.Object |
saveState(javax.faces.context.FacesContext context)
|
void |
setAllowDelete(boolean allowDelete)
Set boolean value for the allowDelete property. |
void |
setAttrs(java.util.List<Attr> attrs)
This method is not used by the XPage generated .java file - instead the addAttr(Attr) method is used to add attributes to the list. |
void |
setCreatedStyleClass(java.lang.String styleClass)
|
void |
setCreatedTitle(java.lang.String createdTitle)
Set the value of the createdTitle property. |
void |
setCreatedValue(java.util.Date created)
Set the value of the createdValue property. |
void |
setDeleteImageTitle(java.lang.String deleteImageTitle)
Sets the value of the deleteImageTitle property. |
void |
setDeleteMessage(java.lang.String deleteMessage)
Sets the value for the deleteMessage property. |
void |
setDeleteStyleClass(java.lang.String styleClass)
|
void |
setDisplayCreated(boolean displayCreated)
Set the value of the displayCreated property. |
void |
setDisplayLastModified(boolean displayLastModified)
Set the value of the displayLastModified property. |
void |
setDisplaySize(boolean displaySize)
Set the value of the displaySize property. |
void |
setDisplayType(boolean displayType)
Set the value of the displayType property. |
void |
setFileNameHrefValue(java.lang.String href)
Set the value of the filenameTitle property. |
void |
setFileNameTitle(java.lang.String fileNameTitle)
Set the value of the filenameTitle property. |
void |
setFileNameValue(java.lang.String fileNameValue)
Set the value of the fileNameValue property. |
void |
setHideWhen(boolean hideWhen)
Set the value of the hideWhen property. |
void |
setLastModifiedTitle(java.lang.String lastModifiedTitle)
Set the value of the lastModifiedTitle property. |
void |
setLastModifiedValue(java.util.Date vb)
Set the value of the lastModifiedValue property. |
void |
setModifiedStyleClass(java.lang.String styleClass)
|
void |
setNameStyleClass(java.lang.String styleClass)
|
void |
setRowAttrs(java.util.List<Attr> rowAttrs)
This method is not used by the XPage generated .java file - instead the addAttr(Attr) method is used to add attributes to the list. |
void |
setSizeStyleClass(java.lang.String styleClass)
|
void |
setSizeTitle(java.lang.String sizeTitle)
Set the value of the sizeTitle property. |
void |
setSizeValue(java.lang.String sizeValue)
Set the value of the sizeValue property. |
boolean |
setThemeProperty(java.lang.String name,
java.lang.Object value)
Implemented by components which handle setting their own default styles |
void |
setTypeStyleClass(java.lang.String styleClass)
|
void |
setTypeTitle(java.lang.String typeTitle)
Set the value of the typeTitle property. |
void |
setTypeValue(java.lang.String typeValue)
Set the value of the typeValue property. |
| Methods inherited from class javax.faces.component.UIData |
|---|
getClientId, getFamily, getFirst, getFooter, getHeader, getRowData, getRowIndex, getVar, isRowAvailable, setFirst, setFooter, setHeader |
| Methods inherited from class javax.faces.component.UIComponentBase |
|---|
_xspGetReadOnlyObj, _xspGetRendererData, _xspRemoveReadOnlyObj, _xspRemoveRendererData, _xspSetIdUnchecked, _xspSetReadOnlyObj, _xspSetRendererData, addFacesListener, decode, encodeChildren, findComponent, getAttributes, getChildCount, getChildren, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getParent, getRenderer, getRendererType, getRendersChildren, getValueBinding, isTransient, processSaveState, removeFacesListener, restoreAttachedState, saveAttachedState, setId, setParent, setRendered, setRendererType, setTransient |
| Methods inherited from class javax.faces.component.UIComponent |
|---|
_xspGetStateId, _xspGetStateMap, _xspRestoreAttribute, _xspRestoreState, _xspSaveState, isVisitable, markInitialState, setControlState |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.ibm.xsp.component.FacesDataIterator |
|---|
getFirst, getRowIndex, setFirst |
| Field Detail |
|---|
public static final java.lang.String COMPONENT_TYPE
The standard component type for this component.
public static final java.lang.String RENDERER_TYPE
| Constructor Detail |
|---|
public UIFileDownload()
| Method Detail |
|---|
public java.lang.String getStyleKitFamily()
ThemeControlThe implementation may return different values depending on the configuration of the current control, for example the Button control returns a different value and looks different when it is configured as a cancel button.
getStyleKitFamily in interface ThemeControlgetStyleKitFamily in class UIDataExnull themeId corresponding to the
configuration for this type of control in a theme file.
public boolean setThemeProperty(java.lang.String name,
java.lang.Object value)
FacesThemeHandler
setThemeProperty in interface FacesThemeHandlername - TODOvalue - TODO
public java.lang.String getTypeStyleClass()
public java.lang.String getSizeStyleClass()
public java.lang.String getNameStyleClass()
public java.lang.String getModifiedStyleClass()
public java.lang.String getCreatedStyleClass()
public java.lang.String getDeleteStyleClass()
public void setTypeStyleClass(java.lang.String styleClass)
public void setSizeStyleClass(java.lang.String styleClass)
public void setNameStyleClass(java.lang.String styleClass)
public void setModifiedStyleClass(java.lang.String styleClass)
public void setCreatedStyleClass(java.lang.String styleClass)
public void setDeleteStyleClass(java.lang.String styleClass)
public java.util.List<Attr> getAttrs()
null. The addAttr(Attr)
method should be used to add an Attr.
getAttrs in interface FacesAttrsObjectpublic void addAttr(Attr attr)
addAttr in interface FacesAttrsObjectaction - public void setAttrs(java.util.List<Attr> attrs)
addAttr(Attr) method is used to add attributes to the list.
public java.util.List<Attr> getRowAttrs()
null.
The addRowAttr(Attr) method should be used to add a row Attr.
getRowAttrs in interface FacesRowAttrsComponentpublic void addRowAttr(Attr rowAttr)
Attr, to appear as an attribute on the table row element.
addRowAttr in interface FacesRowAttrsComponentaction - public void setRowAttrs(java.util.List<Attr> rowAttrs)
addAttr(Attr) method is used to add attributes to the list.
protected NumberConverter getNumberConverter()
NumberConverter
public void buildContents(javax.faces.context.FacesContext context,
FacesComponentBuilder builder)
throws javax.faces.FacesException
FacesComponent
buildContents in interface FacesComponentjavax.faces.FacesExceptionpublic boolean isRendered()
isRendered in class javax.faces.component.UIComponentBaseprotected void initFileDeleteColumn(javax.faces.context.FacesContext context)
context - public boolean isReadOnlyMode(javax.faces.context.FacesContext context)
protected void initBasicColumn(javax.faces.context.FacesContext context,
java.lang.String columnTitle,
javax.faces.convert.Converter converter,
java.lang.String styleClass,
javax.faces.el.ValueBinding columnValue)
context - columnTitle - Title of the column this is addressingconverter - a converter used to convert the value.styleClass - the style class for the column headercolumnValue - a value binding that provides a default implementation for the
column value, or will delegate to the value the user has set
protected void bindBasicColumn(UIColumnEx column,
UIFileDownload.DownloadVb columnValueBinding)
column - columnValueBinding - protected java.lang.String createExpression(java.lang.String propertyName)
propertyName -
public java.lang.String getDeleteMessage()
Return the value of the deleteFileMessage property. Contents:
Used as the prompt text when 'delete file' image control is clicked.
public void setDeleteMessage(java.lang.String deleteMessage)
Sets the value for the deleteMessage property. Contents:
Used to override the prompt value displayed when 'delete' image control is clicked.
public java.lang.String getDeleteImageTitle()
Return the value of the deleteImageTitle property. Contents:
Used for the title of the 'delete file' image control.
public void setDeleteImageTitle(java.lang.String deleteImageTitle)
Sets the value of the deleteImageTitle property. Contents:
Used to override the title value for the 'delete file' image control.
public java.lang.String getFileNameTitle()
Return the value of the filenameTitle property. Contents:
Used to override the default value for the file name title on the column header.
public void setFileNameHrefValue(java.lang.String href)
Set the value of the filenameTitle property. Contents:
public java.lang.String getFileNameHrefValue()
Return the value of the filenameTitle property. Contents:
Used to override the default value for the file name title on the column header.
public void setFileNameValue(java.lang.String fileNameValue)
Set the value of the fileNameValue property. Contents:
public java.lang.String getFileNameValue()
Return the value of the fileNameValue property. Contents:
used to override the default value (valuebinding) for the file names.
public java.lang.String getLastModifiedTitle()
Return the value of the lastModifiedTitle property.
Contents:
Holds the value of he column header for Last Modified
public java.lang.String getCreatedTitle()
Return the value of the createdTitle property.
Contents:
Holds the value of he column header for Created
public void setLastModifiedValue(java.util.Date vb)
Set the value of the lastModifiedValue property. Contents:
public java.util.Date getLastModifiedValue()
Return the value of the lastModifiedValue property.
Contents:
Holds the value for the valueBinding for Last Modified, used to override the default valueBinding set up internally on this component.
public void setCreatedValue(java.util.Date created)
Set the value of the createdValue property. Contents:
public java.util.Date getCreatedValue()
Return the value of the createdValue property.
Contents:
Holds the value for the valueBinding for Created, used to override the default valueBinding set up internally on this component.
public java.lang.String getSizeTitle()
Return the value of the sizeTitle property. Contents:
Display the size of the file to users.
public void setSizeValue(java.lang.String sizeValue)
Set the value of the sizeValue property. Contents:
public java.lang.String getSizeValue()
Return the value of the sizeValue property. Contents:
Display the size of the file to users.
public java.lang.String getTypeTitle()
Return the value of the typeTitle property. Contents:
Used to set the title of the File Type Column header, use this to override the default column header for file type.
public void setTypeValue(java.lang.String typeValue)
Set the value of the typeValue property. Contents:
public java.lang.String getTypeValue()
Return the value of the typeValue property. Contents:
Used to override the default value associated with the file type.
public boolean isDisplayLastModified()
Return the value of the displayLastModified property.
Contents:
Display the last modified date of the file to users.
public boolean isDisplayCreated()
Return the value of the displayCreated property.
Contents:
Display the created date of the file to users.
public boolean isDisplaySize()
Return the value of the displaySize property. Contents:
Display the size of the file to users.
public boolean isDisplayType()
Return the value of the displayType property. Contents:
Display the type of the file to users.
public boolean isHideWhen()
Return the value of the hideWhen property. Contents:
Hide the file download field when no files are available for download.
public UIColumnEx getFileTypeColumn()
public UIColumnEx getFileDeleteColumn()
public UIColumnEx getFileCreatedColumn()
public UIColumnEx getFileLastModifiedColumn()
public UIColumnEx getFileSizeColumn()
public UIColumnEx getFileNameColumn()
public void restoreState(javax.faces.context.FacesContext context,
java.lang.Object _state)
restoreState in interface javax.faces.component.StateHolderrestoreState in class UIDataEx
public void processRestoreState(javax.faces.context.FacesContext context,
java.lang.Object state)
processRestoreState in class javax.faces.component.UIComponentBasepublic java.lang.Object saveState(javax.faces.context.FacesContext context)
saveState in interface javax.faces.component.StateHoldersaveState in class UIDataExpublic void setDisplayLastModified(boolean displayLastModified)
Set the value of the displayLastModified property.
public void setDisplayCreated(boolean displayCreated)
Set the value of the displayCreated property.
public void setDisplaySize(boolean displaySize)
Set the value of the displaySize property.
public void setDisplayType(boolean displayType)
Set the value of the displayType property.
public void setFileNameTitle(java.lang.String fileNameTitle)
Set the value of the filenameTitle property.
public void setHideWhen(boolean hideWhen)
Set the value of the hideWhen property.
public void setCreatedTitle(java.lang.String createdTitle)
Set the value of the createdTitle property.
public void setLastModifiedTitle(java.lang.String lastModifiedTitle)
Set the value of the lastModifiedTitle property.
public void setSizeTitle(java.lang.String sizeTitle)
Set the value of the sizeTitle property.
public void setTypeTitle(java.lang.String typeTitle)
Set the value of the typeTitle property.
public boolean isAllowDelete()
Get the boolean value of the allowDelete property.
When true this adds a control to allow a user to delete a file.
public void setAllowDelete(boolean allowDelete)
Set boolean value for the allowDelete property.
When true this adds a control to allow a user to delete a file.
boolean -
public void initBeforeContents(javax.faces.context.FacesContext context)
throws javax.faces.FacesException
FacesComponent
initBeforeContents in interface FacesComponentjavax.faces.FacesException
public void initAfterContents(javax.faces.context.FacesContext context)
throws javax.faces.FacesException
FacesComponent
initAfterContents in interface FacesComponentjavax.faces.FacesExceptionpublic java.lang.String getEffectiveSizeValue()
public java.lang.String getEffectiveFileNameHrefValue()
public java.util.Date getEffectiveLastModifiedValue()
public java.util.Date getEffectiveCreatedValue()
public java.lang.String getEffectiveFileNameValue()
getFileId()
public java.lang.String getFileId()
public java.lang.String getEffectiveTypeValue()
protected java.lang.Object resolveValue()
resolveValue in class UIDataExpublic com.ibm.xsp.model.FileDownloadValue getCurrentFileDownloadValue()
protected int getZeroRows(int rows)
getZeroRows in class UIDataEx
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||