<FILE> : Input Field of File Type

Java class : leon.view.LyFile

ROLE

An input field of File type allows displaying a graphical component that allows selecting a file. The type of file can be specified (text, image, audio, video). According to the form in which this field is present, the graphical component allows to choose the location of the file and/or to view the access path to the file.

ATTRIBUTES

<!ATTLIST FILE
	  id NMTOKEN #IMPLIED
	  template NMTOKEN #IMPLIED
	  label CDATA #IMPLIED
	  type ( TEXT | IMAGE | AUDIO | VIDEO | DIRECTORY) "TEXT"
	  bean CDATA #IMPLIED
	  attachmentDirectory CDATA "files"
	  attachmentHandler CDATA #IMPLIED
	  directory CDATA #IMPLIED
	  filter CDATA #IMPLIED
	  nCols NMTOKEN #IMPLIED
	  nRows NMTOKEN #IMPLIED
	  border ( NONE | SINGLE | DOUBLE | RAISED | LOWERED) "NONE"
	  image CDATA #IMPLIED
	  font CDATA #IMPLIED
	  enabledColor CDATA #IMPLIED
	  disabledColor CDATA #IMPLIED
	  fontColor CDATA #IMPLIED>
Attribute Mand. Description Default
id no FILE.id  
template no FILE.template  
label no Location of the file on the disk.  
type no The type of file that can be selected. The following types are managed:
TEXT: Text file
IMAGE: Image file
AUDIO: Audio file
VIDEO: Video file
TEXT
bean no Allows specifying the name of a Java class that replaces the default graphical component.  
attachmentDirectory no This attribute specifies the directory where files are stored on server. The default value is a directory named "files". "files"
attachmentHandler no Attachment manager.
If a value is set on this attribute, then the form sends not only the name but also the content of the attached file.
This file can then be kept on the server. By default, the sending of attachments is disabled.
It is possible to specify the default manager, with ?default? as value (the manager that is used is then leon.view.web.LyFileAttachmentHandler), or else a specific manager inheriting the class that is used by default.
 
directory no Directory from which search of files is done. If a file is chosen in a sub-directory of directtory, the value is relative to this directory (its value doesn't contain the directory part).  
filter no "Filter for searched
files (example: ""*.doc"")"
 
nCols no Width of the file component. -1
nRows no Height of the file component. -1
border no Allows defining whether a border will be displayed around the image or not (image type only):
NONE: No border (default value)
SINGLE: Simple border
DOUBLE: Double border
RAISED: Border simulating a raised 3D frame
LOWERED: Border simulating a lowered 3D frame
NONE
image no Indicates the image used for file selection button.  
font no FILE.font  
enabledColor no Background of the file selector when enabled.  
disabledColor no Background of the file selector when disabled.  
fontColor no FILE.fontColor  

SAMPLE

<!-- File of image type -->
<FILE label="C:/images/user.gif" type="IMAGE"/>