|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectatg.nucleus.logging.VariableArgumentApplicationLoggingImpl
atg.nucleus.logging.ApplicationLoggingImpl
atg.svc.agent.ui.tables.ColumnConfiguration
public class ColumnConfiguration
The ColumnConfiguration class manages column configuration for an instance of a UI grid. The goal of this feature is to allow ATG customers to extend the columns that are rendered under a grid control. Also, it is to provide support for additional columns and fields specific to an implementation as well as allow other columns that are not needed to be removed. Grid configuration manages the preservation of configurations and during the migration process between releases. Another goal of this feature is to define a methodology to incorporate customer-specific JSP fragments to render the content in a column. The JSP fragments are found in various places under the web application root. Grid component configuration is managed through the application configuration layer and JSP fragments. To avoid migration issues, it is best to override both of these components in a separate application module dedicated to customizations. The configuration files for managing grids are located at: /atg/commerce/csr/ui/tables/order /atg/commerce/csr/ui/tables/customer /atg/commerce/csr/ui/tables/tickets The steps for customizing column title, sorting and width are similar in that they update properties in the column configuration component. Quotes should not be used when setting values in this component. They all begin with the same steps for overriding the column configuration: 1. Create a new application module for customizations. Include this module when starting JBOSS. See instructions in the ATG docs. 2. Locate the properties file that defines the column configuration under /atg/commerce/custsvc/ui/tables. 3. Inside the customization module, create a properties file at the corresponding path with no properties defined initially. To customize a column title: 1. Create or edit a resource bundle for customized strings in the customization module. 2. In the properties file for the column, set the resourceBundle and resourceKey properties to point to the corresponding resource bundle and key containing the customized string. This will override the default values for these properties to the new values. To customize column sorting: 1. In the properties file for the column, set the defaultSort property to "ascending" or "descending". Removing the property or setting the property to an empty string will remove sorting. 2. Optional: It is possible to sort on a field other than the data field that is rendered in the column. This can be done by setting the sortField to any field in the data model. For example, the column might display a data field containing an HTML link or JavaScript, such as viewLink, which is not appropriate for sorting. However, by setting the sortField property to id, the column can still be sorted by the corresponding id property. To customize column width: 1. In the properties file for the column, set the width property to the desired CSS width specification, e.g. 4em. To set the column width to fill the remaining space unused by other columns, set the width to auto. The data renderer page displays the content to render within the column. By default, this page is called for each column when the grid items are iterated. The following parameters are passed to the data renderer page each time it is included: 1. field - the string identifier of the column to render as defined in the ColumnConfiguration object. 2. colIndex - the zero-based index of the column. 3. [bean] - the object(s) containing the data for the grid item. They will vary depending on the data being rendered. For an order, the item is a single orderItemMap bean. Before customizing the data renderer page, perform the following steps (as above): 1. Create a new application module for customizations. Include this module when starting JBOSS. See instructions in the ATG docs. 2. Locate the properties file that defines the column configuration under /atg/commerce/custsvc/ui/tables. 3. Inside the customization module, create an empty properties file at the corresponding path to override the base column configuration. To customize the data render page: 1. Create a new JSP in the customization module to render the customized data. 2. In the customization module, create a new PageFragment properties file under /atg/commerce/custsvc/ui/tables. 3. In the properties file for the page fragment, set the URL and servletContext to reference the JSP page created in the customization module. 4. In the properties file for the column, update the dataRendererPage property to point to the full nucleus path to the PageFragment properties file. Here is a sample column configuration file: $class=atg.svc.agent.ui.tables.ColumnConfiguration defaultSort=ascending field=id width=6em resourceBundle=atg.svc.agent.ui.UserMessages resourceKey=view-ticket isVisible=true cellRendererPage=/atg/commerce/custsvc/ui/tables/order/ViewLinkPage dataRendererPage=/atg/commerce/custsvc/ui/tables/order/ColumnRendererPage
Field Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
|
protected atg.web.PageFragment |
mCellRendererPage
The page fragment containing the HTML or JavaScript to render the cell. |
protected atg.web.PageFragment |
mDataRendererPage
The page fragment that renders the content or defines the JSON |
protected java.lang.String |
mDefaultSort
Either 'ascending' or 'descending' or blank for no sorting |
protected java.lang.String |
mField
The field name identifier for the data to render in the column from the data model. |
protected java.lang.String |
mIsVisible
Whether to display the column in the UI or only to send back the data for the column |
protected java.lang.String |
mResourceBundle
The resource bundle that contains the column display name |
protected java.lang.String |
mResourceKey
The key that references the column display name in the resource bundle |
protected java.lang.String |
mSortField
The name of the data model field on which to sort (if different from field). |
protected java.lang.String |
mStyles
The column CSS styles |
protected java.lang.String |
mWidth
The extent of the column using the dojo grid syntax (e.g. |
Fields inherited from interface atg.nucleus.logging.TraceApplicationLogging |
---|
DEFAULT_LOG_TRACE_STATUS |
Fields inherited from interface atg.nucleus.logging.ApplicationLogging |
---|
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS |
Constructor Summary | |
---|---|
ColumnConfiguration()
|
Method Summary | |
---|---|
atg.web.PageFragment |
getCellRendererPage()
|
atg.web.PageFragment |
getDataRendererPage()
|
java.lang.String |
getDefaultSort()
|
java.lang.String |
getField()
|
java.lang.String |
getIsVisible()
|
java.lang.String |
getResourceBundle()
|
java.lang.String |
getResourceKey()
|
java.lang.String |
getSortField()
|
java.lang.String |
getStyles()
|
java.lang.String |
getWidth()
|
void |
setCellRendererPage(atg.web.PageFragment pCellRendererPage)
|
void |
setDataRendererPage(atg.web.PageFragment pDataRendererPage)
|
void |
setDefaultSort(java.lang.String pDefaultSort)
|
void |
setField(java.lang.String pField)
|
void |
setIsVisible(java.lang.String pIsVisible)
|
void |
setResourceBundle(java.lang.String pResourceBundle)
|
void |
setResourceKey(java.lang.String pResourceKey)
|
void |
setSortField(java.lang.String pSortField)
|
void |
setStyles(java.lang.String pStyles)
|
void |
setWidth(java.lang.String pWidth)
|
Methods inherited from class atg.nucleus.logging.ApplicationLoggingImpl |
---|
addGlobalLogListeners, addLogListener, getLoggingForVlogging, getLoggingIdentifer, getLoggingIdentifier, getLogListenerCount, getLogListeners, initializeFromServiceEvent, isAutoInitListeners, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, removeLogListener, sendLogEvent, setAutoInitListeners, setLoggingDebug, setLoggingError, setLoggingIdentifier, setLoggingInfo, setLoggingTrace, setLoggingWarning |
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl |
---|
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String CLASS_VERSION
protected java.lang.String mDefaultSort
protected java.lang.String mField
protected java.lang.String mSortField
protected java.lang.String mIsVisible
protected java.lang.String mResourceBundle
protected java.lang.String mResourceKey
protected java.lang.String mStyles
protected java.lang.String mWidth
protected atg.web.PageFragment mCellRendererPage
protected atg.web.PageFragment mDataRendererPage
Constructor Detail |
---|
public ColumnConfiguration()
Method Detail |
---|
public java.lang.String getDefaultSort()
public void setDefaultSort(java.lang.String pDefaultSort)
public java.lang.String getField()
public void setField(java.lang.String pField)
public java.lang.String getSortField()
public void setSortField(java.lang.String pSortField)
public java.lang.String getIsVisible()
public void setIsVisible(java.lang.String pIsVisible)
public java.lang.String getResourceBundle()
public void setResourceBundle(java.lang.String pResourceBundle)
public java.lang.String getResourceKey()
public void setResourceKey(java.lang.String pResourceKey)
public java.lang.String getStyles()
public void setStyles(java.lang.String pStyles)
public java.lang.String getWidth()
public void setWidth(java.lang.String pWidth)
public atg.web.PageFragment getCellRendererPage()
public void setCellRendererPage(atg.web.PageFragment pCellRendererPage)
public atg.web.PageFragment getDataRendererPage()
public void setDataRendererPage(atg.web.PageFragment pDataRendererPage)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |