Java Doc for DataGridTagModel.java in  » Library » Apache-beehive-1.0.2-src » org » apache » beehive » netui » databinding » datagrid » api » rendering » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Library » Apache beehive 1.0.2 src » org.apache.beehive.netui.databinding.datagrid.api.rendering 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.beehive.netui.databinding.datagrid.api.rendering.DataGridTagModel

DataGridTagModel
public class DataGridTagModel (Code)

The DataGridTagModel is a JavaBean that is exposed by the NetUI data grid tag into the javax.servlet.jsp.PageContext in a JSP. This bean exposes state and services which can be data bound by an expression language in a JSP.



Field Summary
final public static  intRENDER_STATE_CAPTION
     The render state used when the data grid is rendering the caption tag.
final public static  intRENDER_STATE_END
     The render state used when the data grid has completed rendering.
final public static  intRENDER_STATE_FOOTER
     The render state used when the data grid is rendering the footer.
final public static  intRENDER_STATE_GRID
     The render state used when the data grid is rendering the data rows.
final public static  intRENDER_STATE_HEADER
     The render state used when the data grid is rendering the header tag.
final public static  intRENDER_STATE_START
     The render state used when the data grid performs its first pass through its tag body.

Constructor Summary
public  DataGridTagModel(String name, DataGridConfig dataGridConfig, JspContext jspContext)
     Constructor used to build a DataGridTagModel.

Method Summary
public  voidaddResourceOverride(String key, String value)
    

This method provides support for overriding the messages available in the DataGridResourceProvider on a per-message basis.

public  voidchangeRenderState(int renderState)
    

Method that alters the data grid's current render to the new renderState.

public  StringformatMessage(String key, Object[] args)
     Format a message given a resource string name key and a set of formatting arguments args.
public  intgetCurrentIndex()
     Accessor for obtaining the current index in the data set.
public  ObjectgetCurrentItem()
     Accessor for obtaining the current item in the data set.
public  PagedDataSetgetDataSet()
     Accessor for the PagedDataSet that is used to render a data set in the grid.
public  StringgetDataSource()
     Accessor for obtaining the data source expression that was used to data bind to the data set.
public  StringgetDefaultSortImagePath()
     Get the default image path used when constructing links to sort images.
public  JspContextgetJspContext()
     Accessor for the JspContext for the JSP in which the grid started to render.
public  StringgetMessage(String key)
     Get a message given a resource string name key.
public  StringgetName()
     Accessor for the name of the data grid.
public  PagerRenderergetPagerRenderer()
     Accessor for the PagerRenderer .
public  intgetRenderState()
    

Accessor for the current render state.

public  StringgetResourcePath()
    

Get the resourrce path used when creating HTML image links during data grid rendering.

public  DataGridResourceProvidergetResourceProvider()
     Get the DataGridResourceProvider used to provide string messages, paths, etc during data grid rendering.
public  StringgetSortImagePath(SortDirection sortDirection)
    

Get the image paths used for the given SortDirection .

public  DataGridStategetState()
     Accessor for obtaining the DataGridState object.
public  StyleModelgetStyleModel()
     Get the StyleModel used to create style classes during data grid rendering.
public  TableRenderergetTableRenderer()
     Get the instance of TableRenderer that is used to render HTML table markup for a data grid.
public  DataGridURLBuildergetUrlBuilder()
     Accessor for obtaining the DataGridURLBuilder object.
public  booleanhasNextDataItem()
     Accessor for determining if there is another item in the data set.
public  booleanisDisableDefaultPagerRendering()
     Check to see if the data grid will render its pager UI by default.
public  booleanisRenderRowGroups()
    

Get the flag for whether to render the data grid using HTML row groups.

public  ObjectnextDataItem()
     Accessor for getting the next item in the data set. the next item in the data set.
public  voidrenderPager(AbstractRenderAppender appender)
     Method used to render the data grid's pager UI into the given AbstractRenderAppender .
public  voidsetDataSet(PagedDataSet dataSet)
     Setter for the PagedDataSet object.
public  voidsetDisableDefaultPagerRendering(boolean disableDefaultPagerRendering)
     Set a boolean to enable or disable rendering the pager UI by default.
public  voidsetPagerRenderer(PagerRenderer pagerRenderer)
     Set the PagerRenderer used to render the paging UI for the data grid.
public  voidsetRenderRowGroups(boolean renderRowGroups)
     Set whether to render the data grid using HTML row groups.
public  voidsetResourceProvider(DataGridResourceProvider resourceProvider)
     Set the DataGridResourceProvider used to render the data grid.
public  voidsetStyleModel(StyleModel styleModel)
     Set the StyleModel used to create style classes during data grid rendering.
public  voidsetTableRenderer(TableRenderer tableRenderer)
     Set the TableRenderer used to render HTML table markup for a data grid.

Field Detail
RENDER_STATE_CAPTION
final public static int RENDER_STATE_CAPTION(Code)
The render state used when the data grid is rendering the caption tag.



RENDER_STATE_END
final public static int RENDER_STATE_END(Code)
The render state used when the data grid has completed rendering.



RENDER_STATE_FOOTER
final public static int RENDER_STATE_FOOTER(Code)
The render state used when the data grid is rendering the footer.



RENDER_STATE_GRID
final public static int RENDER_STATE_GRID(Code)
The render state used when the data grid is rendering the data rows.



RENDER_STATE_HEADER
final public static int RENDER_STATE_HEADER(Code)
The render state used when the data grid is rendering the header tag.



RENDER_STATE_START
final public static int RENDER_STATE_START(Code)
The render state used when the data grid performs its first pass through its tag body.




Constructor Detail
DataGridTagModel
public DataGridTagModel(String name, DataGridConfig dataGridConfig, JspContext jspContext)(Code)
Constructor used to build a DataGridTagModel.
Parameters:
  name - the name of the data grid
Parameters:
  dataGridConfig - the DataGridConfig object for a data grid
Parameters:
  jspContext - the JspContext for the JSP in which the data grid's rendering started




Method Detail
addResourceOverride
public void addResourceOverride(String key, String value)(Code)

This method provides support for overriding the messages available in the DataGridResourceProvider on a per-message basis. The key and value parameters here will override (or add) a message available via the DataGridResourceProvider without requiring an entire Java properties file or custom DataGridResourceProvider implementation.


Parameters:
  key - the key of the message to override
Parameters:
  value - the new value for the message key



changeRenderState
public void changeRenderState(int renderState)(Code)

Method that alters the data grid's current render to the new renderState. If the provided render state value is unknown, an IllegalStateException is thrown. The data grid cycles through its state in this order:


Parameters:
  renderState - the DataGridTagModel's new render state
throws:
  IllegalStateException - if an invalid state is provided



formatMessage
public String formatMessage(String key, Object[] args)(Code)
Format a message given a resource string name key and a set of formatting arguments args.
Parameters:
  key - the message key
Parameters:
  args - the arguments used when formatting the message the formatted message



getCurrentIndex
public int getCurrentIndex()(Code)
Accessor for obtaining the current index in the data set. This value is a zero based count current item being rendered. For the array {"foo", "bar", "baz"}, the indices for each item would be 0, 1, and 2. This value does correspond to the index into an Object array or a list, but in an arbitrary Collection, the index is simply the number of items that appeared in the Collection before the current one. the current index



getCurrentItem
public Object getCurrentItem()(Code)
Accessor for obtaining the current item in the data set. the current item in the data set



getDataSet
public PagedDataSet getDataSet()(Code)
Accessor for the PagedDataSet that is used to render a data set in the grid. a PagedDataSet for the current data set



getDataSource
public String getDataSource()(Code)
Accessor for obtaining the data source expression that was used to data bind to the data set. the String for the data source



getDefaultSortImagePath
public String getDefaultSortImagePath()(Code)
Get the default image path used when constructing links to sort images. This value is taken from the resource String available via the DataGridResourceProvider obtained using DataGridTagModel.getResourceProvider() using the IDataGridMessageKeys.SORT_NONE_IMAGE_PATH key. the String path



getJspContext
public JspContext getJspContext()(Code)
Accessor for the JspContext for the JSP in which the grid started to render. the JspContext



getMessage
public String getMessage(String key)(Code)
Get a message given a resource string name key.
Parameters:
  key - the message key the value of the message



getName
public String getName()(Code)
Accessor for the name of the data grid. the name of the data grid



getPagerRenderer
public PagerRenderer getPagerRenderer()(Code)
Accessor for the PagerRenderer . This is the PagerRenderer instance that will be used to render the UI used to display the pager. the PagerRenderer for the data grid



getRenderState
public int getRenderState()(Code)

Accessor for the current render state. This should be used by clients that need to affect their behavior based on the data grid's current render state. This value will be one of:

the current render state



getResourcePath
public String getResourcePath()(Code)

Get the resourrce path used when creating HTML image links during data grid rendering. The value of the default resource path is the javax.servlet.http.HttpServletRequest.getContextPath combined with the value of the data grid message stringn obtained with the key IDataGridMessageKeys.DATAGRID_RESOURCE_PATH .

the string resource path



getResourceProvider
public DataGridResourceProvider getResourceProvider()(Code)
Get the DataGridResourceProvider used to provide string messages, paths, etc during data grid rendering. the DataGridResourceProvider



getSortImagePath
public String getSortImagePath(SortDirection sortDirection)(Code)

Get the image paths used for the given SortDirection . The image paths are discovered by using the following mapping.
Sort directionMessage key
SortDirection.ASCENDING IDataGridMessageKeys.SORT_ASC_IMAGE_PATH
SortDirection.DESCENDING IDataGridMessageKeys.SORT_DESC_IMAGE_PATH
SortDirection.NONE IDataGridMessageKeys.SORT_NONE_IMAGE_PATH
The value for the message is obtained by looking up a value in the DataGridResourceProvider obtained via DataGridTagModel.getResourceProvider() using the message key in the table above.


Parameters:
  sortDirection - the SortDirection used to lookup an image path the string image used to represent a sort direction graphically



getState
public DataGridState getState()(Code)
Accessor for obtaining the DataGridState object. This is a JavaBean property that can be accessed via an expression language in order to obtain access to the state information for the data grid stored in the returned object. the data grid's DataGridState



getStyleModel
public StyleModel getStyleModel()(Code)
Get the StyleModel used to create style classes during data grid rendering. the StyleModel



getTableRenderer
public TableRenderer getTableRenderer()(Code)
Get the instance of TableRenderer that is used to render HTML table markup for a data grid. the TableRenderer



getUrlBuilder
public DataGridURLBuilder getUrlBuilder()(Code)
Accessor for obtaining the DataGridURLBuilder object. This is a JavaBean that can be accessed via an expression language in order to obtain access to the URL information for the data grid stored in the returned object. the data grid's DataGridURLBuilder



hasNextDataItem
public boolean hasNextDataItem()(Code)
Accessor for determining if there is another item in the data set. true if there is a next item; false otherwise.



isDisableDefaultPagerRendering
public boolean isDisableDefaultPagerRendering()(Code)
Check to see if the data grid will render its pager UI by default. The location for the default UI is controlled by the JSP tag doing the rendering. true if default rendering is enabled; false otherwise.



isRenderRowGroups
public boolean isRenderRowGroups()(Code)

Get the flag for whether to render the data grid using HTML row groups. Row groups include the HTML thead, tbody, and tfoot tags. If row group rendering is enabled, the HTML produced by the data grid will be contained inside of these tags and rendered in the correct order in the produced HTML. More detail on row groups can be found here.

true if row groups will be rendered; false otherwise



nextDataItem
public Object nextDataItem()(Code)
Accessor for getting the next item in the data set. the next item in the data set. Note, depending on the data set, this item couldbe null.



renderPager
public void renderPager(AbstractRenderAppender appender)(Code)
Method used to render the data grid's pager UI into the given AbstractRenderAppender .
Parameters:
  appender - the AbstractRenderAppender into which the pager will be rendered



setDataSet
public void setDataSet(PagedDataSet dataSet)(Code)
Setter for the PagedDataSet object. In order to canonicalize the type used by the data grid to manipulate the data set, the PagedDataSet is used to navigate the data set.
Parameters:
  dataSet - the data set



setDisableDefaultPagerRendering
public void setDisableDefaultPagerRendering(boolean disableDefaultPagerRendering)(Code)
Set a boolean to enable or disable rendering the pager UI by default. If true, the data grid rendering tags will produce the pager markup in some default location. If false the default pager rendering will be disabled. The default location is determined by the tags doing the rendering.
Parameters:
  disableDefaultPagerRendering - boolean for enabling or disabling rendering the pager in the default location



setPagerRenderer
public void setPagerRenderer(PagerRenderer pagerRenderer)(Code)
Set the PagerRenderer used to render the paging UI for the data grid.
Parameters:
  pagerRenderer - the PagerRenderer to use



setRenderRowGroups
public void setRenderRowGroups(boolean renderRowGroups)(Code)
Set whether to render the data grid using HTML row groups. For more detail, see DataGridTagModel.isRenderRowGroups() .
Parameters:
  renderRowGroups - true if rendering row groups; false otherwise



setResourceProvider
public void setResourceProvider(DataGridResourceProvider resourceProvider)(Code)
Set the DataGridResourceProvider used to render the data grid.
Parameters:
  resourceProvider - the new resource provider



setStyleModel
public void setStyleModel(StyleModel styleModel)(Code)
Set the StyleModel used to create style classes during data grid rendering.
Parameters:
  styleModel - the StyleModel



setTableRenderer
public void setTableRenderer(TableRenderer tableRenderer)(Code)
Set the TableRenderer used to render HTML table markup for a data grid.
Parameters:
  tableRenderer - the TableRenderer to use for rendering



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.