A basic ContentPanel element.
This class has no public properties.
|
ContentPanel(String/HTMLElement/Element el , String/Object config , [String content ]) |
ContentPanel |
Create a new ContentPanel. |
|
addEvents(Object object ) : void |
Observable |
Copies any events from the passed object onto this object if they do not already exist. The passed object
must also ... |
|
addListener(String eventName , Function handler , [Object options ]) : void |
Observable |
Appends an event handler to this component |
|
destroy() : void |
ContentPanel |
Destroys this panel |
|
fireEvent(String eventName , Object... args ) : Boolean |
Observable |
Fires the specified event with the passed parameters (minus the event name). |
|
getEl() : Ext.Element |
ContentPanel |
Returns this panel's element |
|
getId() : String |
ContentPanel |
Returns this panel's id |
|
getTitle() : String |
ContentPanel |
Returns this panel's title |
|
getToolbar() : Ext.Toolbar |
ContentPanel |
Returns the toolbar for this Panel if one was configured. |
|
getUpdateManager() : Ext.UpdateManager |
ContentPanel |
Get the Ext.UpdateManager for this panel. Enables you to perform Ajax updates. |
|
hasListener(String eventName ) : Boolean |
Observable |
Checks to see if this object is currently listening for a specified event |
|
isClosable() : Boolean |
ContentPanel |
Returns true is this panel was configured to be closable |
|
load(Object/String/Function url , [String/Object params ], [Function callback ], [Boolean discardUrl ]) : Ext.ContentPanel |
ContentPanel |
Loads this content panel immediately with content from XHR. Note: to delay loading until the panel is activated, use ... |
|
on(String eventName , Function handler , [Object options ]) : void |
Observable |
Appends an event handler to this element (shorthand for addListener) |
|
purgeListeners() : void |
Observable |
Removes all listeners for this object |
|
refresh() : void |
ContentPanel |
Force a content refresh from the URL specified in the setUrl() method.
Will fail silently if the setUrl method has no... |
|
removeListener(String eventName , Function handler , [Object scope ]) : void |
Observable |
Removes a listener |
|
setContent(String content , [Boolean loadScripts ]) : void |
ContentPanel |
Updates this panel's element |
|
setTitle(String title ) : void |
ContentPanel |
Set this panel's title |
|
setUrl(String/Function url , [String/Object params ], [Boolean loadOnce ]) : Ext.UpdateManager |
ContentPanel |
Set a URL to be used to load the content for this panel. When this panel is activated, the content will be loaded fro... |
|
un(String eventName , Function handler , [Object scope ]) : void |
Observable |
Removes a listener (shorthand for removeListener) |
|
adjustments : Array |
ContentPanel |
Values to add to the width/height when doing a fitToFrame (default is [0, 0]) |
|
autoCreate : Boolean/Object |
ContentPanel |
True to auto generate the DOM element for this panel, or a DomHelper config of the element to create |
|
autoScroll : Boolean |
ContentPanel |
True to scroll overflow in this panel (use with fitToFrame) |
|
background : Boolean |
ContentPanel |
True if the panel should not be activated when it is added (defaults to false) |
|
closable : Boolean |
ContentPanel |
True if the panel can be closed/removed |
|
fitContainer : Boolean |
ContentPanel |
When using fitToFrame and resizeEl, you can also fit the parent container (defaults to false) |
|
fitToFrame : Boolean |
ContentPanel |
True for this panel to adjust its size to fit when the region resizes (defaults to false) |
|
loadOnce : Boolean |
ContentPanel |
Calls When used with "url", calls setUrl() with this value |
|
params : String/Object |
ContentPanel |
When used with "url", calls setUrl() with this value |
|
resizeEl : String/HTMLElement/Element |
ContentPanel |
An element to resize if fitToFrame is true (instead of this panel's element) |
|
title : String |
ContentPanel |
The title for this panel |
|
toolbar : Toolbar |
ContentPanel |
A toolbar for this panel |
|
url : String |
ContentPanel |
Calls setUrl() with this value |
addEvents
public function addEvents(Object object
)
Copies any events from the passed object onto this object if they do not already exist. The passed object
must also inherit from Observable for this method to have any effect.
addListener
public function addListener(String eventName
, Function handler
, [Object options
])
Appends an event handler to this component
destroy
public function destroy()
This method is defined by ContentPanel.
fireEvent
public function fireEvent(String eventName
, Object... args
)
Fires the specified event with the passed parameters (minus the event name).
getEl
public function getEl()
Returns this panel's element
This method is defined by ContentPanel.
getId
public function getId()
This method is defined by ContentPanel.
getTitle
public function getTitle()
Returns this panel's title
This method is defined by ContentPanel.
getToolbar
public function getToolbar()
Returns the toolbar for this Panel if one was configured.
This method is defined by ContentPanel.
getUpdateManager
public function getUpdateManager()
Get the
Ext.UpdateManager for this panel. Enables you to perform Ajax updates.
Parameters:
Returns:
Ext.UpdateManager
The UpdateManager
This method is defined by ContentPanel.
hasListener
public function hasListener(String eventName
)
Checks to see if this object is currently listening for a specified event
isClosable
public function isClosable()
Returns true is this panel was configured to be closable
This method is defined by ContentPanel.
load
public function load(Object/String/Function url
, [String/Object params
], [Function callback
], [Boolean discardUrl
])
Loads this content panel immediately with content from XHR. Note: to delay loading until the panel is activated, use setUrl.
Parameters:
url
: Object/String/FunctionThe url for this request or a function to call to get the url or a config object containing any of the following options:
panel.load({
url: "your-url.php",
params: {param1: "foo", param2: "bar"}, // or a URL encoded string
callback: yourFunction,
scope: yourObject, //(optional scope)
discardUrl: false,
nocache: false,
text: "Loading...",
timeout: 30,
scripts: false
});
The only required property is url. The optional properties nocache, text and scripts are shorthand for disableCaching, indicatorText and loadScripts and are used to set their associated property on this panel UpdateManager instance.
params
: String/Object(optional) The parameters to pass as either a url encoded string "param1=1¶m2=2" or an object {param1: 1, param2: 2}
callback
: Function(optional) Callback when transaction is complete - called with signature (oElement, bSuccess, oResponse)
discardUrl
: Boolean(optional) By default when you execute an update the defaultUrl is changed to the last used url. If true, it will not store the url.
Returns:
This method is defined by ContentPanel.
on
public function on(String eventName
, Function handler
, [Object options
])
Appends an event handler to this element (shorthand for addListener)
purgeListeners
public function purgeListeners()
Removes all listeners for this object
refresh
public function refresh()
Force a content refresh from the URL specified in the setUrl() method.
Will fail silently if the setUrl method has not been called.
This does not activate the panel, just updates its content.
This method is defined by ContentPanel.
removeListener
public function removeListener(String eventName
, Function handler
, [Object scope
])
setContent
public function setContent(String content
, [Boolean loadScripts
])
Updates this panel's element
This method is defined by ContentPanel.
setTitle
public function setTitle(String title
)
This method is defined by ContentPanel.
setUrl
public function setUrl(String/Function url
, [String/Object params
], [Boolean loadOnce
])
Set a URL to be used to load the content for this panel. When this panel is activated, the content will be loaded from that URL.
Parameters:
url
: String/FunctionThe url to load the content from or a function to call to get the url
params
: String/Object(optional) The string params for the update call or an object of the params. See
Ext.UpdateManager.update for more details. (Defaults to null)
loadOnce
: Boolean(optional) Whether to only load the content once. If this is false it makes the Ajax call every time this panel is activated. (Defaults to false)
Returns:
Ext.UpdateManager
The UpdateManager
This method is defined by ContentPanel.
un
public function un(String eventName
, Function handler
, [Object scope
])
Removes a listener (shorthand for removeListener)
adjustments
adjustments : Array
Values to add to the width/height when doing a fitToFrame (default is [0, 0])
This config option is defined by ContentPanel.
autoCreate
autoCreate : Boolean/Object
True to auto generate the DOM element for this panel, or a DomHelper config of the element to create
This config option is defined by ContentPanel.
autoScroll
autoScroll : Boolean
True to scroll overflow in this panel (use with fitToFrame)
This config option is defined by ContentPanel.
background
background : Boolean
True if the panel should not be activated when it is added (defaults to false)
This config option is defined by ContentPanel.
closable
closable : Boolean
True if the panel can be closed/removed
This config option is defined by ContentPanel.
fitContainer
fitContainer : Boolean
When using fitToFrame and resizeEl, you can also fit the parent container (defaults to false)
This config option is defined by ContentPanel.
fitToFrame
fitToFrame : Boolean
True for this panel to adjust its size to fit when the region resizes (defaults to false)
This config option is defined by ContentPanel.
loadOnce
loadOnce : Boolean
Calls When used with "url", calls setUrl() with this value
This config option is defined by ContentPanel.
params
params : String/Object
When used with "url", calls setUrl() with this value
This config option is defined by ContentPanel.
resizeEl
resizeEl : String/HTMLElement/Element
An element to resize if fitToFrame is true (instead of this panel's element)
This config option is defined by ContentPanel.
title
title : String
The title for this panel
This config option is defined by ContentPanel.
toolbar
toolbar : Toolbar
A toolbar for this panel
This config option is defined by ContentPanel.
url
url : String
Calls setUrl() with this value
This config option is defined by ContentPanel.