\Hazaar\View\Widgets
Input

Basic button widget.

Tags

Since

1.1

Summary
Methods Properties Constants
set
val
No constants
Properties
Inherited
$element
$element
Inherited
$name
$name
Inherited
$script
$script
Methods
__construct()
__construct($name, $value = null, $buttons = null, $params = Array ( ) , $input_type = 'text', $element_type = 'input')

Initialise a button widget

Parameters

$name

No description

$value

No description

$buttons

No description

$params

No description

$input_type

No description

$element_type

No description

displayMember()
displayMember($value) : Hazaar\\jqWidgets\\Input

Sets or gets the displayMember of the Items. The displayMember specifies the name of an object property to display. The name is contained in the collection specified by the ‘source’ property.

Tags

Since

1.1

Parameters

$valuestring

The value to set

Returns

\Hazaar\View\Widgets\Hazaar\\jqWidgets\\Input
items()
items($value) : Hazaar\\jqWidgets\\Input

Sets or gets the maximum number of items to display in the popup menu.

Tags

Since

1.1

Parameters

$valueint

The value to set

Returns

\Hazaar\View\Widgets\Hazaar\\jqWidgets\\Input
minLength()
minLength($value) : Hazaar\\jqWidgets\\Input

Sets or gets the minimum character length needed before triggering auto-complete suggestions.

Tags

Since

1.1

Parameters

$valueint

The value to set

Returns

\Hazaar\View\Widgets\Hazaar\\jqWidgets\\Input
onButtonClick()
onButtonClick($code)

Parameters

$code

No description

onChange()
onChange($code) : Hazaar\\jqWidgets\\Input

This event is triggered when the value is changed.

Tags

Since

1.1

Parameters

$codestring

The JavaScript code to execute when the event is triggered.

Returns

\Hazaar\View\Widgets\Hazaar\\jqWidgets\\Input
onClose()
onClose($code) : Hazaar\\jqWidgets\\Input

This event is triggered when the auto-suggest popup is closed.

Tags

Since

1.1

Parameters

$codestring

The JavaScript code to execute when the event is triggered.

Returns

\Hazaar\View\Widgets\Hazaar\\jqWidgets\\Input
onOpen()
onOpen($code) : Hazaar\\jqWidgets\\Input

This event is triggered when the auto-suggest popup is opened.

Tags

Since

1.1

Parameters

$codestring

The JavaScript code to execute when the event is triggered.

Returns

\Hazaar\View\Widgets\Hazaar\\jqWidgets\\Input
onSelect()
onSelect($code) : Hazaar\\jqWidgets\\Input

This event is triggered when an item is selected from the auto-suggest popup.

Tags

Since

1.1

Parameters

$codestring

The JavaScript code to execute when the event is triggered.

Returns

\Hazaar\View\Widgets\Hazaar\\jqWidgets\\Input
opened()
opened($value) : Hazaar\\jqWidgets\\Input

Sets or gets a value indicating whether the auto-suggest popup is opened.

Tags

Since

1.1

placeHolder()
placeHolder($value) : Hazaar\\jqWidgets\\Input

Sets or gets the input’s place holder.

Tags

Since

1.1

Parameters

$valuestring

The value to set

Returns

\Hazaar\View\Widgets\Hazaar\\jqWidgets\\Input
popupZIndex()
popupZIndex($value) : Hazaar\\jqWidgets\\Input

Sets or gets the auto-suggest popup’s z-index.

Tags

Since

1.1

Parameters

$valueint

The value to set

Returns

\Hazaar\View\Widgets\Hazaar\\jqWidgets\\Input
query()
query($value) : Hazaar\\jqWidgets\\Input

Determines the input’s query.

Tags

Since

1.1

renderer()
renderer($value) : Hazaar\\jqWidgets\\Input

Enables you to update the input’s value, after a selection from the auto-complete popup.

Tags

Since

1.1

searchMode()
searchMode($value) : Hazaar\\jqWidgets\\Input

Sets or gets the search mode. When the user types into the edit field, the jqxInput widget tries to find the searched item using the entered text and the selected search mode.

Possible Values:

  • ‘none’
  • ‘contains’
  • ‘containsignorecase’
  • ‘equals’
  • ‘equalsignorecase’
  • ‘startswithignorecase’
  • ‘startswith’
  • ‘endswithignorecase’
  • ‘endswith’

Tags

Since

1.1

selectAll()
selectAll() : string

Selects the text in the input field.

Tags

Since

1.1

Returns

string
source()
source($source, $root = null, $map = null, $formatData = null) : Hazaar\\jqWidgets\\Input

Sets the widget’s data source. The ‘source’ function is passed two arguments, the input field’s value and a callback function. The ‘source’ function may be used synchronously by returning an array of items or asynchronously via the callback.

Tags

Since

1.1

Parameters

$source\Hazaar\View\Widgets\DataAdapter

The DataSource object that defines where data is coming from.

$rootstring

The root of the returned data

$map\Hazaar\View\Widgets\JavaScript

Optional javascript to map returned data values. Data must end up as pairs of the keys “label” and “value”. If your returned data does not have keys with these names you need to use this function to map the data and return an object with label and value fields. The function provides one parameter named ‘item’ which is the current item being mapped. This function is then called for every record returned.

Example:
<code class="php">
             new JavaScript("return { label : item.name, value : item.code }");
             </code>
This will map the name field to the label field and the code field to the value field.
$formatData\Hazaar\View\Widgets\JavaScript

No description

Returns

\Hazaar\View\Widgets\Hazaar\\jqWidgets\\Input
valueMember()
valueMember($value) : Hazaar\\jqWidgets\\Input

Sets or gets the valueMember of the Items. The valueMember specifies the name of an object property to set as a ‘value’ of the list items. The name is contained in the collection specified by the ‘source’ property.

Tags

Since

1.1

Parameters

$valuestring

The value to set

Returns

\Hazaar\View\Widgets\Hazaar\\jqWidgets\\Input
Inherited
set()
set($key, $value = null, $type = null) : \Hazaar\View\Widgets\Widget

Sets a parameter that is sent to the DOM object.

This method can be used to set a single parameter, with the $key and $value arguments, or multiple parameters by just using the $key argument which is an array of key/value pairs of parameters that are to be set.

Parameters

$keymixed

The name of the parameter to be set, or an array of key/value pairs listing multiple parameters to be set.

$valuemixed

(Optional) The value of the parameter if only specifying one parameter.

$typestring

(Optional) The data type of the value. If set then this will be set explicitly.

Returns

\Hazaar\View\Widgets\Widget

A reference to the current object.

Inherited
setContent()
setContent($content) : string

Sets or gets the value.

Parameters

$content

No description

Returns

string
Inherited
style()
style($value)

Parameters

$value

No description

Inherited
theme()
theme($value) : \Hazaar\View\Widgets\Widget

Specifies the theme to use when initialising the widget. This is not normally needed as the default theme is set when creating each widget. However you may want to override the theme on a per widget basis and this allows for that.

Keep in mind that the theme file used will have to included manually.

Parameters

$valuestring

The name of the theme.

Returns

\Hazaar\View\Widgets\Widget

A reference to the current object.

Inherited
val()
val($value = null) : string

Sets or gets the value.

Parameters

$valuestring

The value to set

Returns

string
Inherited
width()
width($value) : \Hazaar\View\Widgets\Widget

Specifies the width of the widget in pixels.

Parameters

$valuemixed

The width value. Either an integer or string (with px suffix);

Returns

\Hazaar\View\Widgets\Widget

A reference to the current object.