FORMfields


FORMfields.fields.SearchResultsField

Class SearchResultsField

FormField
|
+--SearchResultsField

public class SearchResultsField
extends FormField

SearchResultsField is a field that automatically pagifies the display of large amounts of database data. Note: this field is not a typcial FormField in that it is often the the only field in its form.

Since:
FORMfields v2.0

Field Summary
mixed

$checkboxInsertHeading

The heading of the checkbox column if the checkbox column is being displayed.

mixed

$checkboxes

The sub fields for the checkboxes.

mixed

$first

The sub field for the first button.

mixed

$goToPage

The sub field for entering the go to page.

mixed

$goToPageSubmit

The sub field for the go to page submit button.

mixed

$header

The sub field for the header or title.

mixed

$hideBorder

True if the sectionTitleHeader should be hidden.

mixed

$hideBottomNavigation

True if the bottom navigation bar: page index, results and go to page, should be hidden.

mixed

$hideGoToPage

True if the go to page section should be hidden.

mixed

$hideResultDetails

True if the result details section should be hidden.

mixed

$hideRowsPerPage

True if the rows per page section should be hidden.

mixed

$hideTopNavigation

True if the top navigation bar: page index, results and rows to page, should be hidden.

mixed

$last

The sub field for the last button.

mixed

$next

The sub field for the next button.

mixed

$noRecordsString

The error string that is display no records where found in the database.

mixed

$order

The sub field that stores whether the data is sorted in ascending or descending order.

mixed

$prev

The sub field for the previous button.

mixed

$rowsPerPage

The number of rows per page.

mixed

$rowsPerPageField

A sub field for selecting the rows per page to display.

mixed

$rowsReturned

The number of rows that were returned from the database.

mixed

$sort

The sub field that stores the name of the data to sort by.

mixed

$sql

The SQL query used to retrieve the data from the database.

mixed

$subFieldsCannotBeEmpty

True if an empty sub field constitutes an invalid value.

mixed

$tableSet

The TableSet that holds the database data for this SearchResultsField.

Fields inherited from FORMfields.fields.FormField
autoPropagate, data, disableEnterHandler, displayValuesOnNewLine, editable, enabled, endingString, enterTabHandler, enterTabs, error, extraHtml, fieldBelowLabel, formError, help, hidden, htmlify, id, isData, label, labelForId, multiValues, name, required, subFieldDisplayValueSeparator, subFieldSeparator, subFieldValueSeparator, subFields, subFieldsCannotBeEmpty, trimWhitespace, validators, value, valueIsHtml
Constructor Summary

SearchResultsField(string name, string label, string sql, int rowsPerPage)

Creates a new SearchResultsField.

__construct(string name, string label, string sql, int rowsPerPage)

Creates a new SearchResultsField.

Method Summary
void

addCheckboxColumn(array idHeading, string checkboxInsertHeading)

Adds a checkbox column to the results.

array

getCheckboxValues()

Returns a string array of the ids selected.

string

getEditableFieldTag()

Returns the HTML used to display the input portion of this field.

void

getPageNavigationHtml()

Returns the HTML to display the bottom navigation bar: page index, results and go to page, should be hidden.

void

getParameter()

Retrieves the posted field value.

Methods inherited from FORMfields.fields.FormField
addFieldValidator, addSubField, checkForBlank, clearValue, disable, formatRequestParameter, formatText, getButtonClicked, getData, getDbValue, getDisableFieldJs, getDisableJs, getDisableLabelJs, getDisplayFieldTag, getDisplayHtmlValue, getDisplayLabelTag, getDisplayValue, getEditable, getEditableFieldTag, getEditableLabelTag, getEnabled, getError, getExtraHtml, getFieldTag, getFormError, getHelp, getHelpTag, getHidden, getHiddenFieldTag, getId, getIsData, getIsHidden, getLabel, getLabelHtml, getLabelTag, getName, getOrNull, getParameter, getRawDbValue, getRequired, getValue, isBlank, isEmpty, isValid, setAutoPropagate, setData, setDbValue, setDisplayValuesOnNewLine, setEditable, setEnabled, setEndingString, setError, setExtraHtml, setFieldBelowLabel, setFormError, setHelp, setHidden, setHtmlify, setId, setIsData, setIsHidden, setLabel, setName, setRequired, setTrimWhitespace, setValue, setValueIsHtml, validate

Field Detail

checkboxInsertHeading

public mixed $checkboxInsertHeading = null

The heading of the checkbox column if the checkbox column is being displayed.

Since:
FORMfields v3.0

checkboxes

public mixed $checkboxes = array()

The sub fields for the checkboxes.

Since:
FORMfields v3.0

first

public mixed $first

The sub field for the first button.

Since:
FORMfields v2.0

goToPage

public mixed $goToPage

The sub field for entering the go to page.

Since:
FORMfields v2.0

goToPageSubmit

public mixed $goToPageSubmit

The sub field for the go to page submit button.

Since:
FORMfields v2.0

public mixed $header

The sub field for the header or title.

Since:
FORMfields v2.0

hideBorder

public mixed $hideBorder = false

True if the sectionTitleHeader should be hidden.

Since:
FORMfields v2.0

hideBottomNavigation

public mixed $hideBottomNavigation = false

True if the bottom navigation bar: page index, results and go to page, should be hidden.

Since:
FORMfields v2.0

hideGoToPage

public mixed $hideGoToPage = false

True if the go to page section should be hidden.

Since:
FORMfields v2.0

hideResultDetails

public mixed $hideResultDetails = false

True if the result details section should be hidden.

Since:
FORMfields v2.0

hideRowsPerPage

public mixed $hideRowsPerPage = false

True if the rows per page section should be hidden.

Since:
FORMfields v2.0

hideTopNavigation

public mixed $hideTopNavigation = false

True if the top navigation bar: page index, results and rows to page, should be hidden.

Since:
FORMfields v2.0

last

public mixed $last

The sub field for the last button.

Since:
FORMfields v2.0

next

public mixed $next

The sub field for the next button.

Since:
FORMfields v2.0

noRecordsString

public mixed $noRecordsString = "No Records Found"

The error string that is display no records where found in the database.

Since:
FORMfields v2.0

order

public mixed $order

The sub field that stores whether the data is sorted in ascending or descending order.

Since:
FORMfields v2.0

prev

public mixed $prev

The sub field for the previous button.

Since:
FORMfields v2.0

rowsPerPage

public mixed $rowsPerPage

The number of rows per page.

Since:
FORMfields v2.0

rowsPerPageField

public mixed $rowsPerPageField

A sub field for selecting the rows per page to display.

Since:
FORMfields v2.0

rowsReturned

public mixed $rowsReturned

The number of rows that were returned from the database. Used to accomodate manual modifications to the underlying TableSet

Since:
FORMfields v2.0

sort

public mixed $sort

The sub field that stores the name of the data to sort by.

Since:
FORMfields v2.0

sql

public mixed $sql

The SQL query used to retrieve the data from the database.

Since:
FORMfields v2.0

subFieldsCannotBeEmpty

public mixed $subFieldsCannotBeEmpty = false

True if an empty sub field constitutes an invalid value.

Since:
FORMfields v3.0

tableSet

public mixed $tableSet

The TableSet that holds the database data for this SearchResultsField.

Since:
FORMfields v2.0

Constructor Detail

SearchResultsField

public SearchResultsField(string name, string label, string sql, int rowsPerPage)

Creates a new SearchResultsField.

Parameters:
name - the name of the form field. This value must not be a SQL reserved word and should follow all the standard variable naming conventions in PHP.
label - this form field's label. The label is the printable text that is typically displayed on the left side of the field.
sql - the SQL query used to retrieve the data from the database. Note: The SQL query must not have a LIMIT clause.
rowsPerPage - the number of rows to display per page
Since:
FORMfields v1.0
Deprecated:
deprecated as this constructor syntax is not expected in PHP 5 - will be removed once PHP 5 becomes a minimum requirement for FORMfields

__construct

public __construct(string name, string label, string sql, int rowsPerPage)

Creates a new SearchResultsField.

Parameters:
name - the name of the form field. This value must not be a SQL reserved word and should follow all the standard variable naming conventions in PHP.
label - this form field's label. The label is the printable text that is typically displayed on the left side of the field.
sql - the SQL query used to retrieve the data from the database. Note: The SQL query must not have a LIMIT clause.
rowsPerPage - the number of rows to display per page
Since:
FORMfields v1.0
Deprecated:
deprecated as this constructor syntax is not expected in PHP 5 - will be removed once PHP 5 becomes a minimum requirement for FORMfields

Method Detail

addCheckboxColumn

public void addCheckboxColumn(array idHeading, string checkboxInsertHeading)

Adds a checkbox column to the results. Note: The ID values must not contain spaces or special characters, we recommend using an int value.

Parameters:
idHeading - the name of the attribute associated with the unique id
checkboxInsertHeading - where to insert the column. The column will be inserted directly before the checkboxInsertHeading or at the end of the columns if checkboxInsertHeading is null
Since:
FORMfields v2.0

getCheckboxValues

public array getCheckboxValues()

Returns a string array of the ids selected.

Returns:
a string array of the ids selected
Since:
FORMfields v2.0

getEditableFieldTag

public string getEditableFieldTag()

Returns the HTML used to display the input portion of this field.

Returns:
the HTML used to display the input portion of this field
Since:
FORMfields v2.0

getPageNavigationHtml

public void getPageNavigationHtml()

Returns the HTML to display the bottom navigation bar: page index, results and go to page, should be hidden.

Since:
FORMfields v2.0

getParameter

public void getParameter()

Retrieves the posted field value. In other words, sets this field value using the appropriate values in $_REQUEST. This method also loads the data from database as described by the posted values.

Since:
FORMfields v1.0

FORMfields