Class Index | File Index

Classes


Class M.ButtonView


Extends M.View.
This defines the prototype for any button view. A button is a view element that is typically used for triggering an action, e.g. switching to another page, firing a request or opening a dialog.
Defined in: button.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Field Summary
Field Attributes Field Name and Description
 
This property can be used to specify a hyperlink target for this button.
 
This property can be used to specify a certain hyperlink type for this button.
 
Determines whether this button is active or not.
 
Determines whether to display the button ony with an icon but no text or not.
 
This property determines whether or not to display the corresponding input of the slider.
 
max
This property specifies the max value of the slider.
 
min
This property specifies the min value of the slider.
 
This property specifies the recommended events for this type of view.
 
This property specifies the step value of the slider.
 
tag
This property can be used to specify a tag, that is independent from the button's value.
 
The type of this object.
 
This property contains the slider's value.
Fields borrowed from class M.View:
childViews, computedValue, contentBinding, contentBindingReverse, cssClass, cssClassOnError, cssClassOnInit, cssStyle, events, hasFocus, html, id, isInline, isView, modelId, parentView, triggerActionOnChange, triggerActionOnEnter, triggerActionOnKeyUp
Method Summary
Method Attributes Method Name and Description
 
This method can be used to disable the button.
 
dispatchEvent(id, event, nextEvent)
This method is called right before the page is loaded.
 
This method can be used to enable a disabled button and make it usable again.
 
This method is responsible for registering events for view elements and its child views.
 
This method resets the slider to its initial value.
 
setValue(value)
Sets the button's value and calls renderUpdate() to make the value update visible.
 
setValueFromDOM(id, event, nextEvent)
This method sets its value to the value it has in its DOM representation and then delegates these changes to a controller property if the contentBindingReverse property is set.
Methods borrowed from class M.View:
addCssClass, attachToObservable, clearHtml, clearValue, clearValues, computeValue, contentDidChange, delegateValueUpdate, design, getChildViewsAsArray, getIds, getValue, getValues, gotFocus, lostFocus, nl2br, removeCssClass, removeCssProperty, renderUpdate, secure, setCssProperty, style, tab2space, theme, themeChildViews
Methods borrowed from class M.Object:
bindToCaller, create, destroy, extend, get, include, set
Class Detail
M.ButtonView()
Field Detail
{String} hyperlinkTarget
This property can be used to specify a hyperlink target for this button. It only works in combination with the hyperlinkType property.

{String} hyperlinkType
This property can be used to specify a certain hyperlink type for this button. It only works in combination with the hyperlinkTarget property.

{Boolean} isActive
Determines whether this button is active or not. Note: This property is only used if the button is part of a button group (M.ButtonGroupView).

{Boolean} isIconOnly
Determines whether to display the button ony with an icon but no text or not.

{Boolean} isSliderOnly
This property determines whether or not to display the corresponding input of the slider.
Defined in: slider.js.

{Number} max
This property specifies the max value of the slider.
Defined in: slider.js.

{Number} min
This property specifies the min value of the slider.
Defined in: slider.js.

{Array} recommendedEvents
This property specifies the recommended events for this type of view.

{Number} step
This property specifies the step value of the slider.
Defined in: slider.js.

{String} tag
This property can be used to specify a tag, that is independent from the button's value. This allows you to identify a button, without having to worry about changes to its value.

{String} type
The type of this object.

value
This property contains the slider's value.
Defined in: slider.js.
Method Detail
disable()
This method can be used to disable the button. This leads to a visual 'disabled' look and disabled the buttons tap/click events.

dispatchEvent(id, event, nextEvent)
This method is called right before the page is loaded. If a beforeLoad-action is defined for the page, it is now called.
Parameters:
{String} id
The DOM id of the event target.
{Object} event
The DOM event.
{Object} nextEvent
The next event (external event), if specified.

enable()
This method can be used to enable a disabled button and make it usable again.

registerEvents()
This method is responsible for registering events for view elements and its child views. It basically passes the view's event-property to M.EventDispatcher to bind the appropriate events. It extend M.View's registerEvents method with some special stuff for list views and their internal events.

resetSlider()
This method resets the slider to its initial value.
Defined in: slider.js.

setValue(value)
Sets the button's value and calls renderUpdate() to make the value update visible.
Parameters:
{String} value
The button's new value.

setValueFromDOM(id, event, nextEvent)
This method sets its value to the value it has in its DOM representation and then delegates these changes to a controller property if the contentBindingReverse property is set. Additionally call target / action if set.
Defined in: slider.js.
Parameters:
{String} id
The DOM id of the event target.
{Object} event
The DOM event.
{Object} nextEvent
The next event (external event), if specified.

Documentation generated by JsDoc Toolkit 2.4.0 on Wed Jan 25 2012 20:41:09 GMT+0100 (MEZ)