Sets the current page.<p>

@param currentPage the current page to set

@throws CmsIllegalArgumentException if the argument is invalid
979706
public void setCurrentPage(int currentPage) throws CmsIllegalArgumentException {

        if (getSize() != 0) {
            if ((currentPage < 1) || (currentPage > getNumberOfPages())) {
                throw new CmsIllegalArgumentException(
                    Messages.get().container(Messages.ERR_LIST_INVALID_PAGE_1, new Integer(currentPage)));
            }
        }
        m_currentPage = currentPage;
    }
198437
public void setPage(int offset, int length) {
		if (this.delegate != null)
			this.delegate.setPage(offset, length);
		else {
			boolean changed = this.pageOffset != offset || this.pageLength != length;
			if (changed) {
				this.pageOffset = offset;
				this.pageLength = length;
				this.pageChanged = true;
			}
		}
		QueryRecorder.recordInvocation(this, "setPage", Void.TYPE,
				QueryRecorder.literal(offset), QueryRecorder.literal(length));
	}
911902
public void init(CmsObject cms) {

        m_cms = cms;
        m_result = null;
        m_lastException = null;
        m_pageCount = 0;
        m_nextUrl = null;
        m_prevUrl = null;
    }
434296
public void setPath(String path) {

        if (CmsStringUtil.isEmpty(path) || !path.trim().equals(path)) {
            throw new CmsIllegalArgumentException(Messages.get().container(Messages.ERR_BAD_FILE_NAME_1, path));
        }
        m_path = path;
    }
676584
function (page) {
            var state = this.state;
            if (state.currentPage !== page) {
                // page has changed
                state.currentPage = page;
                this.updateVisiblePages();
                scope.broadcast('pagefocus', {
                    page: state.currentPage,
                    numPages: this.numPages,
                    visiblePages: util.extend([], state.visiblePages),
                    fullyVisiblePages: util.extend([], state.fullyVisiblePages)
                });
            } else {
                // still update visible pages!
                this.updateVisiblePages();
            }
        }
636920
private void setCurrent(Map<String, Object> current) {
        if (current instanceof Context) {
            throw new IllegalArgumentException("Don't using the " + Context.class.getName()
                    + " object as a parameters, it's implicitly delivery by thread-local. parameter context: "
                    + ((Context) current).thread.getName() + ", current context: " + thread.getName());
        }
        this.current = current;
    }
572985
public static void setCurrent(SiteContext current) {
        threadLocal.set(current);

        MDC.put(SITE_NAME_MDC_KEY, current.getSiteName());
    }
1164021
@Override
  public int setPageID(P page) {
    int pageID = page.getPageID();
    if(pageID == -1) {
      pageID = getNextEmptyPageID();
      if(pageID == -1) {
        pageID = nextPageID++;
      }
      page.setPageID(pageID);
    }
    return pageID;
  }
430570
public void setWorkPath(String workPath) throws CmsIllegalArgumentException {

        if (CmsStringUtil.isEmptyOrWhitespaceOnly(workPath)) {
            throw new CmsIllegalArgumentException(Messages.get().container(Messages.GUI_ERR_WIDGETVALUE_EMPTY_0));
        }
        // test if it is a valid path:
        if (!m_cms.existsResource(workPath)) {
            throw new CmsIllegalArgumentException(
                Messages.get().container(Messages.GUI_ERR_TAGREPLACE_WORKPATH_1, workPath));
        }
        m_workPath = workPath;

    }
846463
public function setPage($page = null)
    {
        // The following argument formats are supported:
        //
        // null = set current page
        // '.' = set current page
        // 'page' = sets webroot/page.html
        // './page' = set page relatively to current page
        // '..' = parent page
        // '../page' = page besides our own (foo/bar -> foo/page)
        // 'index' = properly points to the index page defined in APP
        // '/admin/' = will not be converted

        /** @type $this->app App_Web */

        $destination = '';

        if (is_null($page)) {
            $page = '.';
        }

        foreach (explode('/', $page) as $component) {
            if ($component == '') {
                continue;
            }
            if ($component == '.' && $destination == '') {
                if ($this->app->page == 'index') {
                    continue;
                }
                $destination = str_replace('_', '/', $this->app->page);
                continue;
            }

            if ($component == '..') {
                if (!$destination) {
                    $destination = str_replace('_', '/', $this->app->page);
                }
                $tmp = explode('/', $destination);
                array_pop($tmp);
                $destination = implode('/', $tmp);
                continue;
            }

            if ($component == 'index' && $destination == '') {
                $destination = $this->app->index_page;
                continue;
            }

            $destination = $destination ? $destination.'/'.$component : $component;
        }
        if ($destination === '') {
            $destination = @$this->app->index_page;
        }

        $this->page = $destination;

        // check if it's current page
        list($p, $ap) = str_replace('/', '_', array($this->page, $this->app->page));
        $this->_current = ($p == $ap); // page exactly match
        $this->_current_sub = ($p == substr($ap, 0, strlen($p)) && isset($ap[strlen($p)]) && $ap[strlen($p)] == '_'); // first part of page match followed by separator

        return $this;
    }
305994
public function setCurrentPageID($id)
    {
        $this->pageID = $id;
        $id = (int)$id;
        /** @deprecated */
        $this->getRequest()->getSession()->set($this->sessionNamespace() . ".currentPage", $id);
    }
1223364
public void resetPage() {

        CmsConfirmDialog dialog = new CmsConfirmDialog(
            Messages.get().key(Messages.GUI_DIALOG_RESET_TITLE_0),
            "<p>" + Messages.get().key(Messages.GUI_DIALOG_PAGE_RESET_0) + "</p>");
        dialog.setCloseText(Messages.get().key(Messages.GUI_BUTTON_CANCEL_TEXT_0));
        dialog.setOkText(Messages.get().key(Messages.GUI_BUTTON_DISCARD_TEXT_0));
        dialog.setHandler(new I_CmsConfirmDialogHandler() {

            /**
             * @see org.opencms.gwt.client.ui.I_CmsCloseDialogHandler#onClose()
             */
            public void onClose() {

                deactivateCurrentButton();
                activateSelection();
            }

            /**
             * @see org.opencms.gwt.client.ui.I_CmsConfirmDialogHandler#onOk()
             */
            public void onOk() {

                m_controller.resetPage();
            }
        });
        dialog.center();
    }
717159
protected void setActivePage(ApplicationPage page) {
    	getPage().getControl();
    	loadLayoutData(page.getId());
    	((JideApplicationPage)getPage()).updateShowViewCommands();
	}
62883
public function setCurrentPage($page) {
		$this->_currentPage = (int) $page;
		
		if ($this->_currentPage < 1) {
			throw new RuntimeException('Page number can\'t be zero or negative');
		}
		
		$this->reset();
		
		return $this;
	}
631537
protected function setCurrentPage($currentPage, $lastPage)
	{
		$currentPage = $currentPage ?: static::resolveCurrentPage();

		// The page number will get validated and adjusted if it either less than one
		// or greater than the last page available based on the count of the given
		// items array. If it's greater than the last, we'll give back the last.
		if (is_numeric($currentPage) && $currentPage > $lastPage)
		{
			return $lastPage > 0 ? $lastPage : 1;
		}

		return $this->isValidPageNumber($currentPage) ? (int) $currentPage : 1;
	}
19042
public synchronized void setCms(CmsObject cms) {

        if (m_perThreadCmsObject == null) {
            m_perThreadCmsObject = new ThreadLocal<CmsObject>();
        }
        m_perThreadCmsObject.set(cms);
    }
1351260
protected function setCurrentPage($currentPage, $pageName)
    {
        $currentPage = $currentPage ?: static::resolveCurrentPage($pageName);

        return $this->isValidPageNumber($currentPage) ? (int) $currentPage : 1;
    }