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


java.lang.Object
   javax.servlet.jsp.tagext.TagSupport
      javax.servlet.jsp.tagext.BodyTagSupport
         org.apache.beehive.netui.tags.AbstractClassicTag
            org.apache.beehive.netui.tags.databinding.repeater.Repeater

Repeater
public class Repeater extends AbstractClassicTag implements IDataAccessProvider,TryCatchFinally(Code)
The <netui-data:repeater> tag is a markup-generic tag that repeats over a data set. The repeater tag set is used to render data from a data set into a page. The repeater itself does not render any markup. Instead, the markup from its contained tags is rendered to create the content generated by this tag. The tags in the repeater tag set are as follows:
TagDescription
RepeaterHeader Renders once in the Repeater.HEADER state.
RepeaterItem Renders once in the Repeater.ITEM state.
RepeaterFooter Renders once in the Repeater.FOOTER state.
org.apache.beehive.netui.tags.databinding.repeater.pad.Pad Used to convert irregular data sets into regular data sets through padding or truncating the output.

The repeater can render in two modes; the first mode is a simple mode where the body of the repeater is rendered once for each item in the data set. In this case, none of the other tags above are present in the repeater body. For example, the following will render an unordered HTML list of items that are list items which contain the lastName, firstName of the current "customer" in the data set.

 <ul>
 <netui-data:repeater dataSource="pageInput.customers">
 <li><netui:span value="${container.item.lastName}, ${container.item.firstName}"/></li>
 </netui-data:repeater>
 </ul>
 

The second mode is a more structured mode of rendering where the tags above are used to delineate iteration boundaries on the body of a <netui-data:repeater> tag. In this case, if one of the above tags is present, any content directly in the body of the repeater is not rendered; rather, the content inside the structured tags of the repeater is rendered.

For example, the following will render the same output as the example shown above, but it uses the structured tags for rendering the pageFlow.customers expression:

 <netui-data:repeater dataSource="pageInput.customers">
 <netui-data:repeaterHeader>
 <ul>
 </netui-data:repeaterHeader>
 <netui-data:repeaterItem>
 <li><netui:span value="${container.item.lastName}, ${container.item.firstName}"/></li>
 </netui-data:repeaterItem>
 <netui-data:repeaterFooter>
 </ul>
 </netui-data:repeaterFooter>
 </netui-data:repeater>
 
RepeaterHeaderRepeaterItemRepeaterFooterorg.apache.beehive.netui.tags.databinding.repeater.pad.Pad


Field Summary
final public static  intEND
     A Repeater rendering state that signals the end of repeater rendering.
final public static  intFOOTER
     A Repeater rendering state that signals the rendering of the FOOTER.
final public static  intHEADER
     A Repeater rendering state that signals the rendering of the HEADER.
final public static  intINIT
     A Repeater rendering state that signals the beginning of repeater rendering.
final public static  intITEM
     A Repeater rendering state that signals the rendering of the ITEM.


Method Summary
public  voidaddContent(String content)
     Add content to the content that is being buffered by this tag.
public  intdoAfterBody()
    

Continue rendering the repeater changing the render state or advancing to a new data item as needed.

public  voiddoCatch(Throwable t)
    
public  intdoEndTag()
     Complete rendering the repeater.
public  voiddoFinally()
    
public  intdoStartTag()
     Start rendering the repeater.
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  intgetRenderState()
     Get the current render state for the repeater.
public  StringgetTagName()
     Get the name of this tag.
protected  voidlocalRelease()
     Reset all of the fields of this tag.
public  voidregisterChildTag(RepeaterComponent repeaterComponent)
     Method used by tags in the repeater tag set to register the presence of a contained tag.
public  voidsetDataSource(String dataSource)
     Sets the tag's data source (can be an expression).
public  voidsetDefaultText(Object defaultText)
     Set the text that will be rendered if the dataSource expression references a null object and the defaultText attribute is non-null.
public  voidsetIgnoreNulls(boolean ignoreNulls)
     Set a boolean that describes whether the repeater should ignore null items encountered while iterating over a data set.
public  voidsetPadContext(PadContext padContext)
    

Field Detail
END
final public static int END(Code)
A Repeater rendering state that signals the end of repeater rendering.



FOOTER
final public static int FOOTER(Code)
A Repeater rendering state that signals the rendering of the FOOTER. The body renders in the FOOTER state once.



HEADER
final public static int HEADER(Code)
A Repeater rendering state that signals the rendering of the HEADER. The body renders in the HEADER state once.



INIT
final public static int INIT(Code)
A Repeater rendering state that signals the beginning of repeater rendering.



ITEM
final public static int ITEM(Code)
A Repeater rendering state that signals the rendering of the ITEM. The body renders in the ITEM state once for each item in the data set.





Method Detail
addContent
public void addContent(String content)(Code)
Add content to the content that is being buffered by this tag. All content written by the body of this tag is added to this buffer. The buffer is rendered at the end of the tag's lifecycle if no fatal errors have occurred during this tag's lifecycle.
Parameters:
  content - content that this tag should render.



doAfterBody
public int doAfterBody()(Code)

Continue rendering the repeater changing the render state or advancing to a new data item as needed.

Repeater.SKIP_BODY if an error occurs or the data set has been rendered; Repeater.EVAL_BODY_AGAIN otherwise



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



doEndTag
public int doEndTag() throws JspException(Code)
Complete rendering the repeater. Repeater.EVAL_PAGE
throws:
  JspException - if an error occurs that can not be reported in the page



doFinally
public void doFinally()(Code)



doStartTag
public int doStartTag() throws JspException(Code)
Start rendering the repeater. Repeater.SKIP_BODY if an error occurs; Repeater.EVAL_BODY_BUFFERED otherwise
throws:
  JspException - if an error occurs that can 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



getRenderState
public int getRenderState()(Code)
Get the current render state for the repeater. This tag is used by child tags to access the current location in the repeater's rendering lifecycle. an integer that represents the current state of the grid; this is oneof Repeater.INIT, Repeater.HEADER, Repeater.ITEM,Repeater.FOOTER, or Repeater.END.



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.



registerChildTag
public void registerChildTag(RepeaterComponent repeaterComponent)(Code)
Method used by tags in the repeater tag set to register the presence of a contained tag. When registered, the repeater will change the way in which it renders to either use structured or non-structured rendering.
Parameters:
  repeaterComponent - RepeaterComponent to register with the Repeater parent



setDataSource
public void setDataSource(String dataSource)(Code)
Sets the tag's data source (can be an expression).
Parameters:
  dataSource - - the data source



setDefaultText
public void setDefaultText(Object defaultText)(Code)
Set the text that will be rendered if the dataSource expression references a null object and the defaultText attribute is non-null.
Parameters:
  defaultText - the default text



setIgnoreNulls
public void setIgnoreNulls(boolean ignoreNulls)(Code)
Set a boolean that describes whether the repeater should ignore null items encountered while iterating over a data set.
Parameters:
  ignoreNulls - whether or not to ignore nulls



setPadContext
public void setPadContext(PadContext padContext)(Code)

Parameters:
  padContext -



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)

Fields inherited from javax.servlet.jsp.tagext.BodyTagSupport
protected BodyContent bodyContent(Code)(Java Doc)

Methods inherited from javax.servlet.jsp.tagext.BodyTagSupport
public int doAfterBody() throws JspException(Code)(Java Doc)
public int doEndTag() throws JspException(Code)(Java Doc)
public void doInitBody() throws JspException(Code)(Java Doc)
public int doStartTag() throws JspException(Code)(Java Doc)
public BodyContent getBodyContent()(Code)(Java Doc)
public JspWriter getPreviousOut()(Code)(Java Doc)
public void release()(Code)(Java Doc)
public void setBodyContent(BodyContent b)(Code)(Java Doc)

Fields inherited from javax.servlet.jsp.tagext.TagSupport
protected String id(Code)(Java Doc)
protected PageContext pageContext(Code)(Java Doc)

Methods inherited from javax.servlet.jsp.tagext.TagSupport
public int doAfterBody() throws JspException(Code)(Java Doc)
public int doEndTag() throws JspException(Code)(Java Doc)
public int doStartTag() throws JspException(Code)(Java Doc)
final public static Tag findAncestorWithClass(Tag from, Class klass)(Code)(Java Doc)
public String getId()(Code)(Java Doc)
public Tag getParent()(Code)(Java Doc)
public Object getValue(String k)(Code)(Java Doc)
public Enumeration getValues()(Code)(Java Doc)
public void release()(Code)(Java Doc)
public void removeValue(String k)(Code)(Java Doc)
public void setId(String id)(Code)(Java Doc)
public void setPageContext(PageContext pageContext)(Code)(Java Doc)
public void setParent(Tag t)(Code)(Java Doc)
public void setValue(String k, Object o)(Code)(Java Doc)

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.