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 the FileListComponent component, i.e. <xfc:fileList />.
Since:
8.5.0
See Also:
  • Constructor Details

    • FileListController

      public FileListController()
  • Method Details

    • 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 StreamedContent with 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