Class FileSetParametersComponent
- java.lang.Object
-
- javax.faces.component.UIComponent
-
- javax.faces.component.UIComponentBase
-
- javax.faces.component.UINamingContainer
-
- de.xima.fc.prompt.service.support.gui.component.FileSetParametersComponent
-
- All Implemented Interfaces:
EventListener,javax.faces.component.NamingContainer,javax.faces.component.PartialStateHolder,javax.faces.component.StateHolder,javax.faces.component.TransientStateHolder,javax.faces.component.UniqueIdVendor,javax.faces.event.ComponentSystemEventListener,javax.faces.event.FacesListener,javax.faces.event.SystemEventListenerHolder
public class FileSetParametersComponent extends javax.faces.component.UINamingContainer
-
-
Field Summary
-
Fields inherited from class javax.faces.component.UINamingContainer
COMPONENT_FAMILY, COMPONENT_TYPE, SEPARATOR_CHAR_PARAM_NAME
-
-
Constructor Summary
Constructors Constructor Description FileSetParametersComponent()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidencodeBegin(javax.faces.context.FacesContext context)StringgetDisplayTextFileName(PromptFileSetParameter param)StringgetDisplayTextFileTypes(PromptFileSetParameter param)StringgetDisplayTextMultiplicity(PromptFileSetParameter param)StringgetDisplayTextParameterLabel(int index, int count)List<String>getFileTypeExtensions()Assumes that this method is called within a context where an EL expression#{item}resolves to the currentPromptFileSetParameterinstance, i.e. at the proper position within the XHTML page.Set<PromptFileType.PromptFileKind>getFileTypeKinds()Assumes that this method is called within a context where an EL expression "#{item}" resolves to the currentPromptFileSetParameterinstance, i.e. at the proper position within the XHTML page.List<javax.faces.model.SelectItem>getKinds()Returns the list of availablekindsasSelectItems, e.g. for use as select options in a dropdown menu.List<javax.faces.model.SelectItem>getMultiplicities()Returns the list of availablemultiplicitiesasSelectItems, e.g. for use as select options in a dropdown menu.voidonFileSetParameterAdd(javax.faces.event.ActionEvent event)Callback invoked when the user clicked on the "Add" button for a new file set parameter.voidonFileSetParameterDelete(javax.faces.event.ActionEvent event)Callback invoked when the user clicked on the delete button for a file set parameter.voidsetFileTypeExtensions(List<String> fileTypeExtensions)Sets the file type extensions for the current parameter, by modifying the list returned bygetFileTypeExtensions().voidsetFileTypeKinds(Set<PromptFileType.PromptFileKind> fileTypeKinds)Sets the file type kinds for the current parameter, by modifying the set returned bygetFileTypeKinds().-
Methods inherited from class javax.faces.component.UINamingContainer
createUniqueId, getFamily, getSeparatorChar, visitTree
-
Methods inherited from class javax.faces.component.UIComponentBase
addClientBehavior, addFacesListener, broadcast, clearInitialState, decode, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientBehaviors, getClientId, getDefaultEventName, getEventNames, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getListenersForEventClass, getParent, getPassThroughAttributes, getRenderer, getRendererType, getRendersChildren, getValueBinding, invokeOnComponent, isRendered, isTransient, markInitialState, processDecodes, processRestoreState, processSaveState, processUpdates, processValidators, queueEvent, removeFacesListener, restoreAttachedState, restoreState, saveAttachedState, saveState, setId, setParent, setRendered, setRendererType, setTransient, setValueBinding, subscribeToEvent, unsubscribeFromEvent
-
Methods inherited from class javax.faces.component.UIComponent
encodeAll, getClientId, getCompositeComponentParent, getContainerClientId, getCurrentComponent, getCurrentCompositeComponent, getNamingContainer, getPassThroughAttributes, getResourceBundleMap, getStateHelper, getStateHelper, getTransientStateHelper, getTransientStateHelper, getValueExpression, initialStateMarked, isCompositeComponent, isInView, isVisitable, popComponentFromEL, processEvent, pushComponentToEL, restoreTransientState, saveTransientState, setInView, setValueExpression
-
-
-
-
Method Detail
-
encodeBegin
public void encodeBegin(javax.faces.context.FacesContext context) throws IOException- Overrides:
encodeBeginin classjavax.faces.component.UIComponentBase- Throws:
IOException
-
getDisplayTextFileName
public String getDisplayTextFileName(PromptFileSetParameter param)
-
getDisplayTextFileTypes
public String getDisplayTextFileTypes(PromptFileSetParameter param)
-
getDisplayTextMultiplicity
public String getDisplayTextMultiplicity(PromptFileSetParameter param)
-
getDisplayTextParameterLabel
public String getDisplayTextParameterLabel(int index, int count)
-
getFileTypeExtensions
public List<String> getFileTypeExtensions()
Assumes that this method is called within a context where an EL expression#{item}resolves to the currentPromptFileSetParameterinstance, i.e. at the proper position within the XHTML page.Reads the parameter from the
itemEL variable and returns a modifiable list view of filePromptFileType.Extension.getExtension()backed byPromptFileSetParameter.getFileTypes().- Returns:
- A modifiable list of file extensions for the current parameter.
-
setFileTypeExtensions
public void setFileTypeExtensions(List<String> fileTypeExtensions)
Sets the file type extensions for the current parameter, by modifying the list returned bygetFileTypeExtensions().- Parameters:
fileTypeExtensions- The new list of file type extensions.
-
getFileTypeKinds
public Set<PromptFileType.PromptFileKind> getFileTypeKinds()
Assumes that this method is called within a context where an EL expression "#{item}" resolves to the currentPromptFileSetParameterinstance, i.e. at the proper position within the XHTML page.Reads the parameter from the
itemEL variable and returns a modifiable set view offile type kindsbacked byPromptFileSetParameter.getFileTypes().- Returns:
- A modifiable set of file type kinds for the current parameter.
-
setFileTypeKinds
public void setFileTypeKinds(Set<PromptFileType.PromptFileKind> fileTypeKinds)
Sets the file type kinds for the current parameter, by modifying the set returned bygetFileTypeKinds().- Parameters:
fileTypeKinds- The new set of file type kinds.
-
getKinds
public List<javax.faces.model.SelectItem> getKinds()
Returns the list of availablekindsasSelectItems, e.g. for use as select options in a dropdown menu.- Returns:
- The list of available file kinds.
-
getMultiplicities
public List<javax.faces.model.SelectItem> getMultiplicities()
Returns the list of availablemultiplicitiesasSelectItems, e.g. for use as select options in a dropdown menu.- Returns:
- The list of available multiplicities.
-
onFileSetParameterAdd
public void onFileSetParameterAdd(javax.faces.event.ActionEvent event)
Callback invoked when the user clicked on the "Add" button for a new file set parameter. Creates a new default file set parameter and its it to the list of parameters.- Parameters:
event- The action event from the add button click.
-
onFileSetParameterDelete
public void onFileSetParameterDelete(javax.faces.event.ActionEvent event)
Callback invoked when the user clicked on the delete button for a file set parameter. Removes parameter from the list of parameters.- Parameters:
event- The action event from the delete button click.
-
-