org.rhq.enterprise.gui.common.upload
Class FileUploadUIBean

java.lang.Object
  extended by org.rhq.enterprise.gui.common.upload.FileUploadUIBean
Direct Known Subclasses:
UploadNewChildPackageUIBean, UploadNewPackageUIBean

public class FileUploadUIBean
extends Object

Session bean used to maintain information about an uploaded file. For use with RichFaces fileUpload component.

Author:
John Mazzitelli

Constructor Summary
FileUploadUIBean()
           
 
Method Summary
 void clear()
          Deletes any temporary file containing a previously uploaded file (if one exists).
 void fileUploadListener(org.richfaces.event.UploadEvent event)
           
 org.richfaces.model.UploadItem getFileItem()
           
 boolean isFileUploaded()
           
protected  void onFailure(Throwable t)
          Adds a generic error message to the faces context and logs the error.
protected  void onSuccess()
          Adds a generic info message to the faces context.
 void setFileItem(org.richfaces.model.UploadItem fileItem)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FileUploadUIBean

public FileUploadUIBean()
Method Detail

getFileItem

public org.richfaces.model.UploadItem getFileItem()

setFileItem

public void setFileItem(org.richfaces.model.UploadItem fileItem)

isFileUploaded

public boolean isFileUploaded()

clear

public void clear()
Deletes any temporary file containing a previously uploaded file (if one exists). This sets the file to null so it appears no file has been uploaded.


fileUploadListener

public void fileUploadListener(org.richfaces.event.UploadEvent event)

toString

public String toString()
Overrides:
toString in class Object

onSuccess

protected void onSuccess()
Adds a generic info message to the faces context. If you want to customize this, write a subclass and override this method.


onFailure

protected void onFailure(Throwable t)
Adds a generic error message to the faces context and logs the error. If you want to customize this, write a subclass and override this method.

Parameters:
t - the error that occurred


Copyright © 2008-2012 Red Hat, Inc.. All Rights Reserved.