net.sourceforge.openutils.mgnlcontrols.configuration
Class AbstractGridColumnType

java.lang.Object
  extended by net.sourceforge.openutils.mgnlcontrols.configuration.AbstractGridColumnType
All Implemented Interfaces:
GridColumnType
Direct Known Subclasses:
ColorGridColumnType, ComboGridColumnType, DateGridColumnType, FckEditorGridColumnType, FileGridColumnType, LinkGridColumnType, TextGridColumnType, UUIDLinkGridColumnType

public abstract class AbstractGridColumnType
extends java.lang.Object
implements GridColumnType

A base class for column types: the javascript object for the column model is prepopulated with common data.

Version:
$Id: AbstractGridColumnType.java 2705 2010-06-21 16:21:05Z diego_schivo $
Author:
dschivo

Constructor Summary
AbstractGridColumnType()
           
 
Method Summary
protected abstract  void addColumnData(java.util.Map<java.lang.String,java.lang.String> column, java.lang.String propertyName, int colIndex, java.util.Map colMap, info.magnolia.cms.i18n.Messages msgs)
          Adds custom data to the javascript object for the column model (e.g.
 java.lang.String drawColumnJs(java.lang.String propertyName, int colIndex, java.util.Map colMap, info.magnolia.cms.i18n.Messages msgs)
          Gets the javascript object for the column model of the grid.
 java.lang.String drawSupportHtml(java.lang.String propertyName, int colIndex, java.util.Map colmap, info.magnolia.cms.i18n.Messages msgs)
          Adds extra markup to be used by the column, if needed.
 java.lang.String getHeadSnippet()
          Gets the html code for Including scripts and styles for the column.
 void processColumnOnLoad(java.lang.String[] column, info.magnolia.cms.core.Content colConfig)
          Possibly transforms the column values on grid load.
 void processColumnOnSave(java.lang.String[] column, info.magnolia.cms.core.Content colConfig, java.lang.String propertyName, info.magnolia.cms.core.Content parentNode)
          Possibly transforms the column values on grid save.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractGridColumnType

public AbstractGridColumnType()
Method Detail

getHeadSnippet

public java.lang.String getHeadSnippet()
Gets the html code for Including scripts and styles for the column. Called only once for each column type.

Specified by:
getHeadSnippet in interface GridColumnType
Returns:

drawSupportHtml

public java.lang.String drawSupportHtml(java.lang.String propertyName,
                                        int colIndex,
                                        java.util.Map colmap,
                                        info.magnolia.cms.i18n.Messages msgs)
Adds extra markup to be used by the column, if needed.

Specified by:
drawSupportHtml in interface GridColumnType
Returns:

drawColumnJs

public java.lang.String drawColumnJs(java.lang.String propertyName,
                                     int colIndex,
                                     java.util.Map colMap,
                                     info.magnolia.cms.i18n.Messages msgs)
Gets the javascript object for the column model of the grid.

Specified by:
drawColumnJs in interface GridColumnType
Returns:

processColumnOnLoad

public void processColumnOnLoad(java.lang.String[] column,
                                info.magnolia.cms.core.Content colConfig)
Possibly transforms the column values on grid load.

Specified by:
processColumnOnLoad in interface GridColumnType

processColumnOnSave

public void processColumnOnSave(java.lang.String[] column,
                                info.magnolia.cms.core.Content colConfig,
                                java.lang.String propertyName,
                                info.magnolia.cms.core.Content parentNode)
                         throws javax.jcr.RepositoryException,
                                info.magnolia.cms.security.AccessDeniedException
Possibly transforms the column values on grid save.

Specified by:
processColumnOnSave in interface GridColumnType
Throws:
javax.jcr.RepositoryException
info.magnolia.cms.security.AccessDeniedException

addColumnData

protected abstract void addColumnData(java.util.Map<java.lang.String,java.lang.String> column,
                                      java.lang.String propertyName,
                                      int colIndex,
                                      java.util.Map colMap,
                                      info.magnolia.cms.i18n.Messages msgs)
Adds custom data to the javascript object for the column model (e.g. editor, renderer).

Parameters:
column -
propertyName -
colIndex -
colMap -
msgs -


Copyright © 2008-2010 Openmind. All Rights Reserved.