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 scope ], [boolean override ]) : void |
Observable |
Appends an event handler to this component |
|
bufferedListener(String eventName , Function handler , [Object scope ], [Number millis ]) : Function |
Observable |
Appends an event handler to this component that is buffered. If the event is triggered more than once
in the specifie... |
|
delayedListener(String eventName , Function handler , [Object scope ], [Number delay ]) : Function |
Observable |
Appends an event handler to this component that is delayed the specified number of milliseconds. This
is useful for e... |
|
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() : YAHOO.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() : YAHOO.ext.Toolbar |
ContentPanel |
Returns the toolbar for this Panel if one was configured |
|
getUpdateManager() : YAHOO.ext.UpdateManager |
ContentPanel |
Get the YAHOO.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 scope ], [boolean override ]) : 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 ]) : YAHOO.ext.UpdateManager |
ContentPanel |
Set a URL to be used to load the content for this panel. |
addListener
public function addListener(String eventName
, Function handler
, [Object scope
], [boolean override
])
Appends an event handler to this component
Parameters:
eventName
: StringThe type of event to listen for
handler
: FunctionThe method the event invokes
scope
: Object(optional) The scope (this object) for the handler
override
: boolean(optional) If true, scope becomes the scope
Returns:
bufferedListener
public function bufferedListener(String eventName
, Function handler
, [Object scope
], [Number millis
])
Appends an event handler to this component that is buffered. If the event is triggered more than once
in the specified time-frame, only the last one actually fires.
Parameters:
eventName
: StringThe type of event to listen for
handler
: FunctionThe method the event invokes
scope
: Object(optional) The scope (this object) for the handler
millis
: Number(optional) The number of milliseconds to buffer (defaults to 250)
Returns:
delayedListener
public function delayedListener(String eventName
, Function handler
, [Object scope
], [Number delay
])
Appends an event handler to this component that is delayed the specified number of milliseconds. This
is useful for events that modify the DOM and need to wait for the browser to catch up.
Parameters:
eventName
: StringThe type of event to listen for
handler
: FunctionThe method the event invokes
scope
: Object(optional) The scope (this object) for the handler
delay
: Number(optional) The number of milliseconds to delay (defaults to 1 millisecond)
Returns:
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
YAHOO.ext.UpdateManager for this panel. Enables you to perform Ajax updates.
Parameters:
Returns:
YAHOO.ext.UpdateManager
The 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 scope
], [boolean override
])
Appends an event handler to this element (shorthand for addListener)
Parameters:
eventName
: StringThe type of event to listen for
handler
: FunctionThe method the event invokes
scope
: Object(optional) The scope (this object) for the handler
override
: boolean(optional) If true, scope becomes the scope
Returns:
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/ObjectloadOnce
: 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:
YAHOO.ext.UpdateManager
The UpdateManager
This method is defined by ContentPanel.