Name

ResultDataModel

Synopsis

This class wraps a javax.servlet.jsp.jstl.sql.Result to expose it as a DataModel for a UIData component.

Class name:

javax.faces.model.ResultDataModel

Extends:

javax.faces.model.DataModel

Implements:

None

Constructors

public ResultDataModel()

Creates a new, empty instance.

public ResultDataModel(javax.servlet.jsp.jstl.sql.Result result)

Creates a new instance wrapping a Result instance.

Methods

public int getRowCount()

Returns the size of the array returned by the Result getRows() method or -1 if the result isn’t set.

public Object getRowData()

Returns the element for the current row index in the array returned by the Result getRows() method, or null if the result isn’t set or there’s no such element.

public int getRowIndex()

Returns the zero-based index for the current row or -1 if no row is selected.

public Object getWrappedData()

Returns the Result instance or null if the result isn’t set.

public boolean isRowAvailable()

Returns true if the list is set and the current row index is between 0 and the last index of the array returned by the Result getRows() method.

public void setRowIndex(int index)

Sets the zero-based index for the current row or to -1 if no row is selected.

public void setWrappedData(Object data)

Sets the Result instance.

Get JavaServer Faces now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.