com.sap.ui.commons.client
Class FileUploader

java.lang.Object
  extended by com.google.gwt.core.client.JavaScriptObject
      extended by com.sap.ui.core.client.Element
          extended by com.sap.ui.core.client.Control
              extended by com.sap.ui.commons.client.FileUploader

public class FileUploader
extends com.sap.ui.core.client.Control

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.ui.commons.FileUploader)

Constructor Summary
protected FileUploader()
          constructs the class FileUploader
hidden due to JavaScriptObject restriction
 
Method Summary
 FileUploader 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.
static FileUploader create()
          creates a new instance of the class FileUploader
static FileUploader create(String idOrConfig)
          creates a new instance of the class FileUploader
static FileUploader create(String id, String config)
          creates a new instance of the class FileUploader
 FileUploader 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.
 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.
 FileUploader setEnabled(boolean value)
          Setter for property enabled
Default value is: true
 FileUploader setName(String value)
          Setter for property name
 FileUploader setUploadOnChange(boolean value)
          Setter for property uploadOnChange
Default value is: false
 FileUploader setUploadUrl(String value)
          Setter for property uploadUrl
Default value is: ''
 FileUploader setValue(String value)
          Setter for property value
Default value is: ''
 FileUploader setVisible(boolean value)
          Setter for property visible
Default value is: true
 FileUploader 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.Control
addStyleClass, hasStyleClass, invalidate, placeAt, placeAt, removeStyleClass, rerender
 
Methods inherited from class com.sap.ui.core.client.Element
_convertArray, _convertArray, _convertArray, _convertArray, _convertArray, attachBrowserEvent, attachEvent, bindAggregation, bindContext, bindProperty, bindProperty, destroy, detachBrowserEvent, detachEvent, getDomRef, getElementName, getId, getLibraryName, getModel, getParent, getProperty, getTooltip_AsString, getTooltip_Text, getTooltip, isActive, setModel, setProperty, setTooltip, setTooltip, unbindAggregation, unbindContext, unbindProperty
 
Methods inherited from class com.google.gwt.core.client.JavaScriptObject
cast, createArray, createFunction, createObject, equals, hashCode, toSource, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FileUploader

protected FileUploader()
constructs the class FileUploader
hidden due to JavaScriptObject restriction

Method Detail

create

public static FileUploader create()
creates a new instance of the class FileUploader


create

public static FileUploader create(String idOrConfig)
creates a new instance of the class FileUploader

Parameters:
id - id of the FileUploader or configuration JSON string

create

public static FileUploader create(String id,
                                  String config)
creates a new instance of the class FileUploader

Parameters:
id - id of the FileUploader
config - configuration JSON string

getValue

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

Returns:
the value of property value

setValue

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

Parameters:
value - String
Returns:
this to allow method chaining

isEnabled

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

Returns:
the value of property enabled

setEnabled

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

Parameters:
value - boolean
Returns:
this to allow method chaining

isVisible

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

Returns:
the value of property visible

setVisible

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

Parameters:
value - boolean
Returns:
this to allow method chaining

getUploadUrl

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

Returns:
the value of property uploadUrl

setUploadUrl

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

Parameters:
value - String
Returns:
this to allow method chaining

getName

public final 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 final FileUploader setName(String value)
Setter for property name

Parameters:
value - String
Returns:
this to allow method chaining

getWidth

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

Returns:
the value of property width

setWidth

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

Parameters:
value - String
Returns:
this to allow method chaining

isUploadOnChange

public final 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 final FileUploader setUploadOnChange(boolean value)
Setter for property uploadOnChange
Default value is: false

Parameters:
value - boolean
Returns:
this to allow method chaining

attachChangeEvent

public final FileUploader 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
Returns:
this to allow method chaining

detachChangeEvent

public final FileUploader 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
Returns:
this to allow method chaining

upload

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



Copyright © 2011 SAP. All Rights Reserved.