def rebuild( self ):
        self.setUpdatesEnabled(False)
        self.blockSignals(True)
        for child in self.findChildren(QObject):
            child.setParent(None)
            child.deleteLater()
        schema = self.schema()
        if ( schema ):
            self.setEnabled(True)
            uifile = self.uiFile()
            if ( uifile ):
                projexui.loadUi('', self, uifile)
                for widget in self.findChildren(XOrbColumnEdit):
                    columnName = widget.columnName()
                    column     = schema.column(columnName)
                    if ( column ):
                        widget.setColumn(column)
                    else:
                        logger.debug('%s is not a valid column of %s' % \
                                     (columnName, schema.name()))
            else:
                layout = QFormLayout()
                layout.setContentsMargins(0, 0, 0, 0)
                columns = schema.columns()
                columns.sort(key = lambda x: x.displayName())
                record = self.record()
                for column in columns:
                    if ( column.name().startswith('_') ):
                        continue
                    label   = column.displayName()
                    coltype = column.columnType()
                    name    = column.name()
                    widget  = XOrbColumnEdit(self)
                    widget.setObjectName('ui_' + name)
                    widget.setColumnName(name)
                    widget.setColumnType(coltype)
                    widget.setColumn(column)
                    layout.addRow(QLabel(label, self), widget)
                self.setLayout(layout)
                self.adjustSize()
                self.setWindowTitle('Edit %s' % schema.name())
        else:
            self.setEnabled(False)
        self.setUpdatesEnabled(True)
        self.blockSignals(False)