Class CCAttachments

java.lang.Object
org.eclnt.jsfserver.pagebean.PageBean
org.eclnt.jsfserver.pagebean.component.PageBeanComponentBase
org.eclnt.jsfserver.pagebean.component.PageBeanComponent
org.eclnt.ccaddons.pbc.CCAttachments
All Implemented Interfaces:
Serializable, org.eclnt.jsfserver.elements.IConfiguredByLayout, org.eclnt.jsfserver.pagebean.component.IPageBeanComponent, org.eclnt.jsfserver.pagebean.IPageBean, org.eclnt.jsfserver.util.valuemgmt.IDynamicContentBindingObject

public class CCAttachments extends org.eclnt.jsfserver.pagebean.component.PageBeanComponent implements Serializable
See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    class 
     
    static interface 
     
    class 
     
    class 
     

    Nested classes/interfaces inherited from class org.eclnt.jsfserver.pagebean.component.PageBeanComponent

    org.eclnt.jsfserver.pagebean.component.PageBeanComponent.ILiteralResolver, org.eclnt.jsfserver.pagebean.component.PageBeanComponent.LitMap
  • Field Summary

    Fields inherited from class org.eclnt.jsfserver.pagebean.PageBean

    m_pageModifier
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addAttachment(String fileName, byte[] content)
     
    void
    Deregisters the instance from listening to upload servlet processing.
     
     
    org.eclnt.jsfserver.elements.util.Trigger
     
     
    boolean
     
    org.eclnt.jsfserver.elements.impl.FIXGRIDListBinding<CCAttachments.GridItem>
     
     
     
    void
     
    void
    onUploadAction(org.eclnt.jsfserver.base.faces.event.ActionEvent event)
     
    void
     
    void
    setEnabled(boolean value)
     

    Methods inherited from class org.eclnt.jsfserver.pagebean.component.PageBeanComponent

    getLit, initializePageBeanConfigItems

    Methods inherited from class org.eclnt.jsfserver.pagebean.component.PageBeanComponentBase

    addConfiguredByLayoutListener, findLiteralResourceName, getClassDefiningPageBean, getLayoutPath, getLiteralResolver, getPageName, initializePageBeanFinished, initializePageBeanPassComponent, initializePageBeanStarted, isInitialized, readLiteral, readLiteralByOwnResourceBundle, removeConfiguredByLayoutListener, setLiteralResolver

    Methods inherited from class org.eclnt.jsfserver.pagebean.PageBean

    buildContentReplaceString, closePopup, getActualRootExpression, getModalModelessPopupForPopupPageBean, getPageModifier, getPopups, getStamp, initializePageModifier, onBeforeRendering, openModalPopup, openModelessPopup, pbx, readPageLayoutXML, setActualRootExpression

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.eclnt.jsfserver.elements.IConfiguredByLayout

    addConfiguredByLayoutListener, removeConfiguredByLayoutListener

    Methods inherited from interface org.eclnt.jsfserver.pagebean.IPageBean

    closePopup, getActualRootExpression, getPageModifier, getPageName, getStamp, onBeforeRendering, openModalPopup, openModelessPopup, setActualRootExpression

    Methods inherited from interface org.eclnt.jsfserver.pagebean.component.IPageBeanComponent

    initializePageBeanFinished, initializePageBeanPassComponent, initializePageBeanStarted, isInitialized
  • Constructor Details

    • CCAttachments

      public CCAttachments()
  • Method Details

    • getRootExpressionUsedInPage

      public String getRootExpressionUsedInPage()
      Specified by:
      getRootExpressionUsedInPage in interface org.eclnt.jsfserver.pagebean.IPageBean
      Specified by:
      getRootExpressionUsedInPage in class org.eclnt.jsfserver.pagebean.PageBean
    • prepare

      public void prepare(String dirName, CCAttachments.IListener listener)
      Parameters:
      dirName - Name of server side directory in which the files are stored. All the files of this directory are shown to the user.
    • initializePageBean

      public void initializePageBean(Map<String,String> initData)
      Specified by:
      initializePageBean in interface org.eclnt.jsfserver.pagebean.component.IPageBeanComponent
      Overrides:
      initializePageBean in class org.eclnt.jsfserver.pagebean.component.PageBeanComponent
    • getEnabled

      public boolean getEnabled()
    • setEnabled

      public void setEnabled(boolean value)
    • getGrid

      public org.eclnt.jsfserver.elements.impl.FIXGRIDListBinding<CCAttachments.GridItem> getGrid()
    • getDownloadTrigger

      public org.eclnt.jsfserver.elements.util.Trigger getDownloadTrigger()
    • getUploadURL

      public String getUploadURL()
    • getDownloadURL

      public String getDownloadURL()
    • getDownloadFileName

      public String getDownloadFileName()
    • getAttachments

      public List<File> getAttachments()
    • addAttachment

      public void addAttachment(String fileName, byte[] content)
    • onUploadAction

      public void onUploadAction(org.eclnt.jsfserver.base.faces.event.ActionEvent event)
    • close

      public void close()
      Deregisters the instance from listening to upload servlet processing. The one creating a CCAttachments-instance is also the one to call the close-method when the instance is no longer needed.