Interface FileValueFormItem<T extends FormItem<?,?>>

All Known Implementing Classes:
FileItem

public interface FileValueFormItem<T extends FormItem<?,?>>

The interface specifies form items whose value is a file. Such components must have a value of one or several JBFile objects, each representing files as the component�s values.

The interface requires the implementation of methods necessary for the functionality of components that take files as a value. The method descriptions contain guidance on code implementation.

Since:
4.0
Author:
JBStrap
  • Method Details

    • getId

      String getId()
      Returns:
      Unique component ID
    • getClient

      Client getClient()
      Returns:
      Client instance or null if the component is not added to a client
    • setFileUploadedPercent

      T setFileUploadedPercent(JBFile file, long chunkSize)
      Event handler for the �file upload status changed� event.
      The method is called if the file upload status has changed, that is, a new file packet has been transferred to the server.
      Parameters:
      file - The JBFile object representing the file
      chunkSize - THe current chunk size
      Returns:
      Form item containing file values
    • getFileByName

      JBFile getFileByName(String filename)
      Uses the file name to gets the JBFile that was uploaded to the component with the file type.
      Parameters:
      filename - File name in the JBFile
      Returns:
      The JBFile with the #getFileName() identical to the one in the parameter
    • setFileDeleteHandler

      T setFileDeleteHandler(FileDeleteHandler fileDeleteHandler)
      Specifies the handler used to delete a file. The handler must implement the FileDeleteHandler interface.
      Parameters:
      fileDeleteHandler - The file delete handler
      Returns:
      The component