mx.com.brained.taglib
Class GridUtil

java.lang.Object
  extended by mx.com.brained.taglib.GridUtil

public class GridUtil
extends java.lang.Object

Title: AwTaglib

Description: Active Widgets Tag Library

This is the most important class of the whole framework.
It contains a series of utility methods that help in rendering the grid as a whole, and works intimately with the Grid Iterator Tag

Copyright: Copyright (c) 2005

Company: Brain-ED

Version:
1.0
Author:
Isidoro Treviņo

Constructor Summary
GridUtil()
           
 
Method Summary
 void addTitle(java.util.HashMap atrib)
          Add a new header and attributes for the given list
 java.util.Collection getAttributes()
          Get a collection full of hashmaps with the attributes depending on the kind of field
 java.lang.String getCheckboxField(java.util.HashMap map, int cont, ResourceManagerIface resource)
          Return a Checkbox template
 java.lang.String getColumnProperties()
          Get the column templates to be rendered by the grid
 java.lang.String getComboBoxField(java.util.HashMap map, int cont, ResourceManagerIface resource)
          Return a ComboBox template
 java.util.Collection getData()
          Return the data entered into the grid
 java.lang.String getDataArray()
          Return a string representation of the datalist, ready to be used by the grid
 java.lang.String getDateField(java.util.HashMap map, int cont, ResourceManagerIface resource)
          Return a Date template
 java.lang.String getEditableField(java.util.HashMap map, int cont, ResourceManagerIface resource)
          Return an Editable template
 java.lang.String getHeaderArray()
          Returns a string representing an array with the headers being rendered
 java.lang.String getListField(java.util.HashMap map, int cont, ResourceManagerIface resource)
          Return a list template
 java.lang.String getPropertyArray()
          Returns a String representing an array with the properties of the bean being rendered
 java.lang.String getReadOnlyField(java.util.HashMap map, int index, ResourceManagerIface resource)
          Return a Read Only template
 java.util.Collection getRow()
          Get a row from the datalist
 java.lang.String getTemplates()
          Return all the templates that will be rendered
 java.lang.String getTitleArray()
          Gets a string representing the header array.
 void newRow()
          Create a new row for the data list
 void setContext(org.springframework.web.context.WebApplicationContext context)
           
 void setData(java.lang.String dato)
          Add a new data cell to the data list
 void setEmptyCollection()
           
 void setName(java.lang.String name)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GridUtil

public GridUtil()
Method Detail

setData

public void setData(java.lang.String dato)
Add a new data cell to the data list

Parameters:
dato - String

newRow

public void newRow()
Create a new row for the data list


addTitle

public void addTitle(java.util.HashMap atrib)
Add a new header and attributes for the given list

Parameters:
atrib - HashMap

getData

public java.util.Collection getData()
Return the data entered into the grid

Returns:
Collection

getAttributes

public java.util.Collection getAttributes()
Get a collection full of hashmaps with the attributes depending on the kind of field

Returns:
Collection

getRow

public java.util.Collection getRow()
Get a row from the datalist

Returns:
Collection

setEmptyCollection

public void setEmptyCollection()

getDataArray

public java.lang.String getDataArray()
Return a string representation of the datalist, ready to be used by the grid

Returns:
String

getTitleArray

public java.lang.String getTitleArray()
Gets a string representing the header array.

Returns:
String

getColumnProperties

public java.lang.String getColumnProperties()
                                     throws java.lang.Exception
Get the column templates to be rendered by the grid

Returns:
String
Throws:
java.lang.Exception

getListField

public java.lang.String getListField(java.util.HashMap map,
                                     int cont,
                                     ResourceManagerIface resource)
                              throws java.lang.Exception
Return a list template

Parameters:
map - HashMap
cont - int
Returns:
String
Throws:
java.lang.Exception

getComboBoxField

public java.lang.String getComboBoxField(java.util.HashMap map,
                                         int cont,
                                         ResourceManagerIface resource)
                                  throws java.lang.Exception
Return a ComboBox template

Parameters:
map - HashMap
cont - int
Returns:
char
Throws:
java.lang.Exception

getDateField

public java.lang.String getDateField(java.util.HashMap map,
                                     int cont,
                                     ResourceManagerIface resource)
                              throws java.lang.Exception
Return a Date template

Parameters:
map - HashMap
cont - int
Returns:
char
Throws:
java.lang.Exception

getCheckboxField

public java.lang.String getCheckboxField(java.util.HashMap map,
                                         int cont,
                                         ResourceManagerIface resource)
                                  throws java.lang.Exception
Return a Checkbox template

Parameters:
map - HashMap
cont - int
Returns:
char
Throws:
java.lang.Exception

getEditableField

public java.lang.String getEditableField(java.util.HashMap map,
                                         int cont,
                                         ResourceManagerIface resource)
                                  throws java.lang.Exception
Return an Editable template

Parameters:
map - HashMap
cont - int
Returns:
char
Throws:
java.lang.Exception

getReadOnlyField

public java.lang.String getReadOnlyField(java.util.HashMap map,
                                         int index,
                                         ResourceManagerIface resource)
                                  throws java.lang.Exception
Return a Read Only template

Parameters:
map - HashMap
index - int
resource - ResourceManagerIface
Returns:
String
Throws:
java.lang.Exception

setContext

public void setContext(org.springframework.web.context.WebApplicationContext context)

setName

public void setName(java.lang.String name)

getPropertyArray

public java.lang.String getPropertyArray()
Returns a String representing an array with the properties of the bean being rendered

Returns:
String

getHeaderArray

public java.lang.String getHeaderArray()
Returns a string representing an array with the headers being rendered

Returns:
String

getTemplates

public java.lang.String getTemplates()
Return all the templates that will be rendered

Returns:
String


Copyright © 2005 Brain-ED Engineering & Development. All Rights Reserved.