From f4de82bcdafba51e4eed9cae6b2d3e5375ffd115 Mon Sep 17 00:00:00 2001 From: xue <> Date: Tue, 9 May 2006 12:11:38 +0000 Subject: --- demos/quickstart/protected/pages/Advanced/State.page | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'demos/quickstart/protected/pages/Advanced/State.page') diff --git a/demos/quickstart/protected/pages/Advanced/State.page b/demos/quickstart/protected/pages/Advanced/State.page index 8d69d6a4..051090e9 100644 --- a/demos/quickstart/protected/pages/Advanced/State.page +++ b/demos/quickstart/protected/pages/Advanced/State.page @@ -1,11 +1,11 @@ -

Persistent State

+

Persistent State

Web applications often need to remember what an end user has done in previous page requests so that the new page request can be served accordingly. State persistence is to address this problem. Traditionally, if a page needs to keep track of user interactions, it will resort to session, cookie, or hidden fields. PRADO provides a new line of state persistence schemes, including view state, control state, and application state.

-

View State

+

View State

View state lies at the heart of PRADO. With view state, Web pages become stateful and are capable of restoring pages to the state that end users interacted with before the current page request. Web programming thus resembles to Windows GUI programming, and developers can think continuously without worrying about the roundtrips between end users and the Web server. For example, with view state, a textbox control is able to detect if the user input changes the content in the textbox.

@@ -22,7 +22,7 @@ where $this refers to the control object, Caption is a unique $caption = $this->getViewState('Caption'); -

Control State

+

Control State

Control state is like view state in every aspect except that control state cannot be disabled. Control state is intended to be used for storing crucial state information without which a page or control may not work properly.

@@ -34,7 +34,7 @@ $this->setControlState('Caption',$caption); $caption = $this->getControlState('Caption'); -

Application State

+

Application State

Application state refers to data that is persistent across user sessions and page requests. A typical example of application state is the user visit counter. The counter value is persistent even if the current user session terminates. Note, view state and control state are lost if the user requests for a different page, while session state is lost if the user session terminates.

@@ -46,7 +46,7 @@ $application->setGlobalState('Caption',$caption); $caption = $application->getGlobalState('Caption'); -

Session State

+

Session State

PRADO encapsulates the traditional session management in THttpSession module. The module can be accessed from within any component by using $this->Session, where $this refers to the component object.

-- cgit v1.2.3