ibm-information-center/dist/eclipse/plugins/i5OS.ic.rzahh_5.4.0.1/filelistrenderer.htm

66 lines
4.0 KiB
HTML

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en-us" xml:lang="en-us">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="security" content="public" />
<meta name="Robots" content="index,follow" />
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
<meta name="DC.Type" content="reference" />
<meta name="DC.Title" content="FileListRenderer class" />
<meta name="abstract" content="" />
<meta name="description" content="" />
<meta name="copyright" content="(C) Copyright IBM Corporation 2006" />
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 2006" />
<meta name="DC.Format" content="XHTML" />
<meta name="DC.Identifier" content="filelistrenderer" />
<meta name="DC.Language" content="en-us" />
<!-- All rights reserved. Licensed Materials Property of IBM -->
<!-- US Government Users Restricted Rights -->
<!-- Use, duplication or disclosure restricted by -->
<!-- GSA ADP Schedule Contract with IBM Corp. -->
<link rel="stylesheet" type="text/css" href="./ibmdita.css" />
<link rel="stylesheet" type="text/css" href="./ic.css" />
<title>FileListRenderer class</title>
</head>
<body id="filelistrenderer"><a name="filelistrenderer"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">FileListRenderer class</h1>
<div><p></p>
<div class="section"><p>The <a href="javadoc/com/ibm/as400/util/html/FileListRenderer.html"> FileListRenderer</a> class renders any field
for File objects (directories and files) in a <a href="filelist.htm#filelist">FileListElement</a>. </p>
<p>The
FileListRenderer class offers methods that allow you to perform the following
actions:</p>
<ul><li><a href="javadoc/com/ibm/as400/util/html/FileListRenderer.html#GETDIRECTORYNAME(JAVA.IO.FILE)"> Get</a> the name of the directory </li>
<li><a href="javadoc/com/ibm/as400/util/html/FileListRenderer.html#GETFILENAME(JAVA.IO.FILE)">Get</a> the name of the file</li>
<li><a href="javadoc/com/ibm/as400/util/html/FileListRenderer.html#GETPARENTNAME(JAVA.IO.FILE)"> Get</a> the name of the parent directory</li>
<li><a href="javadoc/com/ibm/as400/util/html/FileListRenderer.html#GETROWDATA(JAVA.IO.FILE, BOOLEAN, JAVA.TEXT.COLLATOR)">Return the row data</a> that you want to display
in the FileListElement</li>
</ul>
<p>This example creates an FileListElement object with a renderer:</p>
<pre> // Create a FileListElement.
FileListElement fileList = new FileListElement(sys, httpservletrequest);
// Set the renderer specific to this servlet, which extends
// FileListRenderer and overrides applicable methods.
fileList.setRenderer(new myFileListRenderer(request));</pre>
<p>If
you don't want to use the default renderer, you can extend FileListRenderer
and override methods or create new ones. For example, you might want to ensure
that you prevent passing the names of specific directories or files with
certain extensions to the FileListElement. By extending the class and overriding
the appropriate method, you can return null for these files and directories,
ensuring that they are not displayed.</p>
<p>To fully customize the rows within
a <a href="filelist.htm#filelist">FileListElement</a>, use the <a href="javadoc/com/ibm/as400/util/html/FileListRenderer.html#GETROWDATA(JAVA.IO.FILE, BOOLEAN, JAVA.TEXT.COLLATOR)">getRowData() method</a>. An example of customizing
row data using getRowData() might be adding a column to the row
data or rearranging the columns. When the default behavior of FileListRenderer
is satisfactory, you need no additional programming because the FileListElement
class creates a default FileListRenderer.</p>
</div>
</div>
</body>
</html>