           # try in the window context.  this is almost always certainly a bug
           # so look into wtf is going on and which components are problematic
           containerElement = @$( component.container ).eq(0) if containerElement.length is 0
+
+        if @emptyContainerElements is true
+          containerElement.empty()
 
         containerElement.append( component.el )
 


container.replaces                "Luca.Container"

container.defines
  className: 'luca-ui-container'
  componentTag: 'div'
  componentClass: 'luca-ui-panel'
  isContainer: true
  rendered: false
  components: []

  # @componentEvents provides declarative syntax for responding to events on
  # the components in this container.  the format of the syntax is very similar

    _.flatten( components )


container.register()

# This is the method by which a container injects the rendered child views
# into the DOM.  It will get passed the container object, and the component
# that is being rendered.
