Java Doc for CellRepeater.java in  » Library » Apache-beehive-1.0.2-src » org » apache » beehive » netui » tags » databinding » cellrepeater » 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.tags.databinding.cellrepeater 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.apache.beehive.netui.tags.AbstractClassicTag
   org.apache.beehive.netui.tags.databinding.cellrepeater.CellRepeater

CellRepeater
public class CellRepeater extends AbstractClassicTag implements IDataAccessProvider,TryCatchFinally(Code)

This tag is a repeating, databound tag that renders its body each cell of a table of the specified dimensions. The tag is bound to a dataset that is specified in the dataSource attribute. For each item in the data set, the body of this tag is rendered, and NetUI tags in the body that are databound can use the container.item syntax to access the "current" data item in the iteration. Properties on this data item can be accessed using expressions.

The tag will automatically insert the open and close table, row, and cell tags which will comprise the table that is rendered. Style attributes may be set using attributes on this tag in order to cusotmize the tag's final appearance. The dimensions of the table are specified by using at least one of the attributes columns and rows. If only one is specified, the other will be inferred by using the size of the given data set. As a result, the entire dataset will be rendered. For example, if a table should be four columns wide and the data set has twenty items, the resulting table will have five rows. If the data set is fewer items than the number of cells that should be rendered, the cells are padded with HTML table cells:

 <td>&nbsp;</td>
 

This will prevent rendering a malformed HTML table. If the number of cells to render is smaller than the fully specified dimensions of the table, only this number of cells will be rendered. For example, if the data set is size fifty but the rows and the columns attributes are both seven, only the first forty-nine items in the dataset will be rendered and the fiftieth will not be shown. The values of the rows and the columns can be databound with an expression; in this case, each value will be converted into an integer. An error will be reported on the page if this conversion fails.

This tag implements the IDataAccessProvider interface which provides tags access to the "current" data item. Properties on the IDataAccessProvider interface are available through the "container" binding context, which can be used inside of the body of the CellRepeater. Properties of the IDataAccessProvider interface that are available include:
NameDescription
indexthe current index in the iteration; this index is absolute to the dataset
parentany IDataAccessProvider parent of this tag
itemthe current data item

Note: the metadata property of the container binding context is not supported on the CellRepeater.

IDataAccessProvider




Method Summary
public  intdoAfterBody()
     Continue rendering the body of this tag until the dimensions of the table have been reached or the entire dataset has been rendered.
public  voiddoCatch(Throwable t)
    
public  intdoEndTag()
     Complete rendering the tag.
public  voiddoFinally()
    
public  intdoStartTag()
     Prepare to render the dataset that was specified in the dataSource attribute.
public  intgetCurrentIndex()
     Get the index of the current iteration through the body of this tag.
public  ObjectgetCurrentItem()
     Get the item that is currently being rendered by this repeating tag. This can be accessed using the expression expression.item on an attribute of a databindable netUI tag that is contained within the repeating body of this tag.
public  ObjectgetCurrentMetadata()
     Get the metadata for the current item.
public  StringgetDataSource()
     Gets the tag's data source (can be an expression).
protected  ListgetNamingChain()
     Return an ArrayList which represents a chain of INameInterceptor objects.
public  IDataAccessProvidergetProviderParent()
     Get the parent IDataAccessProvider for this tag.
public  StringgetTagName()
     Get the name of this tag.
protected  voidlocalRelease()
     Reset all of the fields of this tag.
public  voidsetAlternatingCellClass(String alternatingCellClass)
     Set the HTML style class that is rendered on each HTML table cell that is opened by this tag.
public  voidsetCellClass(String cellClass)
     Set the HTML style class that is rendered on each HTML table cell that is opened by this tag.
public  voidsetColumns(int columns)
     Set the number of columns that should be rendered in the table generated by the tag.
public  voidsetDataSource(String dataSource)
    

The dataSource attribute determines both (1) the source of populating data for the tag and (2) the object to which the tag submits data.

For example, assume that the Controller file (= JPF file) contains a Form Bean with the property foo.

public  voidsetRowClass(String rowClass)
     Set the HTML style class that is rendered on each HTML table row that is opened by this tag.
public  voidsetRows(int rows)
     Set the number of rows that should be rendered in the table generated by the tag.
public  voidsetTableClass(String tableClass)
     The HTML style class that is rendered on the HTML table.
public  voidsetVerticalRepeat(boolean verticalRepeat)
     This tag can render the items in its dataset horizontally or vertically.



Method Detail
doAfterBody
public int doAfterBody()(Code)
Continue rendering the body of this tag until the dimensions of the table have been reached or the entire dataset has been rendered. The buffered body content from the previous iteration of the body is added to the content this tag will render, @see addContent(java.lang.String). Pad the table if the dimensions have not been met but the dataset is empty. EVAL_BODY_BUFFERED if there is more data to render in the dataset orSKIP_BODY if the end of the dataset is reached or an error occurs



doCatch
public void doCatch(Throwable t) throws Throwable(Code)



doEndTag
public int doEndTag() throws JspException(Code)
Complete rendering the tag. If no errors have occurred, the content that the tag buffered is rendered. EVAL_PAGE to continue evaluating the page
throws:
  JspException - if an error occurs that can not be reported on the page



doFinally
public void doFinally()(Code)



doStartTag
public int doStartTag() throws JspException(Code)
Prepare to render the dataset that was specified in the dataSource attribute. The dataSource expression is evaluated and the table's dimensions are computed. If there is no data in the dataset but the rows and columns attributes were specified, an empty table of the given dimensions is rendered. EVAL_BODY_BUFFERED or SKIP_BODY if errors are reported, the data setis null, or there is no data in the data set
throws:
  JspException - if errors occurred that could not be reported in the page



getCurrentIndex
public int getCurrentIndex()(Code)
Get the index of the current iteration through the body of this tag. This data can be accessed using the expression container.index on an attribute of a databindable NetUI tag that is contained within the repeating body of this tag. This expression is only valid when the dataset is being rendered. the integer index of the current data item in the data set
See Also:   org.apache.beehive.netui.script.common.IDataAccessProvider



getCurrentItem
public Object getCurrentItem()(Code)
Get the item that is currently being rendered by this repeating tag. This can be accessed using the expression expression.item on an attribute of a databindable netUI tag that is contained within the repeating body of this tag. The expression is only valid when the dataset is being rendered. the current item in the data set
See Also:   org.apache.beehive.netui.script.common.IDataAccessProvider



getCurrentMetadata
public Object getCurrentMetadata()(Code)
Get the metadata for the current item. This method is not supported by this tag.
throws:
  UnsupportedOperationException - this tag does not support this method from the IDataAccessProvider interface
See Also:   org.apache.beehive.netui.script.common.IDataAccessProvider



getDataSource
public String getDataSource()(Code)
Gets the tag's data source (can be an expression). the data source



getNamingChain
protected List getNamingChain()(Code)
Return an ArrayList which represents a chain of INameInterceptor objects. This method by default returns null and should be overridden by objects that support naming. an ArrayList that will contain INameInterceptor objects.



getProviderParent
public IDataAccessProvider getProviderParent()(Code)
Get the parent IDataAccessProvider for this tag. If this tag is contained within a IDataAccessProvider, the containing IDataAccessProvider is available through the expression container.container. Any valid properties of the parent IDataAccessProvider can be accessed through this expression. This method will return null if there is no parent IDataAccessProvider a containing IDataAccessProvider if one exists, null otherwise.
See Also:   org.apache.beehive.netui.script.common.IDataAccessProvider



getTagName
public String getTagName()(Code)
Get the name of this tag. This is used to identify the type of this tag for reporting tag errors. a constant String representing the name of this tag.



localRelease
protected void localRelease()(Code)
Reset all of the fields of this tag.



setAlternatingCellClass
public void setAlternatingCellClass(String alternatingCellClass)(Code)
Set the HTML style class that is rendered on each HTML table cell that is opened by this tag. The starting cell is alternated for each row, which results in a checkerboard colored table being displayed. For example, if the alteranting cell class is \"alternatingCellClass\", every other table cell tag is:
 <td cell="alternatingCellClass">
 

Parameters:
  alternatingCellClass - the name of a style class in a CSS



setCellClass
public void setCellClass(String cellClass)(Code)
Set the HTML style class that is rendered on each HTML table cell that is opened by this tag. For example, if the cell class is "cellClass", each opening table cell tag is:
 <td class="cellClass">
 

Parameters:
  cellClass - the name of a style class in a CSS



setColumns
public void setColumns(int columns)(Code)
Set the number of columns that should be rendered in the table generated by the tag. If the columns attribute is specified but the rows attribute is not, the rows attribute will be inferred using the size of the dataset.
Parameters:
  columns - an integer or an expression



setDataSource
public void setDataSource(String dataSource)(Code)

The dataSource attribute determines both (1) the source of populating data for the tag and (2) the object to which the tag submits data.

For example, assume that the Controller file (= JPF file) contains a Form Bean with the property foo. Then the following <netui:textBox> tag will (1) draw populating data from the Form Bean's foo property and (2) submit user defined data to the same property.

    <netui:textBox dataSource="actionForm.foo" />

When the tag is used to submit data, the data binding expression must refer to a Form Bean property. In cases where the tag is not used to submit data, but is used for displaying data only, the data binding expression need not refer to a Form Bean property. For example, assume that myIterativeData is a member variable on the Controller file ( = JPF file). The following <netui-data:repeater> tag draws its data from myIterativeData.
Parameters:
  dataSource - the data source




setRowClass
public void setRowClass(String rowClass)(Code)
Set the HTML style class that is rendered on each HTML table row that is opened by this tag. For example, if the row class is "rowClass", each opening table row tag is:
 <tr class="rowClass">
 

Parameters:
  rowClass - the name of a style class in the CSS



setRows
public void setRows(int rows)(Code)
Set the number of rows that should be rendered in the table generated by the tag. If the rows attribute is specified but the columns attribute is not, the columns attribute will be inferred using the size of the dataset.
Parameters:
  rows - an integer or an expression whose value can beconverted into an integer.



setTableClass
public void setTableClass(String tableClass)(Code)
The HTML style class that is rendered on the HTML table. For example, if the row class is "tableClass", each opening table tag is:
 <table class="tableClass">
 

Parameters:
  tableClass - the name of a style class in a CSS



setVerticalRepeat
public void setVerticalRepeat(boolean verticalRepeat)(Code)
This tag can render the items in its dataset horizontally or vertically. If the rows are rendered horizontally, the items in the dataset are rendered across each row from top to bottom. Otherwise, they are rendered down each column from left to right. The default is to render the items horizontally.
Parameters:
  verticalRepeat - if set to true, the dataset is rendered downeach column; otherwise it is rendered across each row, the default.



Fields inherited from org.apache.beehive.netui.tags.AbstractClassicTag
final public static List DefaultNamingChain(Code)(Java Doc)
final protected static String EMPTY_STRING(Code)(Java Doc)
final public static String NETUI_UNIQUE_CNT(Code)(Java Doc)

Methods inherited from org.apache.beehive.netui.tags.AbstractClassicTag
protected String applyNamingChain(String name) throws JspException(Code)(Java Doc)
protected String getErrorsReport()(Code)(Java Doc)
final protected String getIdForTagId(String tagId)(Code)(Java Doc)
protected List getNamingChain()(Code)(Java Doc)
protected Form getNearestForm()(Code)(Java Doc)
protected int getNextId(ServletRequest req)(Code)(Java Doc)
protected IScriptReporter getScriptReporter()(Code)(Java Doc)
abstract public String getTagName()(Code)(Java Doc)
protected Locale getUserLocale()(Code)(Java Doc)
protected boolean hasErrors()(Code)(Java Doc)
protected void localRelease()(Code)(Java Doc)
protected String qualifyAttribute(String name) throws JspException(Code)(Java Doc)
public void registerTagError(String message, Throwable e) throws JspException(Code)(Java Doc)
public void registerTagError(AbstractPageError error) throws JspException(Code)(Java Doc)
protected int reportAndExit(int returnValue) throws JspException(Code)(Java Doc)
protected void reportErrors() throws JspException(Code)(Java Doc)
final protected String rewriteName(String name)(Code)(Java Doc)
final protected String setNonEmptyValueAttribute(String attrValue)(Code)(Java Doc)
final protected String setRequiredValueAttribute(String attrValue, String attrName) throws JspException(Code)(Java Doc)
final protected void write(String string)(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.