Swat/SwatTableView.php
public function display()
    {
        if (!$this->visible) {
            return;
        }

        if ($this->model === null) {
            return;
        }

        parent::display();

        $show_no_records = true;
        $row_count = count($this->model);
        foreach ($this->extra_rows as $row) {
            if ($row->getVisibleByCount($row_count)) {
                $show_no_records = false;
                break;
            }
        }

        if ($row_count === 0 && $show_no_records) {
            if ($this->no_records_message != '') {
                $div = new SwatHtmlTag('div');
                $div->class = 'swat-none';
                $div->setContent(
                    $this->no_records_message,
                    $this->no_records_message_type
                );

                $div->display();
            }

            return;
        }

        $table_tag = new SwatHtmlTag('table');
        $table_tag->id = $this->id;
        $table_tag->class = $this->getCSSClassString();
        $table_tag->cellspacing = '0';

        $table_tag->open();

        if ($this->hasHeader()) {
            $this->displayHeader();
        }

        if ($this->use_invalid_tfoot_ordering) {
            $this->displayBody();
            $this->displayFooter();
        } else {
            $this->displayFooter();
            $this->displayBody();
        }

        $table_tag->close();

        Swat::displayInlineJavaScript($this->getInlineJavaScript());
    }
public function display()
    {
        if (!$this->visible) {
            return;
        }

        if ($this->model === null) {
            return;
        }

        parent::display();

        $show_no_records = true;
        $row_count = count($this->model);
        foreach ($this->extra_rows as $row) {
            if ($row->getVisibleByCount($row_count)) {
                $show_no_records = false;
                break;
            }
        }

        if ($row_count === 0 && $show_no_records) {
            if ($this->no_records_message != '') {
                $div = new SwatHtmlTag('div');
                $div->class = 'swat-none';
                $div->setContent(
                    $this->no_records_message,
                    $this->no_records_message_type
                );

                $div->display();
            }

            return;
        }

        $table_tag = new SwatHtmlTag('table');
        $table_tag->id = $this->id;
        $table_tag->class = $this->getCSSClassString();
        $table_tag->cellspacing = '0';

        $table_tag->open();

        if ($this->hasHeader()) {
            $this->displayHeader();
        }

        if ($this->use_invalid_tfoot_ordering) {
            $this->displayBody();
            $this->displayFooter();
        } else {
            $this->displayFooter();
            $this->displayBody();
        }

        $table_tag->close();

        Swat::displayInlineJavaScript($this->getInlineJavaScript());
    }
public function display ( ) { if ( ! $ this -> visible ) { return ; } if ( $ this -> model === null ) { return ; } parent :: display ( ) ; $ show_no_records = true ; $ row_count = count ( $ this -> model ) ; foreach ( $ this -> extra_rows as $ row ) { if ( $ row -> getVisibleByCount ( $ row_count ) ) { $ show_no_records = false ; break ; } } if ( $ row_count === 0 && $ show_no_records ) { if ( $ this -> no_records_message != '' ) { $ div = new SwatHtmlTag ( 'div' ) ; $ div -> class = 'swat-none' ; $ div -> setContent ( $ this -> no_records_message , $ this -> no_records_message_type ) ; $ div -> display ( ) ; } return ; } $ table_tag = new SwatHtmlTag ( 'table' ) ; $ table_tag -> id = $ this -> id ; $ table_tag -> class = $ this -> getCSSClassString ( ) ; $ table_tag -> cellspacing = '0' ; $ table_tag -> open ( ) ; if ( $ this -> hasHeader ( ) ) { $ this -> displayHeader ( ) ; } if ( $ this -> use_invalid_tfoot_ordering ) { $ this -> displayBody ( ) ; $ this -> displayFooter ( ) ; } else { $ this -> displayFooter ( ) ; $ this -> displayBody ( ) ; } $ table_tag -> close ( ) ; Swat :: displayInlineJavaScript ( $ this -> getInlineJavaScript ( ) ) ; }
Displays this table-view

The table view is displayed as an XHTML table.
Displays this table - view