src/Ubiquity/controllers/crud/CRUDController.php
public function refresh_() {
		$model = $this->model;
		if (isset ( $_POST ["s"] )) {
			$instances = $this->search ( $model, $_POST ["s"] );
		} else {
			$page = URequest::post ( "p", 1 );
			$instances = $this->getInstances ( $totalCount, $page );
		}
		if (! isset ( $totalCount )) {
			$totalCount = DAO::count ( $model, $this->_getAdminData ()->_getInstancesFilter ( $model ) );
		}
		$recordsPerPage = $this->_getModelViewer ()->recordsPerPage ( $model, $totalCount );
		$grpByFields = $this->_getModelViewer ()->getGroupByFields ();
		if (isset ( $recordsPerPage )) {
			if (! is_array ( $grpByFields )) {
				UResponse::asJSON ();
				$responseFormatter = new ResponseFormatter ();
				print_r ( $responseFormatter->getJSONDatas ( $instances ) );
			} else {
				$this->_renderDataTableForRefresh ( $instances, $model, $totalCount );
			}
		} else {
			$this->jquery->execAtLast ( '$("#search-query-content").html("' . $_POST ["s"] . '");$("#search-query").show();$("#table-details").html("");' );
			$this->_renderDataTableForRefresh ( $instances, $model, $totalCount );
		}
	}
public function refresh_() {
		$model = $this->model;
		if (isset ( $_POST ["s"] )) {
			$instances = $this->search ( $model, $_POST ["s"] );
		} else {
			$page = URequest::post ( "p", 1 );
			$instances = $this->getInstances ( $totalCount, $page );
		}
		if (! isset ( $totalCount )) {
			$totalCount = DAO::count ( $model, $this->_getAdminData ()->_getInstancesFilter ( $model ) );
		}
		$recordsPerPage = $this->_getModelViewer ()->recordsPerPage ( $model, $totalCount );
		$grpByFields = $this->_getModelViewer ()->getGroupByFields ();
		if (isset ( $recordsPerPage )) {
			if (! is_array ( $grpByFields )) {
				UResponse::asJSON ();
				$responseFormatter = new ResponseFormatter ();
				print_r ( $responseFormatter->getJSONDatas ( $instances ) );
			} else {
				$this->_renderDataTableForRefresh ( $instances, $model, $totalCount );
			}
		} else {
			$this->jquery->execAtLast ( '$("#search-query-content").html("' . $_POST ["s"] . '");$("#search-query").show();$("#table-details").html("");' );
			$this->_renderDataTableForRefresh ( $instances, $model, $totalCount );
		}
	}
public function refresh_ ( ) { $ model = $ this -> model ; if ( isset ( $ _POST [ "s" ] ) ) { $ instances = $ this -> search ( $ model , $ _POST [ "s" ] ) ; } else { $ page = URequest :: post ( "p" , 1 ) ; $ instances = $ this -> getInstances ( $ totalCount , $ page ) ; } if ( ! isset ( $ totalCount ) ) { $ totalCount = DAO :: count ( $ model , $ this -> _getAdminData ( ) -> _getInstancesFilter ( $ model ) ) ; } $ recordsPerPage = $ this -> _getModelViewer ( ) -> recordsPerPage ( $ model , $ totalCount ) ; $ grpByFields = $ this -> _getModelViewer ( ) -> getGroupByFields ( ) ; if ( isset ( $ recordsPerPage ) ) { if ( ! is_array ( $ grpByFields ) ) { UResponse :: asJSON ( ) ; $ responseFormatter = new ResponseFormatter ( ) ; print_r ( $ responseFormatter -> getJSONDatas ( $ instances ) ) ; } else { $ this -> _renderDataTableForRefresh ( $ instances , $ model , $ totalCount ) ; } } else { $ this -> jquery -> execAtLast ( '$("#search-query-content").html("' . $ _POST [ "s" ] . '");$("#search-query").show();$("#table-details").html("");' ) ; $ this -> _renderDataTableForRefresh ( $ instances , $ model , $ totalCount ) ; } }
Refreshes the area corresponding to the DataTable
Refreshes the area corresponding to the DataTable