net.mlw.vlh.web.tag.support
Class HtmlDisplayProvider

java.lang.Object
  extended bynet.mlw.vlh.web.tag.support.AbstractHTMLDisplayProvider
      extended bynet.mlw.vlh.web.tag.support.HtmlDisplayProvider
All Implemented Interfaces:
DisplayProvider

public class HtmlDisplayProvider
extends AbstractHTMLDisplayProvider

Version:
$Revision: 1.20 $ $Date: 2005/11/23 14:37:15 $
Author:
Matthew L. Wilson, Andrej Zachar

Constructor Summary
HtmlDisplayProvider()
           
 
Method Summary
 String getCellPostProcess()
           
 String getCellPreProcess(Attributes attributes)
           
 String getHeaderCellPostProcess()
          Get the HTML that comes after the column text.
 String getHeaderCellPreProcess(ColumnInfo columnInfo, ValueListInfo info)
          Get the HTML that comes before the column text.
 String getHeaderLabel(ColumnInfo columnInfo, TableInfo tableInfo, ValueListInfo info, Map includeParameters)
          Formats the text to be displayed as the header by wraping it in a link if sorting is enabled.
 String getImageHome()
           
 String getImageHome(javax.servlet.http.HttpServletRequest request)
          Return imageHome, if is needed, return it with prefix "appDir"
 boolean isPreAppendContextPath()
           
 boolean isUseNoWrap()
           
 boolean isUsePadding()
           
protected  void renderHeaderLabelLink(StringBuffer sb, ColumnInfo columnInfo, TableInfo tableInfo, ValueListInfo info, Map parameters)
          Renders a link as a header of the column if the sorting is enabled.
 void setImageHome(String dir)
          Set the default path for images used in paging, focusing and so on.
 void setPreAppendContextPath(boolean preAppendAppDir)
          Pre append to imageHome property application context dir.
 void setUseNoWrap(boolean useNoWrap)
           
 void setUsePadding(boolean usePadding)
           
 String toString()
           
 
Methods inherited from class net.mlw.vlh.web.tag.support.AbstractHTMLDisplayProvider
doesIncludeBodyContent, emphase, getHeaderRowPostProcess, getHeaderRowPreProcess, getMimeType, getNestedHeaderPostProcess, getNestedHeaderPreProcess, getRowPostProcess, getRowPreProcess
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HtmlDisplayProvider

public HtmlDisplayProvider()
Method Detail

getImageHome

public String getImageHome()
Returns:
base image home.
See Also:
setImageHome(String)

isPreAppendContextPath

public boolean isPreAppendContextPath()
Returns:
true, false
See Also:
setPreAppendContextPath(boolean)

isUseNoWrap

public boolean isUseNoWrap()
Returns:

isUsePadding

public boolean isUsePadding()
Returns:

setPreAppendContextPath

public void setPreAppendContextPath(boolean preAppendAppDir)
Pre append to imageHome property application context dir. Default is set to false due to backward compatibility.

Example

Considere that valuelist is the name of application context.
  • true
  • valuelist/ images
  • false
  • images


setImageHome

public void setImageHome(String dir)
Set the default path for images used in paging, focusing and so on. Default is set to images.

Parameters:
dir -

Example

  • /myProject/images/microsoftLook
  • generate html for image like this < alt="Sort" src="/myProject/images/microsoftLook/..." >
  • images/microsoftLook
  • generate html for image like this < alt="Sort" src="images/microsoftLook/..." >
See Also:
setPreAppendContextPath(boolean)


getHeaderCellPreProcess

public String getHeaderCellPreProcess(ColumnInfo columnInfo,
                                      ValueListInfo info)
Get the HTML that comes before the column text.

Returns:
The HTML that comes before the column text.

getHeaderLabel

public String getHeaderLabel(ColumnInfo columnInfo,
                             TableInfo tableInfo,
                             ValueListInfo info,
                             Map includeParameters)
Formats the text to be displayed as the header by wraping it in a link if sorting is enabled. Alt (hint) is localized, please define in your property file for messages the property "sorting"

Parameters:
columnInfo - The ColumnInfo.
tableInfo - The TableInfo.
info - The ValueListInfo.
Returns:
The formated HTML.

renderHeaderLabelLink

protected void renderHeaderLabelLink(StringBuffer sb,
                                     ColumnInfo columnInfo,
                                     TableInfo tableInfo,
                                     ValueListInfo info,
                                     Map parameters)
Renders a link as a header of the column if the sorting is enabled. Subclasses can overide or extend the method to provide different behaviour.

Parameters:
sb - StringBuffer to render into
columnInfo - The ColumnInfo.
tableInfo - The TableInfo.
info - The ValueListInfo.
parameters - Map of parameters

getImageHome

public String getImageHome(javax.servlet.http.HttpServletRequest request)
Return imageHome, if is needed, return it with prefix "appDir"

Returns:
String that represent images home dir.

getHeaderCellPostProcess

public String getHeaderCellPostProcess()
Get the HTML that comes after the column text.

Returns:
The HTML that comes after the column text.

getCellPreProcess

public String getCellPreProcess(Attributes attributes)

getCellPostProcess

public String getCellPostProcess()

toString

public String toString()
See Also:
Object.toString()

setUsePadding

public void setUsePadding(boolean usePadding)
Parameters:
usePadding - The usePadding to set.

setUseNoWrap

public void setUseNoWrap(boolean useNoWrap)
Parameters:
useNoWrap - The useNoWrap to set.


Copyright © 2003-2006 mlavilson. All Rights Reserved.