|
From: <jm...@us...> - 2006-02-10 08:00:05
|
Update of /cvsroot/struts/struts-site/src/documentation/content/xdocs/strutsdialogs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30714/src/documentation/content/xdocs/strutsdialogs Modified Files: dialogaction-logincomponentsample.xml dialogaction.xml index.xml Log Message: Index: dialogaction-logincomponentsample.xml =================================================================== RCS file: /cvsroot/struts/struts-site/src/documentation/content/xdocs/strutsdialogs/dialogaction-logincomponentsample.xml,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** dialogaction-logincomponentsample.xml 4 Aug 2005 08:18:47 -0000 1.4 --- dialogaction-logincomponentsample.xml 10 Feb 2006 07:59:51 -0000 1.5 *************** *** 3,7 **** <document> <header> ! <title>Login Component example</title> </header> --- 3,7 ---- <document> <header> ! <title>Multi-State Login Dialog example</title> </header> *************** *** 9,18 **** <section id="overview"> <title>overview</title> ! <p>Login component is an extension of <link href="dialogaction-logindialogsample.html">login dialog</link>. It not only allows to log in, it also ! tracks user's login status. Whenever a logged-in user navigates to login component location, ! the component displays user information and allows to log out.</p> ! <p>Converting a login dialog into login component is easy. We need to track two different states of a user, and to change the mapping for result pages, because now we have two pages instead of one.</p> --- 9,18 ---- <section id="overview"> <title>overview</title> ! <p>Muliti-state and multi-view login dialog is an extension of <link href="dialogaction-logindialogsample.html">single-state login dialog</link>. It not only allows to log in, it also ! tracks user's login status. Whenever a logged-in user navigates to login dialog's location, ! the login dialog displays user information and allows to log out.</p> ! <p>Converting a single-state login dialog into multi-state login dialog is easy. We need to track two different states of a user, and to change the mapping for result pages, because now we have two pages instead of one.</p> *************** *** 26,30 **** <title>Action Class</title> ! <p>Because login component has two views instead of one, we need to override <code>getView</code> method and to return proper mapping for each user state.</p> <source> --- 26,30 ---- <title>Action Class</title> ! <p>Because new login dialog has two views instead of one, we need to override <code>getView</code> method and to return proper mapping for each user state.</p> <source> *************** *** 121,125 **** <title>Live Demo</title> ! <p><link href="http://www.superinterface.com/strutsdialog/logincomponent.html">Login Control live demo</link></p> </section> --- 121,125 ---- <title>Live Demo</title> ! <p><link href="http://www.superinterface.com/strutsdialog/logincomponent.html">Live demo of multi-state login dialog</link></p> </section> Index: dialogaction.xml =================================================================== RCS file: /cvsroot/struts/struts-site/src/documentation/content/xdocs/strutsdialogs/dialogaction.xml,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** dialogaction.xml 22 Jul 2005 01:38:00 -0000 1.6 --- dialogaction.xml 10 Feb 2006 07:59:51 -0000 1.7 *************** *** 9,19 **** <section id="overview"> <title>Overview</title> ! <p>DialogAction is an abstract <strong>Action</strong>, which is used to create ! web components and web dialogs. It is based on <link href="selectaction.html">SelectAction</link> and adds the following functionality:</p> <ul> <li>handles initialization event;</li> <li>buffers error messages;</li> ! <li>renders view corresponding to component state;</li> <li>stores state (in an action form);</li> <li>separates input and output processes (using POST-redirect-GET pattern)</li> --- 9,19 ---- <section id="overview"> <title>Overview</title> ! <p>DialogAction is an abstract <strong>Action</strong>, which is used as a web resource "code-behind" class. ! It is based on <link href="selectaction.html">SelectAction</link> and adds the following functionality:</p> <ul> <li>handles initialization event;</li> <li>buffers error messages;</li> ! <li>renders view corresponding to resource state;</li> <li>stores state (in an action form);</li> <li>separates input and output processes (using POST-redirect-GET pattern)</li> *************** *** 33,39 **** <p>DialogAction has three different modes of operation:</p> <ul> ! <li><em>component initialization</em> event prepares component for use with new set of data;</li> ! <li><em>user input</em> phase accepts input data, updates domain model, generates error messages;</li> ! <li><em>view rendering</em> phase generates a result page.</li> </ul> <!-- --- 33,39 ---- <p>DialogAction has three different modes of operation:</p> <ul> ! <li>it sets up web resourse when it receives <em>initialization event</em>;</li> ! <li>it accepts input data, updates domain model and generates error messages on <em>input</em> phase</li> ! <li>it generates a result page during <em>render</em> phase.</li> </ul> <!-- *************** *** 46,50 **** nicely corresponds to HTTP specifications, separating input and output phases by request method:</p> <ul> ! <li>browser submits input data to component using POST request;</li> <li>DialogAction accepts input and redirects browser to the location of result page;</li> <li>browser loads result page using GET request.</li> --- 46,50 ---- nicely corresponds to HTTP specifications, separating input and output phases by request method:</p> <ul> ! <li>browser submits input data using POST request;</li> <li>DialogAction accepts input and redirects browser to the location of result page;</li> <li>browser loads result page using GET request.</li> *************** *** 88,92 **** field, browser sends GET request to the server. When DialogAction receives GET request, which does not contain event parameter, it renders a page. In case of simple dialogs, this would be default view. ! In case of multi-page component, this would be a page, corresponding to current component state. The page usually contains HTML form, which accepts user data.</p> --- 88,92 ---- field, browser sends GET request to the server. When DialogAction receives GET request, which does not contain event parameter, it renders a page. In case of simple dialogs, this would be default view. ! In case of multi-page resource this would be a page, corresponding to current resource state. The page usually contains HTML form, which accepts user data.</p> *************** *** 96,105 **** <p>In case of error, the handler saves errors in the session and redirects to ! the same action. This is called <em>component reloading</em>. It does not cause infinite loop, because request for data submission has POST type, while redirected request for action ! reloading is automatically converted to GET type. GET request does not cause component reloading. Instead, when DialogAction receives GET request, it renders a view, corresponding to current ! state. The lifecycle repeats until the component decides to hand control over to another ! component, usually when user input does not contain errors.</p> <source> --- 96,105 ---- <p>In case of error, the handler saves errors in the session and redirects to ! the same action. This is called <em>resource reloading</em>. It does not cause infinite loop, because request for data submission has POST type, while redirected request for action ! reloading is automatically converted to GET type. GET request does not cause reloading. Instead, when DialogAction receives GET request, it renders a view, corresponding to current ! state. The lifecycle repeats until the resource decides to hand control over to another ! resource, usually when user input does not contain errors.</p> <source> *************** *** 111,120 **** </source> ! <p>If no errors were detected and action can render a view for new component state, ! then component can either reload itself, or hand control over to another action. Redirection is a preferred way to hand over the control to prevent double submit issues. ! DialogAction has default mapping name, used for component reloading: "DIALOG-RELOAD".</p> ! <p>When a user refreshes a page, component reloads itself, and displays a view appropriate to its state. This implies that application state must be stored on server between requests. The view is rendered by <code>getView</code> method. For a simple web dialog, which has only one --- 111,120 ---- </source> ! <p>If no errors were detected and action can render a view for new resource state, ! then resource can hand control over to another action. Redirection is a preferred way to hand over the control to prevent double submit issues. ! DialogAction has default mapping name, used for resource reloading: "DIALOG-RELOAD".</p> ! <p>When a user refreshes a page, DialogAction reloads itself, and displays a view appropriate to its state. This implies that application state must be stored on server between requests. The view is rendered by <code>getView</code> method. For a simple web dialog, which has only one *************** *** 123,149 **** mapping. See example above.</p> ! <p>Do not use redirection for a view. If you create more complex web component with several views, you need to override <code>getView</code> method and return a proper ! mapping for each component state.</p> ! <p>DialogAction has an option to reset the component when it receives new portion of data submitted with POST request. POST request method signals that browser submits new ! data instead of loading existing information. But sometimes component has to be reset with GET method, if it is navigated using hyperlink. DialogAction needs to distinguish these situations:</p> <ul> ! <li>reset component and fill it with new data;</li> ! <li>navigate to component using a "clean" link;</li> ! <li>refresh a component explicitly;</li> ! <li>automatically reload a component as the second phase of input processing.</li> </ul> ! <p>DialogAction uses event parameter as flag for component that it can be reset. ! Three other situations: "clean" linking, refreshing and component reloading are treated the same, because request does not contain event parameter in all three cases. In these ! cases DialogAction renders a view, corresponding to current component state.</p> ! <p>In plain words the above means that navigating to a component via link, which does not ! have event key as query parameter, displays current state of component but does not initialize ! it. See live demos for details, and pay attention to component URLs.</p> </section> --- 123,149 ---- mapping. See example above.</p> ! <p>Do not use redirection for a view. If you create more complex web resource with several views, you need to override <code>getView</code> method and return a proper ! mapping for each resource state.</p> ! <p>DialogAction has an option to reset the resource when it receives new portion of data submitted with POST request. POST request method signals that browser submits new ! data instead of loading existing information. But sometimes resource has to be reset with GET method, if it is navigated using hyperlink. DialogAction needs to distinguish these situations:</p> <ul> ! <li>reset resource and fill it with new data;</li> ! <li>navigate to resource using a "clean" link;</li> ! <li>refresh a resource explicitly;</li> ! <li>automatically reload a resource as the second phase of input processing.</li> </ul> ! <p>DialogAction uses event parameter as flag for resource that it can be reset. ! Three other situations: "clean" linking, refreshing and resource reloading are treated the same, because request does not contain event parameter in all three cases. In these ! cases DialogAction renders a view, corresponding to current resource state.</p> ! <p>In plain words the above means that navigating to a resource via link, which does not ! have event key as query parameter, displays current state of resource but does not initialize ! it. See live demos for details, and pay attention to resource URLs.</p> </section> *************** *** 163,169 **** <p>The following examples show how DialogAction can be used:</p> <ul> ! <li><link href="dialogaction-logindialogsample.html">Login Dialog</link></li> ! <li><link href="dialogaction-logincomponentsample.html">Login Component</link></li> <li><link href="dialogaction-logincontrolsample.html">Login Control</link></li> </ul> </section> --- 163,171 ---- <p>The following examples show how DialogAction can be used:</p> <ul> ! <li><link href="dialogaction-logindialogsample.html">Single-state Dialog</link></li> ! <li><link href="dialogaction-logincomponentsample.html">Multi-state Dialog</link></li> ! <!-- <li><link href="dialogaction-logincontrolsample.html">Login Control</link></li> + --> </ul> </section> Index: index.xml =================================================================== RCS file: /cvsroot/struts/struts-site/src/documentation/content/xdocs/strutsdialogs/index.xml,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** index.xml 18 Nov 2005 00:34:15 -0000 1.17 --- index.xml 10 Feb 2006 07:59:51 -0000 1.18 *************** *** 24,29 **** <li><strong>Easier configuration</strong> - improved request/response cycle is controlled with less XML markup and fewer Java classes.</li> - <li><strong>Component development</strong> - either standalone or visually embedded components - without portal engine and portlet API.</li> <li><strong>Web Wizards</strong> - controlled flow of web pages for a given web resource, similar to traditional desktop wizard dialogs.</li> --- 24,27 ---- *************** *** 134,137 **** --- 132,136 ---- </section> + <!-- <section id="components"> <title>Component Development</title> *************** *** 176,180 **** <link href="http://www.superinterface.com/strutsdialog/logincontrol.html">login control</link>.</p> </section> ! <section id="actions"> <title>Actions</title> --- 175,179 ---- <link href="http://www.superinterface.com/strutsdialog/logincontrol.html">login control</link>.</p> </section> ! --> <section id="actions"> <title>Actions</title> |