org.displaytag.export
Class CsvView

java.lang.Object
  extended byorg.displaytag.export.BaseExportView
      extended byorg.displaytag.export.CsvView
All Implemented Interfaces:
ExportView, TextExportView

public class CsvView
extends BaseExportView

Export view for comma separated value exporting.

Version:
$Revision: 1.13 $ ($Author: fgiust $)
Author:
Fabrizio Giustina

Constructor Summary
CsvView()
           
 
Method Summary
protected  java.lang.String escapeColumnValue(java.lang.Object value)
          Escaping for csv format.
protected  boolean getAlwaysAppendCellEnd()
          always append cell end string?
protected  boolean getAlwaysAppendRowEnd()
          always append row end string?
protected  java.lang.String getCellEnd()
          String to add after a cell.
 java.lang.String getMimeType()
          MimeType to return.
protected  java.lang.String getRowEnd()
          String to add after a row.
 void setParameters(TableModel tableModel, boolean exportFullList, boolean includeHeader, boolean decorateValues)
          initialize the parameters needed for export.
 
Methods inherited from class org.displaytag.export.BaseExportView
doExport, doHeaders, getCellStart, getDocumentEnd, getDocumentStart, getRowStart, outputPage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CsvView

public CsvView()
Method Detail

setParameters

public void setParameters(TableModel tableModel,
                          boolean exportFullList,
                          boolean includeHeader,
                          boolean decorateValues)
Description copied from interface: ExportView
initialize the parameters needed for export. The method is guarantee be called before doExport() and getMimeType(). Classes implementing ExportView should reset any instance field previously set when this method is called, in order to support instance reusing.

Specified by:
setParameters in interface ExportView
Overrides:
setParameters in class BaseExportView
See Also:
BaseExportView.setParameters(TableModel, boolean, boolean, boolean)

getRowEnd

protected java.lang.String getRowEnd()
Description copied from class: BaseExportView
String to add after a row.

Overrides:
getRowEnd in class BaseExportView
Returns:
String
See Also:
BaseExportView.getRowEnd()

getCellEnd

protected java.lang.String getCellEnd()
Description copied from class: BaseExportView
String to add after a cell.

Specified by:
getCellEnd in class BaseExportView
Returns:
String
See Also:
BaseExportView.getCellEnd()

getAlwaysAppendCellEnd

protected boolean getAlwaysAppendCellEnd()
Description copied from class: BaseExportView
always append cell end string?

Specified by:
getAlwaysAppendCellEnd in class BaseExportView
Returns:
boolean
See Also:
BaseExportView.getAlwaysAppendCellEnd()

getAlwaysAppendRowEnd

protected boolean getAlwaysAppendRowEnd()
Description copied from class: BaseExportView
always append row end string?

Specified by:
getAlwaysAppendRowEnd in class BaseExportView
Returns:
boolean
See Also:
BaseExportView.getAlwaysAppendRowEnd()

getMimeType

public java.lang.String getMimeType()
Description copied from interface: ExportView
MimeType to return.

Returns:
String mime type
See Also:
ExportView.getMimeType()

escapeColumnValue

protected java.lang.String escapeColumnValue(java.lang.Object value)
Escaping for csv format. Note this is the standard CVS format and it's not handled well by excel.

Specified by:
escapeColumnValue in class BaseExportView
Parameters:
value - original column value
Returns:
escaped column value
See Also:
BaseExportView.escapeColumnValue(java.lang.Object)


Copyright © 2002-2005 the Displaytag team. All Rights Reserved.