Java Doc for DataModel.java in  » J2EE » myfaces-core-1.2.0 » javax » faces » model » 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 » J2EE » myfaces core 1.2.0 » javax.faces.model 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   javax.faces.model.DataModel

All known Subclasses:   javax.faces.model.ResultDataModel,  javax.faces.model.ResultSetDataModel,  javax.faces.model.ArrayDataModel,  javax.faces.model.ListDataModel,  javax.faces.model.ScalarDataModel,
DataModel
abstract public class DataModel (Code)
Represents the data presented by a UIData component, together with some state information about the currently selected row within the datalist for use by listeners on UIData components. This class allows managed bean code to avoid binding directly to UIData components for typical uses.

Note that DataModel and its standard subclasses are not serializable, as there is no state in a DataModel object itself that needs to be preserved between render and restore-view. UIData components therefore do not store their DataModel when serialized; they just evaluate their "value" EL expression to refetch the object during the apply-request-values phase.

Because DataModel is not serializable, any managed bean that needs to be serialized and which has a member of type DataModel should therefore mark that member transient. If there is a need to preserve the datalist contained within the DataModel then ensure a reference to that list is stored in a non-transient member, or use a custom serialization method that explicitly serializes dataModel.getWrappedData. See Javadoc of JSF Specification for more.
author:
   Thomas Spiegl (latest modification by $Author: mbr $)
version:
   $Revision: 512227 $ $Date: 2007-02-27 13:25:16 +0100 (Di, 27 Feb 2007) $





Method Summary
public  voidaddDataModelListener(DataModelListener listener)
    
public  DataModelListener[]getDataModelListeners()
    
abstract public  intgetRowCount()
     Return the number of rows of data available.
abstract public  ObjectgetRowData()
     Return the object associated with the current row index.
abstract public  intgetRowIndex()
     Get the current row index.
abstract public  ObjectgetWrappedData()
     Get the entire collection of data associated with this component.
abstract public  booleanisRowAvailable()
     Returns true if a call to getRowData will return a valid object.
public  voidremoveDataModelListener(DataModelListener listener)
    
abstract public  voidsetRowIndex(int rowIndex)
     Set the current row index.
abstract public  voidsetWrappedData(Object data)
     Set the entire list of data associated with this component.



Method Detail
addDataModelListener
public void addDataModelListener(DataModelListener listener)(Code)



getDataModelListeners
public DataModelListener[] getDataModelListeners()(Code)



getRowCount
abstract public int getRowCount()(Code)
Return the number of rows of data available.

If the number of rows of data available is not known then -1 is returned. This may happen for DataModels that wrap sources of data such as java.sql.ResultSet that provide an iterator to access the "next item" rather than a fixed-size collection of data.




getRowData
abstract public Object getRowData()(Code)
Return the object associated with the current row index.

Method isRowAvailable may be called before attempting to access this method, to ensure that the data is available.
throws:
  RuntimeException - subclass of some kind if the current row indexis not within the range of the current wrappedData property.




getRowIndex
abstract public int getRowIndex()(Code)
Get the current row index.



getWrappedData
abstract public Object getWrappedData()(Code)
Get the entire collection of data associated with this component. Note that the actual type of the returned object depends upon the concrete subclass of DataModel; the object will represent an "ordered sequence of components", but may be implemented as an array, java.util.List, java.sql.ResultSet or other similar types.



isRowAvailable
abstract public boolean isRowAvailable()(Code)
Returns true if a call to getRowData will return a valid object.



removeDataModelListener
public void removeDataModelListener(DataModelListener listener)(Code)



setRowIndex
abstract public void setRowIndex(int rowIndex)(Code)
Set the current row index. This affects the behaviour of the getRowData method in particular. Parameter rowIndex may be -1 to indicate "no row", or may be a value between 0 and getRowCount()-1.



setWrappedData
abstract public void setWrappedData(Object data)(Code)
Set the entire list of data associated with this component. Note that the actual type of the provided object must match the expectations of the concrete subclass of DataModel. See getWrappedData.



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.