function ProcessMessages() { if (GetApplication()->IsGETValueSet('page')) { $this->pageNumber = GetApplication()->GetGETValue('page') - 1; GetApplication()->SetSessionVariable($this->GetSessionPrefix() . 'page', $this->pageNumber); } elseif (!$this->NeedResetPage() && GetApplication()->IsSessionVariableSet($this->GetSessionPrefix() . 'page')) { $this->pageNumber = GetApplication()->GetSessionVariable($this->GetSessionPrefix() . 'page'); } else { $this->ResetPageNumber(); } if (GetApplication()->IsGETValueSet('recperpage')) { $this->rowsPerPage = GetApplication()->GetGETValue('recperpage'); GetApplication()->SetSessionVariable($this->GetSessionPrefix() . 'recperpage', $this->rowsPerPage); } elseif (GetApplication()->IsSessionVariableSet($this->GetSessionPrefix() . 'recperpage')) { $this->rowsPerPage = GetApplication()->GetSessionVariable($this->GetSessionPrefix() . 'recperpage'); } else { $this->rowsPerPage = $this->defaultRowPerPage; } if ($this->pageNumber >= $this->GetPageCount()) { $this->pageNumber = $this->GetPageCount() - 1; } elseif ($this->pageNumber < 0) { $this->pageNumber = 0; } if (!in_array(GetOperation(), $this->ignorePageNavigationOperations)) { if ($this->rowsPerPage != 0 && $this->GetRowCount() != 0) { $this->dataset->SetUpLimit($this->pageNumber * $this->rowsPerPage); $this->dataset->SetLimit($this->rowsPerPage); } } }
private function ExtractOrderValues() { if (GetApplication()->IsGETValueSet('order')) { $orderValue = GetApplication()->GetGETValue('order'); $this->orderColumnFieldName = substr($orderValue, 1, strlen($orderValue) - 1); $this->orderType = $orderValue[0] == 'a' ? otAscending : otDescending; $this->SetSessionVariable($this->internalName . '_' . 'orderColumnFieldName', $this->orderColumnFieldName); $this->SetSessionVariable($this->internalName . '_' . 'orderType', $this->orderType); } elseif (GetOperation() == 'resetorder') { $this->UnSetSessionVariable($this->internalName . '_' . 'orderColumnFieldName'); $this->UnSetSessionVariable($this->internalName . '_' . 'orderType'); $this->ApplyDefaultOrder(); } elseif ($this->IsSessionVariableSet($this->internalName . '_' . 'orderColumnFieldName')) { $this->orderColumnFieldName = $this->GetSessionVariable($this->internalName . '_' . 'orderColumnFieldName'); $this->orderType = $this->GetSessionVariable($this->internalName . '_' . 'orderType'); } else { $this->ApplyDefaultOrder(); } }
function DoProcessMessages() { if (GetOperation() != OPERATION_RSS) { //if (isset($this->AdvancedSearchControl) && $this->OpenAdvancedSearchByDefault()) //if (!$this->AdvancedSearchControl->HasCondition()) // GetApplication()->SetOperation(OPERATION_ADVANCED_SEARCH); $this->grid->SetState(GetOperation()); $advancedSearchApplied = false; if (isset($this->AdvancedSearchControl)) { $advancedSearchApplied = $this->AdvancedSearchControl->ProcessMessages(); } $this->grid->ProcessMessages(); if (isset($this->pageNavigator)) { $this->pageNavigator->ProcessMessages(); } if ($advancedSearchApplied) { $link = $this->CreateLinkBuilder(); header('Location: ' . $link->GetLink()); exit; } } }
public function ProcessMessages() { if (GetOperation() == OPERATION_AJAX_REQUERT_INLINE_EDIT) { if (isset($this->editOperationColumn)) { $this->editOperationColumn->ProcessMessages(); } } elseif (GetOperation() == OPERATION_AJAX_REQUERT_INLINE_INSERT) { if (isset($this->insertOperationColumn)) { $this->insertOperationColumn->ProcessMessages(); } } }
public function PrepareEditorControl() { if (GetOperation() == OPERATION_EDIT || GetOperation() == OPERATION_AJAX_REQUERT_INLINE_EDIT) { $this->GetEditControl()->SetLink($this->GetFullImageLink()); } }
private function ExtractOrderValues() { if (GetApplication()->IsGETValueSet('order')) { $orderValue = GetApplication()->GetGETValue('order'); if (!is_array($orderValue)) { $orderValue = array($orderValue); } $this->setOrderByParameter($orderValue); $this->SetSessionVariable($this->internalName . '_sorting', $orderValue); } elseif (GetOperation() == 'resetorder') { $this->UnSetSessionVariable($this->internalName . '_sorting'); $this->ApplyDefaultOrder(); } elseif ($this->IsSessionVariableSet($this->internalName . '_orderColumnFieldName')) { // TODO: this condition was added to support version 14.10.0.7 where sorting was realized by one column only. // In that version field name and order type of sorted column saved to session in parameters .._orderColumnFieldName and.. _orderType respectively // if these parameters were set we use it for sorting one time, deleted it from session and saved sorted columns by a new way. $orderColumnFieldName = $this->GetSessionVariable($this->internalName . '_orderColumnFieldName'); $orderType = $this->GetSessionVariable($this->internalName . '_orderType'); $this->UnSetSessionVariable($this->internalName . '_orderColumnFieldName'); $this->UnSetSessionVariable($this->internalName . '_orderType'); $orderValue = array(substr($orderType, 0, 1) . $orderColumnFieldName); $this->setOrderByParameter($orderValue); $this->SetSessionVariable($this->internalName . '_sorting', $orderValue); } elseif ($this->IsSessionVariableSet($this->internalName . '_sorting')) { $sessionValue = $this->GetSessionVariable($this->internalName . '_sorting'); $this->setOrderByParameter($sessionValue); } else { $this->ApplyDefaultOrder(); } }
public function ProcessMessages() { $this->hiddenValues = $this->GetPage()->GetHiddenGetParameters(); if ($this->IsRequestParameterSet('ResetFilter') && $this->GetRequestParameter('ResetFilter') == '1' || GetOperation() == 'resetall' || $this->IsAdvancedSearchOperation()) { $this->ResetFilter(); } else { if (GetApplication()->GetSuperGlobals()->IsSessionVariableSet($this->name . 'SearchField')) { $this->ExtractValuesFromSession(); } if ($this->IsRequestParameterSet('SearchField')) { $this->ExtractValuesFromPost(); } if ($this->IsSearchVariablesComletelySet()) { $this->ApplyFilterToDataset(); } } }