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. |
| |
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. |
| |
isClosable() : Boolean |
ContentPanel |
| Returns true is this panel was configured to be closable |
| |
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. |
| |
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 |
| |
fitToFrame : Boolean |
ContentPanel |
| True for this panel to manually adjust its size 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 |
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.UpdateManagerThe UpdateManager
This method is defined by ContentPanel.
isClosable
public function isClosable()
Returns true is this panel was configured to be closable
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.
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.UpdateManagerThe 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.
fitToFrame
fitToFrame : Boolean
True for this panel to manually adjust its size 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.