com.sap.ui.commons.client
Class FileUploaderWidget

java.lang.Object
  extended by com.google.gwt.user.client.ui.UIObject
      extended by com.google.gwt.user.client.ui.Widget
          extended by com.sap.ui.core.client.ControlWidget
              extended by com.sap.ui.commons.client.FileUploaderWidget
All Implemented Interfaces:
com.google.gwt.event.logical.shared.HasAttachHandlers, com.google.gwt.event.shared.HasHandlers, com.google.gwt.user.client.EventListener, com.google.gwt.user.client.ui.IsWidget

public class FileUploaderWidget
extends com.sap.ui.core.client.ControlWidget

The class FileUploader is the GWT wrapper for the Phoenix control: sap.ui.commons.FileUploader.

The framework generates an input field and a button with text "Browse ...". The API supports features such as on change uploads (the upload starts immediately after a file has been selected), file uploads with explicit calls, adjustable control sizes, text display after uploads, or tooltips containing complete file paths.

Version:
0.18.0-SNAPSHOT
Author:
GENERATOR (JavaScript control: SAP AG)

Nested Class Summary
 
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled
 
Field Summary
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Constructor Summary
  FileUploaderWidget()
          constructs the class FileUploaderWidget
protected FileUploaderWidget(FileUploader control)
          constructs the class FileUploaderWidget
  FileUploaderWidget(String id)
          constructs the class FileUploaderWidget
 
Method Summary
 void attachChangeEvent(com.sap.ui.core.client.event.EventListener listener)
          attach an EventListener Event is fired when the value of the file path has been changed.
 void detachChangeEvent(com.sap.ui.core.client.event.EventListener listener)
          detach an EventListener Event is fired when the value of the file path has been changed.
 FileUploader getControl()
          returns the reference to the Phoenix Control
 String getName()
          Getter for property name Unique control name for identification on the server side after sending data to the server.
 String getUploadUrl()
          Getter for property uploadUrl Used when URL address is on a remote server.
 String getValue()
          Getter for property value Value of the path for file upload.
 String getWidth()
          Getter for property width Specifies the displayed control width.
 boolean isEnabled()
          Getter for property enabled Disabled controls have different colors, depending on customer settings.
 boolean isUploadOnChange()
          Getter for property uploadOnChange If set to "true", the upload immediately starts after file selection.
 boolean isVisible()
          Getter for property visible Invisible controls are not rendered.
 void setEnabled(boolean value)
          Setter for property enabled
Default value is: true
 void setName(String value)
          Setter for property name
 void setUploadOnChange(boolean value)
          Setter for property uploadOnChange
Default value is: false
 void setUploadUrl(String value)
          Setter for property uploadUrl
Default value is: ''
 void setValue(String value)
          Setter for property value
Default value is: ''
 void setVisible(boolean value)
          Setter for property visible
Default value is: true
 void setWidth(String value)
          Setter for property width
Default value is: ''
 void upload()
          Begins the upload as defined by uploadUrl.
 
Methods inherited from class com.sap.ui.core.client.ControlWidget
destroy, doAttachChildren, doDetachChildren, isDesignTime, wrap
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onBrowserEvent, onDetach, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents
 
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, sinkBitlessEvent, toString, unsinkEvents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FileUploaderWidget

public FileUploaderWidget()
constructs the class FileUploaderWidget


FileUploaderWidget

public FileUploaderWidget(String id)
constructs the class FileUploaderWidget

Parameters:
id - id of the FileUploaderWidget

FileUploaderWidget

protected FileUploaderWidget(FileUploader control)
constructs the class FileUploaderWidget

Parameters:
control - reference to an existing FileUploader
Method Detail

getControl

public FileUploader getControl()
returns the reference to the Phoenix Control

Overrides:
getControl in class com.sap.ui.core.client.ControlWidget
Returns:
reference to the Phoenix Control

getValue

public String getValue()
Getter for property value Value of the path for file upload.

Returns:
the value of property value

setValue

public void setValue(String value)
Setter for property value
Default value is: ''

Parameters:
value - String

isEnabled

public boolean isEnabled()
Getter for property enabled Disabled controls have different colors, depending on customer settings.

Returns:
the value of property enabled

setEnabled

public void setEnabled(boolean value)
Setter for property enabled
Default value is: true

Parameters:
value - boolean

isVisible

public boolean isVisible()
Getter for property visible Invisible controls are not rendered.

Overrides:
isVisible in class com.google.gwt.user.client.ui.UIObject
Returns:
the value of property visible

setVisible

public void setVisible(boolean value)
Setter for property visible
Default value is: true

Overrides:
setVisible in class com.google.gwt.user.client.ui.UIObject
Parameters:
value - boolean

getUploadUrl

public String getUploadUrl()
Getter for property uploadUrl Used when URL address is on a remote server.

Returns:
the value of property uploadUrl

setUploadUrl

public void setUploadUrl(String value)
Setter for property uploadUrl
Default value is: ''

Parameters:
value - String

getName

public String getName()
Getter for property name Unique control name for identification on the server side after sending data to the server.

Returns:
the value of property name

setName

public void setName(String value)
Setter for property name

Parameters:
value - String

getWidth

public String getWidth()
Getter for property width Specifies the displayed control width.

Returns:
the value of property width

setWidth

public void setWidth(String value)
Setter for property width
Default value is: ''

Overrides:
setWidth in class com.google.gwt.user.client.ui.UIObject
Parameters:
value - String

isUploadOnChange

public boolean isUploadOnChange()
Getter for property uploadOnChange If set to "true", the upload immediately starts after file selection. With the default setting, the upload needs to be explicitely triggered.

Returns:
the value of property uploadOnChange

setUploadOnChange

public void setUploadOnChange(boolean value)
Setter for property uploadOnChange
Default value is: false

Parameters:
value - boolean

attachChangeEvent

public void attachChangeEvent(com.sap.ui.core.client.event.EventListener listener)
attach an EventListener Event is fired when the value of the file path has been changed.
Event Parameters:
{sap.ui.core/string} newValue New file path value.

Parameters:
listener - reference to the EventListener

detachChangeEvent

public void detachChangeEvent(com.sap.ui.core.client.event.EventListener listener)
detach an EventListener Event is fired when the value of the file path has been changed.

Parameters:
listener - reference to the EventListener

upload

public void upload()
Begins the upload as defined by uploadUrl.



Copyright © 2011 SAP. All Rights Reserved.