425 lines
		
	
	
	
		
			14 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			425 lines
		
	
	
	
		
			14 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN""http://www.w3.org/TR/REC-html40/loose.dtd">
 | |
| <!--NewPage-->
 | |
| <HTML>
 | |
| <HEAD>
 | |
| <TITLE>
 | |
| jala.Form.Component.File
 | |
| </TITLE>
 | |
| <LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
 | |
| </HEAD>
 | |
| <SCRIPT>
 | |
| function asd()
 | |
| {
 | |
| parent.document.title="jala.Form.Component.File";
 | |
| }
 | |
| </SCRIPT>
 | |
| <BODY BGCOLOR="white" onload="asd();">
 | |
| 
 | |
| <!-- ========== START OF NAVBAR ========== -->
 | |
| <A NAME="navbar_bottom"><!-- --></A>
 | |
| <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
 | |
| <TR>
 | |
| <TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
 | |
| <A NAME="navbar_bottom_firstrow"><!-- --></A>
 | |
| <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
 | |
|   <TR ALIGN="center" VALIGN="top">
 | |
|   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
 | |
|   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">  <A HREF="overview-summary-Form.js.html"><FONT CLASS="NavBarFont1"><B>File</B></FONT></A> </TD>
 | |
|   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
 | |
|   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
 | |
|   <!--TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"-->    <!--A HREF="deprecated-list.html"--><!--FONT CLASS="NavBarFont1">Deprecated</FONT--><!--/A--><!-- </TD-->
 | |
|   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="index-all.html"--><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
 | |
|   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
 | |
|   </TR>
 | |
| </TABLE>
 | |
| </TD>
 | |
| <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
 | |
| <B>Jala 1.3</B>
 | |
| </EM>
 | |
| </TD
 | |
| </TR>
 | |
| 
 | |
| <TR>
 | |
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
 | |
|  <A HREF="jala.Form.Component.Fieldset.html"><B>PREV CLASS</B></A><!-- 
 | |
|    NEXT CLASS 
 | |
| -->
 | |
|  <A HREF="jala.Form.Component.Hidden.html"><B>NEXT CLASS</B></A></FONT></TD>
 | |
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
 | |
|   <A HREF="index.html" TARGET="_top"><B>FRAMES</B></A>   
 | |
|  <A HREF="jala.Form.Component.File.html" TARGET="_top"><B>NO FRAMES</B></A>   
 | |
|  
 | |
| <SCRIPT>
 | |
|   <!--
 | |
|   if(window==top) {
 | |
|     document.writeln('<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
 | |
|   }
 | |
|   //-->
 | |
| </SCRIPT>
 | |
| <NOSCRIPT>
 | |
| <A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>
 | |
| </NOSCRIPT>
 | |
| </FONT></TD>
 | |
| </TR>
 | |
| <TR>
 | |
| <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
 | |
|   SUMMARY: <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
 | |
| <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
 | |
| DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
 | |
| </TR>
 | |
| </TABLE>
 | |
| <!-- =========== END OF NAVBAR =========== -->
 | |
| <HR>
 | |
| 
 | |
| <!-- ======== START OF CLASS DATA ======== -->
 | |
| <H2>Class jala.Form.Component.File</H2>
 | |
| <PRE>Object
 | |
|    |
 | |
|    +--<a href='jala.Form.Component.Input.html'>jala.Form.Component.Input</a>
 | |
|          |
 | |
|          +--<b>jala.Form.Component.File</b>
 | |
| </PRE>
 | |
| 
 | |
|    <DL>
 | |
|    <DT>
 | |
|       <B>Direct Known Subclasses:</B> 
 | |
|       <DD>
 | |
|                 <a href="jala.Form.Component.Image.html">jala.Form.Component.Image</a>
 | |
|       </DD>
 | |
|    </DL>
 | |
| 
 | |
| 
 | |
| <HR>
 | |
| <DL>
 | |
|    <!-- Class definition -->
 | |
|    <DT>class 
 | |
|    <B>jala.Form.Component.File</B>
 | |
|    
 | |
|       <DT>extends <a href='jala.Form.Component.Input.html'>jala.Form.Component.Input</a> 
 | |
|    
 | |
| 
 | |
| </DL>
 | |
|    
 | |
|    <P>
 | |
|    <BR/>Subclass of jala.Form.Component.Input which renders and validates a
 | |
|  file upload.
 | |
|  <BR/><I>Defined in <a href='overview-summary-Form.js.html'>Form.js</a></I><BR/><BR/>
 | |
|    </P>
 | |
|    
 | |
|    <HR>
 | |
| 
 | |
| <!-- ======== NESTED CLASS SUMMARY ======== -->
 | |
| 
 | |
| <!-- ======== END NESTED CLASS SUMMARY ======== -->
 | |
| 
 | |
| 
 | |
| <!-- =========== FIELD SUMMARY =========== -->
 | |
| 
 | |
| 
 | |
|    
 | |
| 
 | |
| <!-- =========== END FIELD SUMMARY =========== -->
 | |
| 
 | |
| 
 | |
| <!-- ======== CONSTRUCTOR SUMMARY ======== -->
 | |
| 
 | |
| <A NAME="constructor_summary"><!-- --></A>
 | |
| <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
 | |
| <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 | |
| <TD COLSPAN=2><FONT SIZE="+2">
 | |
| <B>Constructor Summary</B></FONT></TD>
 | |
| </TR>
 | |
| <TR BGCOLOR="white" CLASS="TableRowColor">
 | |
|    <TD>
 | |
|       <CODE>
 | |
| 	 <B>
 | |
| 	    <A HREF="jala.Form.Component.File.html#jala.Form.Component.File()">jala.Form.Component.File</A> 
 | |
| 	 </B>
 | |
| 	 (<String> name)
 | |
|       </CODE>
 | |
|       <BR>
 | |
|                  
 | |
|       Creates a new File component instance
 | |
|       </TD>
 | |
| </TR>
 | |
| </TABLE>
 | |
| 
 | |
| <!-- ======== END CONSTRUCTOR SUMMARY ======== -->
 | |
| 
 | |
|  
 | |
| 
 | |
| <!-- ========== METHOD SUMMARY =========== -->
 | |
| 
 | |
| <A NAME="method_summary"><!-- --></A>
 | |
| <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
 | |
| <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 | |
| <TD COLSPAN=2><FONT SIZE="+2">
 | |
| <B>Method Summary</B></FONT></TD>
 | |
| </TR>
 | |
| 
 | |
| 
 | |
|    <TR BGCOLOR="white" CLASS="TableRowColor">
 | |
|       <TD ALIGN="right" VALIGN="top" WIDTH="1%">
 | |
| 	 <FONT SIZE="-1">
 | |
| 	    <CODE> String</CODE>
 | |
| 	 </FONT>
 | |
|       </TD>
 | |
|       <TD>
 | |
| 	 <CODE>
 | |
| 	    <B>
 | |
| 	       <A HREF="#checkRequirements">checkRequirements</A></B>(<Object> reqData)
 | |
| 	 </CODE>
 | |
| 	 <BR>
 | |
| 	           
 | |
| 	 Validates a file upload by making sure it's there (if REQUIRE is set),
 | |
|  checking the file size, the content type and by trying to construct an image.
 | |
|       </TD>
 | |
|    </TR>
 | |
| 
 | |
|    <TR BGCOLOR="white" CLASS="TableRowColor">
 | |
|       <TD ALIGN="right" VALIGN="top" WIDTH="1%">
 | |
| 	 <FONT SIZE="-1">
 | |
| 	    <CODE> void</CODE>
 | |
| 	 </FONT>
 | |
|       </TD>
 | |
|       <TD>
 | |
| 	 <CODE>
 | |
| 	    <B>
 | |
| 	       <A HREF="#renderControls">renderControls</A></B>(<Object> attr, <Object> value, <Object> reqData)
 | |
| 	 </CODE>
 | |
| 	 <BR>
 | |
| 	           
 | |
| 	 Renders a file input tag to the response.
 | |
|       </TD>
 | |
|    </TR>
 | |
| 
 | |
| 
 | |
| </TABLE>
 | |
| 
 | |
| 
 | |
| 
 | |
|  <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
 | |
| <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
 | |
| <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
 | |
| <TD><B>Methods inherited from class <a href="jala.Form.Component.Input.html">jala.Form.Component.Input</a></B></TD>
 | |
| </TR>
 | |
| <TR BGCOLOR="white" CLASS="TableRowColor">
 | |
| <TD><CODE>
 | |
| <!-- Inherited methods -->
 | |
| <a href="jala.Form.Component.Input.html#validate">validate</a>, <a href="jala.Form.Component.Input.html#save">save</a>, <a href="jala.Form.Component.Input.html#getValue">getValue</a>, <a href="jala.Form.Component.Input.html#setValue">setValue</a>, <a href="jala.Form.Component.Input.html#render">render</a>, <a href="jala.Form.Component.Input.html#renderError">renderError</a>, <a href="jala.Form.Component.Input.html#renderLabel">renderLabel</a>, <a href="jala.Form.Component.Input.html#renderHelp">renderHelp</a>, <a href="jala.Form.Component.Input.html#render_macro">render_macro</a>, <a href="jala.Form.Component.Input.html#controls_macro">controls_macro</a>, <a href="jala.Form.Component.Input.html#error_macro">error_macro</a>, <a href="jala.Form.Component.Input.html#label_macro">label_macro</a>, <a href="jala.Form.Component.Input.html#help_macro">help_macro</a>, <a href="jala.Form.Component.Input.html#id_macro">id_macro</a>, <a href="jala.Form.Component.Input.html#name_macro">name_macro</a>, <a href="jala.Form.Component.Input.html#type_macro">type_macro</a>, <a href="jala.Form.Component.Input.html#class_macro">class_macro</a>, <a href="jala.Form.Component.Input.html#getControlAttributes">getControlAttributes</a>, <a href="jala.Form.Component.Input.html#checkLength">checkLength</a>, <a href="jala.Form.Component.Input.html#parseValue">parseValue</a>
 | |
| </CODE></TD>
 | |
| </TR>
 | |
| </TABLE>
 | |
|  
 | |
| 
 | |
| <P>
 | |
| <!-- ========== END METHOD SUMMARY =========== -->
 | |
| 
 | |
| 
 | |
| <!-- ============ FIELD DETAIL START =========== -->
 | |
| 
 | |
| 
 | |
| <!-- ============ FIELD DETAIL END =========== -->
 | |
| 
 | |
|     <!-- ========= CONSTRUCTOR DETAIL START ======== -->
 | |
| 
 | |
| <A NAME="constructor_detail"><!-- --></A>
 | |
| <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
 | |
|    <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 | |
|       <TD COLSPAN=1>
 | |
|       <FONT SIZE="+2"><B>Constructor Detail</B></FONT>
 | |
|       </TD>
 | |
|    </TR>
 | |
| </TABLE>
 | |
| 
 | |
| <A NAME="jala.Form.Component.File()"><!-- --></A><H3>
 | |
| jala.Form.Component.File</H3>
 | |
| <PRE><B>jala.Form.Component.File</B>(<String> name)</PRE>
 | |
| 
 | |
| 
 | |
| <UL>
 | |
|    Creates a new File component instance
 | |
| </UL>
 | |
| 
 | |
| 
 | |
| 
 | |
|    <UL>
 | |
|    <B>Parameters:</B>
 | |
|    
 | |
|      <UL><CODE>name</CODE> -  Name of the component, used as name of the html controls.  
 | |
|      </UL>
 | |
|    
 | |
|    
 | |
|    </UL>
 | |
| 
 | |
| 
 | |
| <!-- Constructor return value(s) -->
 | |
| 
 | |
|    <UL>
 | |
|    <B>Returns:</B>
 | |
|      <UL>
 | |
|      A newly created File component   
 | |
|      </UL>
 | |
|    </UL>
 | |
| 
 | |
| <!-- End constructor return value(s) -->
 | |
| 
 | |
| <!-- ADDITIONAL ATTRIBUTES -->
 | |
| 
 | |
| <HR/>
 | |
| <!-- END ADDITIONAL ATTRIBUTES  -->
 | |
| 
 | |
| <!-- ========= CONSTRUCTOR DETAIL END ======== -->
 | |
| 
 | |
| 
 | |
| <!-- ============ METHOD DETAIL START ========== -->
 | |
| 
 | |
| <A NAME="method_detail"><!-- --></A>
 | |
| <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
 | |
|    <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 | |
|       <TD COLSPAN=1><FONT SIZE="+2">
 | |
|          <B>Method Detail</B></FONT>
 | |
|       </TD>
 | |
|    </TR>
 | |
| </TABLE>
 | |
| 
 | |
| <!-- One single method detail entry -->
 | |
| 
 | |
|    <A NAME="checkRequirements"><!-- --></A>
 | |
|    <H3>checkRequirements</H3>
 | |
|    <PRE>String <B>checkRequirements</B>(<Object> reqData)</PRE>
 | |
|    
 | |
|       <UL>Validates a file upload by making sure it's there (if REQUIRE is set),
 | |
|  checking the file size, the content type and by trying to construct an image.</UL>
 | |
|    
 | |
| 
 | |
|    <!-- METHOD PARAMETERS START -->
 | |
|    
 | |
|    <UL>
 | |
|    <B>Parameters:</B>
 | |
|    
 | |
|      <UL><CODE>reqData</CODE> -  request data  
 | |
|       </UL> 
 | |
|    
 | |
|      <UL><CODE>tracker</CODE> -  jala.Form.Tracker object storing possible error messages  
 | |
|       </UL> 
 | |
|    
 | |
|    </UL>
 | |
|    
 | |
|    <!-- METHOD PARAMETERS END -->
 | |
| 
 | |
|    
 | |
|    <UL>
 | |
|    <B>Returns:</B>
 | |
|         <UL>
 | |
|         null if everything is ok or string containing error message   
 | |
|         </UL>
 | |
|    </UL>
 | |
|    
 | |
| 
 | |
|    <!-- ADDITIONAL ATTRIBUTES START -->
 | |
|    
 | |
|    <!-- ADDITIONAL ATTRIBUTES  END -->
 | |
| <HR>
 | |
| 
 | |
|    <A NAME="renderControls"><!-- --></A>
 | |
|    <H3>renderControls</H3>
 | |
|    <PRE>void <B>renderControls</B>(<Object> attr, <Object> value, <Object> reqData)</PRE>
 | |
|    
 | |
|       <UL>Renders a file input tag to the response.</UL>
 | |
|    
 | |
| 
 | |
|    <!-- METHOD PARAMETERS START -->
 | |
|    
 | |
|    <UL>
 | |
|    <B>Parameters:</B>
 | |
|    
 | |
|      <UL><CODE>attr</CODE> -  Basic attributes for this element.  
 | |
|       </UL> 
 | |
|    
 | |
|      <UL><CODE>value</CODE> -  Value to be used for rendering this element.  
 | |
|       </UL> 
 | |
|    
 | |
|      <UL><CODE>reqData</CODE> -  Request data for the whole form. This argument is        passed only if the form is re-rendered after an error occured.    
 | |
|       </UL> 
 | |
|    
 | |
|    </UL>
 | |
|    
 | |
|    <!-- METHOD PARAMETERS END -->
 | |
| 
 | |
|    
 | |
| 
 | |
|    <!-- ADDITIONAL ATTRIBUTES START -->
 | |
|    
 | |
|    <!-- ADDITIONAL ATTRIBUTES  END -->
 | |
| <HR>
 | |
| 
 | |
| 
 | |
| 
 | |
| <!-- ============ METHOD DETAIL END ========== -->
 | |
| 
 | |
| <!-- ========= END OF CLASS DATA ========= -->
 | |
| 
 | |
| <!-- ========== START OF NAVBAR ========== -->
 | |
| <A NAME="navbar_bottom"><!-- --></A>
 | |
| <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
 | |
| <TR>
 | |
| <TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
 | |
| <A NAME="navbar_bottom_firstrow"><!-- --></A>
 | |
| <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
 | |
|   <TR ALIGN="center" VALIGN="top">
 | |
|   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
 | |
|   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">  <A HREF="overview-summary-Form.js.html"><FONT CLASS="NavBarFont1"><B>File</B></FONT></A> </TD>
 | |
|   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev">  <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
 | |
|   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="overview-tree.html"><FONT CLASS="NavBarFont1"><b>Tree</b></FONT></A> </TD>
 | |
|   <!--TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"-->    <!--A HREF="deprecated-list.html"--><!--FONT CLASS="NavBarFont1">Deprecated</FONT--><!--/A--><!-- </TD-->
 | |
|   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
 | |
|   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
 | |
|   </TR>
 | |
| </TABLE>
 | |
| </TD>
 | |
| <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
 | |
| <B>Jala 1.3</B>
 | |
| </EM>
 | |
| </TD
 | |
| </TR>
 | |
| 
 | |
| <TR>
 | |
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
 | |
|  <A HREF="jala.Form.Component.Fieldset.html"><B>PREV CLASS</B></A><!-- 
 | |
|    NEXT CLASS 
 | |
| -->
 | |
|  <A HREF="jala.Form.Component.Hidden.html"><B>NEXT CLASS</B></A></FONT></TD>
 | |
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
 | |
|   <A HREF="index.html" TARGET="_top"><B>FRAMES</B></A>   
 | |
|  <A HREF="jala.Form.Component.File.html" TARGET="_top"><B>NO FRAMES</B></A>   
 | |
|  
 | |
| <SCRIPT>
 | |
|   <!--
 | |
|   if(window==top) {
 | |
|     document.writeln('<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
 | |
|   }
 | |
|   //-->
 | |
| </SCRIPT>
 | |
| <NOSCRIPT>
 | |
| <A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>
 | |
| </NOSCRIPT>
 | |
| </FONT></TD>
 | |
| </TR>
 | |
| <TR>
 | |
| <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
 | |
|   SUMMARY: <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
 | |
| <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
 | |
| DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
 | |
| </TR>
 | |
| </TABLE>
 | |
| 
 | |
| <!-- =========== END OF NAVBAR =========== -->
 | |
| 
 | |
| <HR>
 | |
| <FONT SIZE="-1">
 | |
| 
 | |
| </FONT>
 | |
| <div class="jsdoc_ctime">Documentation generated by <a href="http://jsdoc.sourceforge.net/" target="_parent">JSDoc</a> on Tue Jan  8 15:45:31 2008</div>
 | |
| </BODY>
 | |
| </HTML>
 |