Class FileListController
java.lang.Object
de.xima.fc.gui.component.file_list.FileListController
- All Implemented Interfaces:
Serializable
Controller (backing bean) for the
FileListComponent component, i.e. <xfc:fileList />.- Since:
- 8.5.0
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the file name of the current item being iterated over.longGets the file size of the current item being iterated over.voidonFileDelete(javax.faces.event.ActionEvent event) Callback invoked when the user clicked on the delete button for a file.org.primefaces.model.StreamedContentonFileDownload(Object file) Callback invoked when the user clicks on the download button to download an existing file.voidonFileUpload(org.primefaces.event.FileUploadEvent event) Callback invoked when the user uploads files to add to the list of files.
-
Constructor Details
-
FileListController
public FileListController()
-
-
Method Details
-
getAccept
-
getCurrentFileName
Gets the file name of the current item being iterated over. This method must only be called from the XHTML page from within the<ui:repeat />over the file list.- Returns:
- The file name of the current item.
-
getCurrentFileSize
public long getCurrentFileSize()Gets the file size of the current item being iterated over. This method must only be called from the XHTML page from within the<ui:repeat />over the file list.- Returns:
- The file size of the current item.
-
onFileDelete
public void onFileDelete(javax.faces.event.ActionEvent event) Callback invoked when the user clicked on the delete button for a file. Removes the file from the list of files.- Parameters:
event- The action event from the delete button click.
-
onFileDownload
Callback invoked when the user clicks on the download button to download an existing file.- Parameters:
file- The file ile to download.- Returns:
- A
StreamedContentwith the file's content, name, and MIME type.
-
onFileUpload
public void onFileUpload(org.primefaces.event.FileUploadEvent event) Callback invoked when the user uploads files to add to the list of files.- Parameters:
event- The event containing the uploaded files
-