Warning: Use of undefined constant Symbol - assumed 'Symbol' (this will throw an Error in a future version of PHP) in /mnt/new-ebs/workbench-106550/lib/dojo/util/docscripts/lib/parser2/dojo2.inc on line 215 Warning: Use of undefined constant JavaScriptSymbol - assumed 'JavaScriptSymbol' (this will throw an Error in a future version of PHP) in /mnt/new-ebs/workbench-106550/lib/dojo/util/docscripts/lib/parser2/dojo2.inc on line 215

dijit/layout/ContentPane.js

  • Provides:

    • dijit.layout.ContentPane
  • Requires:

    • dijit._Widget in common
    • dijit.layout._ContentPaneResizeMixin in common
    • dojo.string in common
    • dojo.html in common
  • dijit.layout.ContentPane

    • type
      Function
    • chains:
      • dijit._Widget: (prototype)
      • dijit.layout._ContentPaneResizeMixin.prototype: (prototype)
      • dijit._Widget: (call)
      • dijit.layout._ContentPaneResizeMixin: (call)
    • summary
      A widget containing an HTML fragment, specified inline
      or by uri.  Fragment may include widgets.
    • description
      This widget embeds a document fragment in the page, specified
      either by uri, javascript generated markup or DOM reference.
      Any widgets within this content are instantiated and managed,
      but laid out according to the HTML structure.  Unlike IFRAME,
      ContentPane embeds a document fragment as would be found
      inside the BODY tag of a full HTML document.  It should not
      contain the HTML, HEAD, or BODY tags.
      For more advanced functionality with scripts and
      stylesheets, see dojox.layout.ContentPane.  This widget may be
      used stand alone or as a base class for other widgets.
      ContentPane is useful as a child of other layout containers
      such as BorderContainer or TabContainer, but note that those
      widgets can contain any widget as a child.
    • example
      Some quick samples:
      To change the innerHTML: cp.set('content', '<b>new content</b>')
      
      Or you can send it a NodeList: cp.set('content', dojo.query('div [class=selected]', userSelection))
      
      To do an ajax update: cp.set('href', url)
  • dijit.layout.ContentPane.href

    • type
      String
    • summary
      The href of the content that displays now.
      Set this at construction if you want to load data externally when the
      pane is shown.  (Set preload=true to load it immediately.)
      Changing href after creation doesn't have any effect; Use set('href', ...);
  • dijit.layout.ContentPane.content

    • type
      String
    • summary
      || DomNode || NodeList || dijit._Widget
      The innerHTML of the ContentPane.
      Note that the initialization parameter / argument to set(&quot;content&quot;, ...)
      can be a String, DomNode, Nodelist, or _Widget.
  • dijit.layout.ContentPane.extractContent

    • type
      Boolean
    • summary
      Extract visible content from inside of &lt;body&gt; .... &lt;/body&gt;.
      I.e., strip &lt;html&gt; and &lt;head&gt; (and it's contents) from the href
  • dijit.layout.ContentPane.parseOnLoad

    • type
      Boolean
    • summary
      Parse content and create the widgets, if any.
  • dijit.layout.ContentPane.parserScope

    • alias - dojo._scopeName
    • type
      String
    • summary
      Flag passed to parser.  Root for attribute names to search for.   If scopeName is dojo,
      will search for data-dojo-type (or dojoType).  For backwards compatibility
      reasons defaults to dojo._scopeName (which is &quot;dojo&quot; except when
      multi-version support is used, when it will be something like dojo16, dojo20, etc.)
  • dijit.layout.ContentPane.preventCache

    • type
      Boolean
    • summary
      Prevent caching of data from href's by appending a timestamp to the href.
  • dijit.layout.ContentPane.preload

    • type
      Boolean
    • summary
      Force load of data on initialization even if pane is hidden.
  • dijit.layout.ContentPane.refreshOnShow

    • type
      Boolean
    • summary
      Refresh (re-download) content when pane goes from hidden to shown
  • dijit.layout.ContentPane.loadingMessage

    • type
      String
    • summary
      Message that shows while downloading
  • dijit.layout.ContentPane.errorMessage

    • type
      String
    • summary
      Message that shows if an error occurs
  • dijit.layout.ContentPane.isLoaded

    • tags: readonly
    • type
      Boolean
    • summary
      True if the ContentPane has data in it, either specified
      during initialization (via href or inline content), or set
      via set('content', ...) / set('href', ...)
      
      False if it doesn't have any content, or if ContentPane is
      still in the process of downloading href.
  • dijit.layout.ContentPane.baseClass

    • type
      String
  • dijit.layout.ContentPane.ioArgs

    • type
      Object
    • summary
      Parameters to pass to xhrGet() request, for example:
      	&lt;div dojoType=&quot;dijit.layout.ContentPane&quot; href=&quot;./bar&quot; ioArgs=&quot;{timeout: 500}&quot;&gt;
  • dijit.layout.ContentPane.onLoadDeferred

    • tags: readonly
    • type
      dojo.Deferred
    • summary
      This is the <code>dojo.Deferred</code> returned by set('href', ...) and refresh().
      Calling onLoadDeferred.addCallback() or addErrback() registers your
      callback to be called only once, when the prior set('href', ...) call or
      the initial href parameter to the constructor finishes loading.
      
      This is different than an onLoad() handler which gets called any time any href
      or content is loaded.
  • dijit.layout.ContentPane.attributeMap

    • type
      Object
  • dijit.layout.ContentPane.stopParser

    • type
      Object
  • dijit.layout.ContentPane.template

    • tags:
    • type
      Boolean
    • summary
      Flag from the parser that this ContentPane is inside a template
      so the contents are pre-parsed.
      (TODO: this declaration can be commented out in 2.0)
  • dijit.layout.ContentPane.create

    • parameters:
      • params
      • srcNodeRef
    • type
      Function
  • dijit.layout.ContentPane.postMixInProperties

    • type
      Function
  • dijit.layout.ContentPane.buildRendering

    • type
      Function
  • dijit.layout.ContentPane.containerNode

  • dijit.layout.ContentPane.domNode.title

    • type
      String
  • dijit.layout.ContentPane._startChildren

    • summary
      Call startup() on all children including non _Widget ones like dojo.dnd.Source objects
    • type
      Function
  • dijit.layout.ContentPane.setHref

    • parameters:
      • href: (typeof String|Uri)
    • summary
      Deprecated.   Use set('href', ...) instead.
    • type
      Function
  • dijit.layout.ContentPane._setHrefAttr

    • parameters:
      • href: (typeof String|Uri)
        url to the page you want to get, must be within the same domain as your mainpage
    • returns
      dojo.Deferred
    • summary
      Hook so set(&quot;href&quot;, ...) works.
    • description
      Reset the (external defined) content of this pane and replace with new url
      Note: It delays the download until widget is shown if preload is false.
    • type
      Function
  • dijit.layout.ContentPane._hrefChanged

    • type
      Object
  • dijit.layout.ContentPane.setContent

    • parameters:
      • data: (typeof String|DomNode|Nodelist)
    • summary
      Deprecated.   Use set('content', ...) instead.
    • type
      Function
  • dijit.layout.ContentPane._setContentAttr

    • parameters:
      • data: (typeof String|DomNode|Nodelist)
        the new Content may be String, DomNode or NodeList
        
        if data is a NodeList (or an array of nodes) nodes are copied
        so you can import nodes from another document implicitly
    • returns
      dojo.Deferred
    • summary
      Hook to make set(&quot;content&quot;, ...) work.
      Replaces old content with data content, include style classes from old content
    • type
      Function
  • dijit.layout.ContentPane._isDownloaded

    • type
      bool
  • dijit.layout.ContentPane._getContentAttr

    • summary
      Hook to make get(&quot;content&quot;) work
    • type
      Function
  • dijit.layout.ContentPane.cancel

    • summary
      Cancels an in-flight download of content
    • type
      Function
  • dijit.layout.ContentPane.uninitialize

    • type
      Function
  • dijit.layout.ContentPane.destroyRecursive

    • parameters:
      • preserveDom: (typeof Boolean)
    • summary
      Destroy the ContentPane and its contents
    • type
      Function
  • dijit.layout.ContentPane._onShow

    • returns
      If child has an href, promise that fires when the load is complete
    • summary
      Called when the ContentPane is made visible
    • description
      For a plain ContentPane, this is called on initialization, from startup().
      If the ContentPane is a hidden pane of a TabContainer etc., then it's
      called whenever the pane is made visible.
      
      Does necessary processing, including href download and layout/resize of
      child widget(s)
    • type
      Function
  • dijit.layout.ContentPane.refresh

    • returns
      If child has an href, promise that fires when refresh is complete
    • summary
      [Re]download contents of href and display
    • description
      1. cancels any currently in-flight requests
      2. posts "loading..." message
      3. sends XHR to download new data
    • type
      Function
  • dijit.layout.ContentPane._load

    • summary
      Load/reload the href specified in this.href
    • type
      Function
  • dijit.layout.ContentPane._xhrDfd

    • type
      Object
  • dijit.layout.ContentPane._onLoadHandler

    • parameters:
      • data
    • summary
      This is called whenever new content is being loaded
    • type
      Function
  • dijit.layout.ContentPane._onUnloadHandler

    • summary
      This is called whenever the content is being unloaded
    • type
      Function
  • dijit.layout.ContentPane.destroyDescendants

    • summary
      Destroy all the widgets inside the ContentPane and empty containerNode
    • type
      Function
  • dijit.layout.ContentPane._contentSetter

    • type
      Object
  • dijit.layout.ContentPane._setContent

    • parameters:
      • cont: (typeof String|DocumentFragment)
      • isFakeContent: (typeof Boolean)
    • summary
      Insert the content into the container node
    • type
      Function
  • dijit.layout.ContentPane._onError

    • parameters:
      • type
      • err
      • consoleText
    • type
      Function
  • dijit.layout.ContentPane.onLoad

    • parameters:
      • data
    • summary
      Event hook, is called after everything is loaded and widgetified
    • tags: callback
    • type
      Function
  • dijit.layout.ContentPane.onUnload

    • summary
      Event hook, is called before old content is cleared
    • tags: callback
    • type
      Function
  • dijit.layout.ContentPane.onDownloadStart

    • summary
      Called before download starts.
    • description
      The string returned by this function will be the html
      that tells the user we are loading something.
      Override with your own function if you want to change text.
    • tags: extension
    • type
      Function
  • dijit.layout.ContentPane.onContentError

    • parameters:
      • error: (typeof Error)
    • summary
      Called on DOM faults, require faults etc. in content.
      
      In order to display an error message in the pane, return
      the error message from this method, as an HTML string.
      
      By default (if this method is not overriden), it returns
      nothing, so the error message is just printed to the console.
    • tags: extension
    • type
      Function
  • dijit.layout.ContentPane.onDownloadError

    • parameters:
      • error: (typeof Error)
    • summary
      Called when download error occurs.
      
      In order to display an error message in the pane, return
      the error message from this method, as an HTML string.
      
      Default behavior (if this method is not overriden) is to display
      the error message inside the pane.
    • tags: extension
    • type
      Function
  • dijit.layout.ContentPane.onDownloadEnd

    • summary
      Called when download is finished.
    • tags: callback
    • type
      Function
  • dijit.layout

    • type
      Object
  • dijit

    • type
      Object