<FILE> : Path to a file field

Java class : leon.info.LyFileFieldInfo

ROLE

This element defines a field that contains the path to a file. An attribute enables to define MIME types that are allowed for the files of this field. Information about that kind of field could be completed by the path to the default file.

ATTRIBUTES

<!ATTLIST FILE
	  id ID #REQUIRED
	  template IDREF #IMPLIED
	  javaName NMTOKEN #IMPLIED
	  mimeTypes CDATA #IMPLIED
	  directory CDATA #IMPLIED
	  filter CDATA #IMPLIED
	  behavior NMTOKEN #IMPLIED>
Attribute Mand. Description Default
id yes This is the identifier of this field.  
template no Reference to the relation field used as pattern.  
javaName no Name of the Java attribute that corresponds to the current field when automatic code generation is used. The default value is the name of the current field.  
mimeTypes no List of MIME types allowed for this file. Only 'image' type and type 'text/x-url' are recognized.  
directory no Directory from which search of files is done. If a file is chosen in a sub-directory of directory, the value is relative to this directory (its value doesn't contain the directory part).  
filter no Filter for searched
files (example: "*.doc")
 
behavior no Name of the Java class representing the behavior of this field. Reserved for a future use.  

ELEMENTS

<!ELEMENT FILE 
	  (%FIELD_BEGIN;,
	   DEFAULT?,
	   %FIELD_END;)>
Element Mand. Mult. Description
FIELD_BEGIN
yes no Begin of a field description.
DEFAULT no no Path to the default file.
FIELD_END
yes no End of a field description.

SAMPLE

<FILE id="user_photo" mimeType='image' directory="$MY_IMAGES_DIR" 			
		filter="*.gif">
	<F_BIND value="PHOTO"/>
	<NAME value="USER_PHOTO"/>
	<NROWS value="100"/>
	<NCOLS value="100"/>
	<F_MARKS create='true' set='true'/>
</FILE>