Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Struts Wiki" for change 
notification.

The following page has been changed by MichaelJouravlev:
http://wiki.apache.org/struts/StrutsManualActionWebComponent

------------------------------------------------------------------------------
  
  '''Attention: this page describes functionality that is not yet available! 
Work in progress!'''
  
- Struts 1.4 allows building portlet-like web components using JSP as view 
technology. ''Struts web component'' is an independent server-side object that 
accepts user input via Action class, and renders itself via JSP file. In a 
sense, Struts web component is a portlet.
+ Struts 1.4 allows building portlet-like web components. A web component is an 
independent server-side object that is able to accept user input and to render 
itself. ''Struts web component'' uses Action class to process incoming events, 
and employs JSP technology to render a view.
  
  A Struts Web Component is a combination of:
   * one Action class that handles input events and updates component state;
+  * one or more JSP files that represent one or more subviews;
-  * an optional form bean that holds input/output data;
+  * an optional form bean that holds input/output data.
-  * one or more views that can be represented with one or more JSP files.
- 
- Struts approach to web components has the following features:
- 
-    * Allows composing a page out of one or more independent components.
-    * Renders a view that is always synchronized with application state.
-    * Solves major issues related to stale pages and double submits.
-    * Delivers input directly to a component, no central controller is needed
-    * Ensures that every component renders itself independently.
-    * Updates page incrementally without full page refresh if browser has 
Javascript turned on and XMLHTTPRequest is available.
-    * Seamlessly integrates with Struts, enhancing a well-known action 
framework with component technology.
  
  == Use Case: Home Page With Login Component ==
  
+ Consider a website that has a login form located in a highly visible part of 
the website. The login form allows a user to log in and thus to gain access to 
protected area of the website. A non-logged-in user must be presented with 
login form, a logged-in user should be able to log out. The screenshot from 
www.java.net website illustrates this use case.
- Consider the following use case: a website has a home page that should have 
different content for regular visitors one one hand, and for logged in users 
for another hand. The page contains login/logout form. A non-logged-in user 
must be presented with login, while a logged-in user should be able to log out.
- 
- The picture below illustrates this use case. Of course, since it is just an 
example, the login component is almost as large as the composite page itself, 
but the idea is the same: to design a component that does not have to know the 
location of a composite page it is included into.
  
  inline:login-component-sm.gif
  

Reply via email to