Class FileListController
- java.lang.Object
-
- de.xima.fc.gui.component.file_list.FileListController
-
- All Implemented Interfaces:
Serializable
@RequestScoped @Named public class FileListController extends Object implements Serializable
Controller (backing bean) for theFileListComponentcomponent, i.e.<xfc:fileList />.- Since:
- 8.5.0
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description FileListController()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetAccept()StringgetCurrentFileName()Gets the file name of the current item being iterated over.longgetCurrentFileSize()Gets 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.
-
-
-
Method Detail
-
getAccept
public String getAccept()
-
getCurrentFileName
public String 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
public org.primefaces.model.StreamedContent onFileDownload(Object file)
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
-
-