Class MochiKit.Widget.Pane
Extends
MochiKit.Widget.
The pane widget class. Used to create the simplest form of
element container. It is also used inside various types of
paged containers, such as a TabContainer, a Wizard and
similar. A pane only uses a <div> HTML element, and
supports being hidden and shown according to any page
transitions required by a parent container. In addition to
standard HTML events, the "onenter" and "onexit" events are
triggered whenever the pane is used in a parent container
page transition.
Defined in: Widget.js.
Constructor Attributes | Constructor Name and Description |
---|---|
MochiKit.Widget.Pane(attrs)
Creates a new pane widget.
|
Field Attributes | Field Name and Description |
---|---|
<static> |
MochiKit.Widget.Pane.ANY
The default page status.
|
<static> |
MochiKit.Widget.Pane.BACKWARD
The backward-only page status.
|
<static> |
MochiKit.Widget.Pane.FORWARD
The forward-only page status.
|
[read-only] The current page
closeable flag value.
|
|
[read-only] The current page status.
|
|
[read-only] The current page title.
|
|
<static> |
MochiKit.Widget.Pane.WORKING
The working page status.
|
- Fields borrowed from class MochiKit.Widget:
- _id, Classes
Method Attributes | Method Name and Description |
---|---|
_handleEnter(opts)
Handles the page enter event.
|
|
_handleExit(opts)
Handles the page exit event.
|
|
setAttrs(attrs)
Updates the widget or HTML DOM node attributes.
|
- Methods borrowed from class MochiKit.Widget:
- _animQueueId, _createWidgetTreeElem, _eventHandler, _widgetMixin, addAll, addChildNode, addClass, animate, blurAll, createWidget, createWidgetTree, destroy, destroyWidget, emitSignal, getChildNodes, hasClass, hide, isFormField, isHidden, isWidget, removeAll, removeChildNode, removeClass, setStyle, show, toggleClass
Class Detail
MochiKit.Widget.Pane(attrs)
Creates a new pane widget.
- Parameters:
- {Object} attrs
- the widget and node attributes
- {String} attrs.pageTitle Optional
- the page title used when inside a page container, defaults to "Page"
- {String/Object} attrs.pageStatus Optional
- the page status used when inside a page container, use one of the predefined status constants in this class, defaults to "ANY"
- {Boolean} attrs.pageCloseable Optional
- the page closeable flag used when inside some page containers, defaults to false
- {Object} ... Optional
- the child widgets or DOM nodes
- Returns:
- {Widget} the widget DOM node
Field Detail
<static>
MochiKit.Widget.Pane.ANY
The default page status. Allows page transitions both to the
previous and the next page.
<static>
MochiKit.Widget.Pane.BACKWARD
The backward-only page status. Allows transitions only to the
previous page.
<static>
MochiKit.Widget.Pane.FORWARD
The forward-only page status. Allows transitions only to the next
page.
{Boolean}
pageCloseable
[read-only] The current page
closeable flag value.
{Object}
pageStatus
[read-only] The current page status.
{String}
pageTitle
[read-only] The current page title.
<static>
MochiKit.Widget.Pane.WORKING
The working page status. Will disable transitions both to the
previous and the next page. The page container may also display a
cancel button to allow user cancellation of the ongoing operation.
Method Detail
_handleEnter(opts)
Handles the page enter event. This method is called by a parent
page container widget, such as a TabContainer or a Wizard. It will
reset the form validations (optional), show the pane (optional),
and finally trigger the "onenter" event.
- Parameters:
- {Object} opts
- the page transition options
- {Boolean} opts.show Optional
- the show pane flag, defaults to true
- {Boolean} opts.validateReset Optional
- the form validation reset flag, used to clear all form validations in the pane
{Boolean}
_handleExit(opts)
Handles the page exit event. This method is called by a parent
page container widget, such as a TabContainer or a Wizard. It will
validate the form (optional), unfocus all form fields, hide the
pane (optional), and finally trigger the "onexit" event.
- Parameters:
- {Object} opts
- the page transition options
- {Boolean} opts.hide Optional
- the hide pane flag, defaults to true
- {Boolean} opts.validate Optional
- the form validation flag, used to check all forms in the page for valid entries before proceeding, defaults to false
- Returns:
- {Boolean} true if the page exit event completed, or false if it was cancelled (due to validation errors)
setAttrs(attrs)
Updates the widget or HTML DOM node attributes.
- Parameters:
- {Object} attrs
- the widget and node attributes to set
- {String} attrs.pageTitle Optional
- the page title used when inside a page container
- {String/Object} attrs.pageStatus Optional
- the page status used when inside a page container, use one of the predefined status constants in this class
- {Boolean} attrs.pageCloseable Optional
- the page closeable flag used when inside some page containers