Added: empire-db/site/legacy/struts2ext/rendering_parsing.htm
URL: 
http://svn.apache.org/viewvc/empire-db/site/legacy/struts2ext/rendering_parsing.htm?rev=1898936&view=auto
==============================================================================
--- empire-db/site/legacy/struts2ext/rendering_parsing.htm (added)
+++ empire-db/site/legacy/struts2ext/rendering_parsing.htm Mon Mar 14 20:41:26 
2022
@@ -0,0 +1,294 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
+<html xmlns="http://www.w3.org/1999/xhtml"; xml:lang="en-gb" lang="en-gb" >
+<!-- #BeginTemplate "../main.dwt" -->
+<head>
+       <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+       <meta http-equiv="language" content="en" />
+       <meta name="robots" content="index, follow" />
+       <meta name="keywords" content="java, jar, jdbc, sql, data, metadata, 
persistence, rdbms, orm, mapping" />
+       <meta name="description" content="Open Source relational data 
persistence component." />
+       
+       <!-- #BeginEditable "doctitle" -->
+<title>Empire-db and Struts2 - Rendering and parsing</title>
+       <!-- #EndEditable -->
+       
+       <script type="text/javascript" src="../js/prototype.js"></script>
+       <script type="text/javascript" src="../js/menu.js"></script>
+       <!-- #BeginEditable "javascripts" -->
+       <!-- #EndEditable -->
+       
+       <link rel="shortcut icon" href="../empire-db.ico" />
+       <link rel="stylesheet" href="../css/layout.css" type="text/css" />
+       <!-- #BeginEditable "stylesheets" -->
+       <!-- #EndEditable -->
+</head>
+
+<body>
+<div id="wrapper">
+
+       <!-- Header -->
+       <div id="header">
+               <div id="logo">
+                       <img src="../images/logos/empire-db-logo.gif" 
alt="Empire-db: The relational data persistence component." />
+               </div>
+               <div id="asf">
+                       <a id="asfhome" target="_blank" 
href="https://www.apache.org";><img src="../images/logos/feather-small.gif" 
alt="The Apache Software Foundation" /></a>
+                       <label for="asfhome" >The Apache Software 
Foundation</label>
+               </div>
+               <div style="clear:both"></div>
+       </div>
+       
+       <!-- Top -->
+       <div id="top">
+               <div id="topbar">&nbsp;</div>
+       </div>
+       
+       <!-- Middle -->
+       <div id="middle">
+               <div id="left">    
+                               <div id="menuBox">     
+                                       <ul id="mainMenu">
+                                               <li id="menu_home"><a 
href="../index.html">Home</a></li>
+                                               <li id="menu_news"><a 
href="../news.htm">News</a></li>
+                                               <li id="menu_empiredb"><a 
href="../empiredb/empiredb.htm">Empire-db</a>
+                                                               <ul 
class="subMenu">
+                                                                       <li 
id="menu_empiredb_extending_pattern"><a href="../empiredb/pattern.htm">The 
Empire DAO-<br />pattern</a></li>
+                                                                       <li 
id="menu_empiredb_handling_metadata"><a 
href="../empiredb/metadata.htm">Handling data and metadata</a></li>
+                                                                       <li 
id="menu_empiredb_wrong"><a href="../empiredb/hibernate.htm">What's wrong with 
Hibernate and JPA</a></li>
+                                                                       <li 
id="menu_empiredb_stringfree"><a href="../empiredb/stringfree.htm">The 
principle of<br/>string-free coding</a></li>
+                                                                       <li 
id="menu_empiredb_faq"><a href="../empiredb/faq.htm">FAQ</a></li>
+                                                               </ul>
+                                               </li>
+                                               <li id="menu_struts2ext"><a 
href="struts2ext.htm">Empire-db and Struts2</a>
+                                                       <ul class="subMenu">
+                                                               <li 
id="menu_struts2ext_forms_controls"><a href="forms_controls.htm">Forms and 
controls</a></li>
+                                                               <li 
id="menu_struts2ext_rendering_parsing"><a 
href="rendering_parsing.htm">Rendering and parsing</a></li>
+                                                               <!--<li 
id="menu_struts2ext_tag_reference"><a href="struts2ext/tag_reference.htm">Tag 
reference</a></li>-->
+                                                               <li 
id="menu_struts2ext_input_controls"><a href="input_controls.htm">Input 
controls</a></li>
+                                                       </ul>
+                                               </li>
+                                               <li id="menu_downloads"><a 
href="../downloads/latest.htm">Downloads</a>
+                                                               <ul 
class="subMenu">
+                                                                       <li 
id="menu_downloads_previous"><a href="../downloads/previous.htm">Previous 
releases</a></li>
+                                                                       <li 
id="menu_downloads_license"><a href="../downloads/license.htm">License</a></li>
+                                                               </ul>
+                                               </li>
+                                               <li id="menu_documentation"><a 
href="../documentation/documentation.htm">Documentation</a>                     
                 
+                                                       <ul class="subMenu">
+                                                               <li 
id="menu_documentation_class_overview"><a 
href="../documentation/class_overview.htm">Empire-db class<br 
/>overview</a></li>
+                                                               <li 
id="menu_documentation_tutorials"><a 
href="../documentation/tutorial.htm">Tutorial</a></li>
+                                                               <li 
id="menu_documentation_getting_started"><a 
href="../documentation/getting_started.htm">Getting started</a></li>
+                                                               <li 
id="menu_documentation_reverse_engineering"><a 
href="../documentation/reverse_engineering.htm">Reverse Engineering</a></li>
+                                                               <li 
id="menu_documentation_api"><a href="../documentation/api.htm">API</a></li>
+                                                       </ul>
+                                               </li>
+                                               <li id="menu_community"><a 
href="../community/community.htm">Community</a>                                 
     
+                                                       <ul class="subMenu">
+                                                               <li 
id="menu_community_mailing_lists"><a 
href="../community/mailing_lists.htm">Mailing lists</a></li>
+                                                               <li 
id="menu_community_source_code"><a href="../community/source_code.htm">Source 
code</a></li>
+                                                               <li 
id="menu_community_jira"><a href="../community/jira.htm">Ticketing &amp; 
Wiki</a></li>
+                                                               <!--<li 
id="menu_community_road_map"><a href="community/road_map.htm">Road 
map</a></li>-->
+                                                               <li 
id="menu_community_contributors"><a 
href="../community/contributors.htm">Contributors</a></li>
+                                                       </ul>
+                                               </li>
+                                               <li id="menu_apache"><a 
href="../apache.htm">About Apache</a>
+                                                       <ul class="subMenu">
+                                                               <li 
id="menu_apache_home"><a href="https://www.apache.org";>Apache home<span 
class="asflink">&nbsp;</span></a></li>
+                                                               <li 
id="menu_apache_donate"><a 
href="https://www.apache.org/foundation/sponsorship.html";>Sponsorship<span 
class="asflink">&nbsp;</span></a></li>
+                                                               <li 
id="menu_apache_thanks"><a 
href="https://www.apache.org/foundation/thanks.html";>Foundation thanks<span 
class="asflink">&nbsp;</span></a></li>
+                                                               <li 
id="menu_apache_security"><a 
href="https://www.apache.org/security/";>Security<span 
class="asflink">&nbsp;</span></a></li>
+                                                       </ul>
+                                               </li>
+                                               <li id="menu_disclaimer"><a 
href="https://www.apache.org/licenses/";>License<span 
class="asflink">&nbsp;</span></a></li>
+                                       </ul>
+                               </div>
+                               
+               </div>
+       
+               <!-- #BeginEditable "menu" -->  
+               <script type="text/javascript">
+                       var menu = new Menu( 'mainMenu', 'menu_struts2ext', 
'menu_struts2ext_rendering_parsing' );
+                       var prev_page = "forms_controls.htm";
+               </script>
+               <!-- #EndEditable -->
+               <script type="text/javascript">
+                       /* <![CDATA[ */
+                       if( menu ) {
+                               // Menu fully opened (comment out if not wanted)
+                               // menu.openAll();
+                       /* ]]> */
+                       }
+               </script>
+       
+               <div id="main">         
+                       
+                       <div id="pathway">
+                               <span style="float:left">
+                       <!-- #BeginEditable "pathway" -->
+                       <a href="struts2ext.htm">Empire-db and Struts2</a> 
&raquo; Rendering and parsing
+               <!-- #EndEditable -->
+                       </span>
+                       <a id="downloadLink" href="../downloads/latest.htm" 
style="float:right">Download</a>
+               </div>
+                       
+                       <div id="content">
+                       <!-- #BeginEditable "content" -->
+                       <h1>Input controls part 2 – Rendering and parsing</h1>
+                       <p> One of the biggest problems in Web development is 
that usually the code responsible 
+                               for rendering data is separated from the code 
used for parsing and validating data. 
+                               In most cases the rendering is performed in a 
JSP page, either by directly embedding string 
+                               representation of the value in HTML or by a 
special JSP tag that renders the value 
+                               according to information provided with 
attributes on the tag. When the user submits the 
+                               form the values are usually pushed into a 
JavaBean or POJO by an interceptor which takes the 
+                               parameters from the request, looks for an 
appropriate setter method and then converts 
+                               the value to fit the setter’s value data 
type.</p>
+                       <p> This procedure has several disadvantages that are 
best understood by the following example:<br />
+                               Consider a phone number which is stored in the 
database in a single field. On the form however 
+                               you want to display and edit the phone number 
in three individual text fields: the first for the 
+                               country code, the second for the city code and 
the last for the extension code which are separated 
+                               from each other using a dash. The first problem 
with traditional Web application frameworks is, 
+                               that since there is no tag for such behaviour 
you have to write all the HTML code for those three 
+                               separate input tags plus the label in your JSP. 
Even worse however is, that when the form is 
+                               submitted three individual fields are supplied 
that you have to assemble to a single value again. 
+                               Now for this you have several options which are 
all quite complicated for such a simple task. If you 
+                               don’t want to provide your own interceptor 
you will have to provide corresponding setters on your JavaBean and – if you 
don’t want to rely on the order by which these setters are called -  you’d 
+                               have to add additional post processing code 
that will put them together again. Still the assembly 
+                               code must rely on the rendering code which is 
in the JSP and thus not in the same place. As a third 
+                               problem you’ll find the task of validation 
– for which you might have to write your own validation 
+                               class. At last, all this has to be done for 
every single phone number field you have in your 
+                               application. Imagine you have several phone 
number fields then handling 
+                       all of them becomes quite a nasty 
+                               problem.</p>
+                       <p> With Empire-Struts2-Extensions the task of 
rendering and the task of parsing and validating form 
+                               values are now put together in one simple 
class: The input control. The input control is an abstract 
+                               base class for which you can easily provide 
your own implementation if necessary by only implementing 
+                               three simple methods: 
<code>renderText()</code>, <code>renderInput()</code> and 
<code>getFieldValue()</code>. 
+                               For the most common field types there are 
already implementations provided such as text, select, password, phone, 
checkbox and more. 
+                               The major differences to traditional processing 
are:</p>
+                       <ol>
+                               <li>The input control has access to field 
metadata and can thus perform rendering, parsing and 
+                                       validation without additional redundant 
information provided in the view. However should you ever 
+                                       need it, you may as well override these 
attributes in your JSPs.</li>
+                               <li>The input control class distinguishes 
between read only and editable rendering and can thus also 
+                                       be used for list views for example. 
Consider a field whose value you have 
+                               to format in a 
+                                       particular way for display. Simply 
write your own input control class and assign the control 
+                                       type to the corresponding column. 
Wherever a value for this field is displayed with any of the Empire tags 
+                                       it will be formatted correctly – 
without any change or additional 
+                               attributes in the JSPs. </li>
+                               <li>For processing submitted form data the 
input control uses a pull rather than the usual push 
+                                       approach. This allows the input control 
to combine two or more fields to one value. This 
+                                       is e.g. used for checkboxes where an 
additional hidden value is used to detect whether the 
+                                       checkbox has been unchecked. Since the 
rendering code is in the same object both the splitting 
+                                       and the assembly can easily be kept 
consistent.</li>
+                       </ol>
+                       <p>The following graphic shows how the InputControl is 
the interface 
+                       between the view and the model:</p>
+                       <img style="display: block; margin: auto;" 
src="../images/diagrams/function_of_input_control.gif" alt="" />
+                       
+                       <p>The list view JSP uses the 
<code>&lt;e:value&gt;</code> tag (or alternatively an <code>&lt;e:td&gt;</code> 
+                       tag which extends <code>&lt;e:value&gt;</code>) to 
render the field&#39;s value for 
+                       display. The form view on contrary uses the 
<code>&lt;e:control&gt;</code> tag to 
+                       render a form input control which may be used to change 
the value. 
+                       When the form is submitted, an action support class 
iterates through 
+                       all fields and gives the corresponding InputControl the 
opportunity 
+                       to pull the value(s) off the request and to perform 
parsing and 
+                       validation. If successful the field value is written 
back to the 
+                       record. For all three tasks access to data and metadata 
is 
+                       necessary.</p>
+
+                       <h1 id="access_logic">Writing a custom input 
control</h1>
+                       <p> The following example shows, how easily a custom 
input control 
+                       type 
+                       can be created and applied.</p>
+                       <h2> Step 1: Write your input control class. </h2>
+                       <p> Create a new class, derive it from InputControl and 
provide an implementation 
+                       for the 
+                       three methods <code>renderText()</code>, 
<code>renderInput()</code> and <code>getFieldValue()</code>. 
+                       Remember that your class must be fully stateless since 
one single instance is 
+                       shared for all fields and threads. However all 
information you 
+                       require 
+                       is provided with the parameters. Here is an outline of 
what your 
+                       class may look like:</p>        
+<pre><font color="#0000FF">public class </font>CustomInputControl <font 
color="#0000FF">extends</font> InputControl { 
+<font color="#404040">    @Override 
+</font>    <font color="#0000FF">public</font> Object getFieldValue(String 
name, RequestParamProvider request, Locale locale, DBColumn column) { … } 
+<font color="#404040">    @Override 
+</font>    <font color="#0000FF">public</font> void renderText(HtmlWriter 
writer, ValueInfo vi) { … } 
+<font color="#404040">    @Override 
+</font>    <font color="#0000FF">public</font> void renderInput(HtmlWriter 
writer, ControlInfo ci) { … } 
+}</pre>                                                        
+                       <h2> Step 2: Register your class with the 
InputControlMananger. </h2>
+                       <p> To make the Empire-Struts2-Extensions capable of 
using your 
+                       input control class you must register it with the input 
control 
+                       manager as follows:</p> 
+<pre><font color="#008000">// Register Control</font>
+InputControlManager.registerControl(<font 
color="#0000FF">&quot;custom</font><font color="#0000FF">&quot;</font>, <font 
color="#0000FF">new</font> CustomInputControl());</pre>                         
                               
+                       <h2> Step 3: Assign your input control type to database 
columns</h2>
+                       <p> Finally, assign your control type to database 
columns. To do 
+                       this, use the <code>setControlType()</code> function 
which is provided with the 
+                       DBColumn 
+                       objects. For those fields, your custom input control 
class will now 
+                       be used for rendering and form request processing.</p>  
+<pre>MyDatabase db = getDatabase();
+db.<font color="#0000FF">MYTABLE</font>.<font 
color="#0000FF">MYCOLUMN</font>.setControlType(<font 
color="#0000FF">&quot;custom</font><font color="#0000FF">&quot;</font>);</pre>  
                                                    
+                       <p>     &nbsp;</p>
+                                                               
+                               <!-- #EndEditable --></div>
+                                       
+                       <div id="nav">
+                               <hr />
+                               <div id="nav_prev">
+                                       <a id="prev" href=""><img 
src="../images/prev.gif" alt="" /> Previous Page</a> 
+                                       &nbsp;
+                               </div>
+                               <div id="nav_next">
+                                       &nbsp;
+                                       <a id="next" href="">Next Page <img 
src="../images/next.gif" alt="" /></a>
+                               </div>
+                               <div style="clear: both;"></div>
+                       </div>
+                       
+                       <script type="text/javascript">
+                       /* <![CDATA[ */
+                               if( ( typeof(prev_page) == "undefined" || 
prev_page == "" ) &&
+                                       ( typeof(next_page) == "undefined" || 
next_page == "" ) ) 
+                               {
+                                       $( 'nav' ).hide();
+                               }
+                               else 
+                               {                       
+                                       if( typeof(prev_page) != "undefined" && 
prev_page != "" ) {
+                                               $( 'prev' ).href = prev_page;
+                                               $( 'prev' ).show();
+                                       }
+                                       else {
+                                               $( 'prev' ).hide();
+                                       }
+                                       
+                                       if( typeof(next_page) != "undefined" && 
next_page !="" ) {
+                                               $( 'next' ).href = next_page;
+                                               $( 'next' ).show();
+                                       }
+                                       else {
+                                               $( 'next' ).hide();
+                                       }
+                               }
+                       /* ]]> */
+                       </script>
+
+               </div>
+
+       </div>
+       
+       <!-- Footer -->         
+       <div id="footer">
+               <div class="cr"><small>Copyright &copy; 2008-2021, The Apache 
Software Foundation</small></div>
+               <div class="tm"><small>Apache Empire-db, Empire-db, Apache, the 
Apache feather logo, and the Apache Empire-db project logo are trademarks of 
The Apache Software Foundation</small></div>
+       </div>
+
+</div>
+
+</body>
+<!-- #EndTemplate -->
+</html>
\ No newline at end of file

Propchange: empire-db/site/legacy/struts2ext/rendering_parsing.htm
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: empire-db/site/legacy/struts2ext/struts2ext.htm
URL: 
http://svn.apache.org/viewvc/empire-db/site/legacy/struts2ext/struts2ext.htm?rev=1898936&view=auto
==============================================================================
--- empire-db/site/legacy/struts2ext/struts2ext.htm (added)
+++ empire-db/site/legacy/struts2ext/struts2ext.htm Mon Mar 14 20:41:26 2022
@@ -0,0 +1,259 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
+<html xmlns="http://www.w3.org/1999/xhtml"; xml:lang="en-gb" lang="en-gb" >
+<!-- #BeginTemplate "../main.dwt" -->
+<head>
+       <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+       <meta http-equiv="language" content="en" />
+       <meta name="robots" content="index, follow" />
+       <meta name="keywords" content="java, jar, jdbc, sql, data, metadata, 
persistence, rdbms, orm, mapping" />
+       <meta name="description" content="Open Source relational data 
persistence component." />
+       
+       <!-- #BeginEditable "doctitle" -->
+<title>Empire-db and Struts2</title>
+       <!-- #EndEditable -->
+       
+       <script type="text/javascript" src="../js/prototype.js"></script>
+       <script type="text/javascript" src="../js/menu.js"></script>
+       <!-- #BeginEditable "javascripts" -->
+       <!-- #EndEditable -->
+       
+       <link rel="shortcut icon" href="../empire-db.ico" />
+       <link rel="stylesheet" href="../css/layout.css" type="text/css" />
+       <!-- #BeginEditable "stylesheets" -->
+<style type="text/css">
+
+
+table#struts2_comparison th {
+       width: 300px;
+       border: 1px #C0C0C0 solid;
+       border-bottom: 1px black solid;
+       background: #e8e8e8;
+}
+table#struts2_comparison td {
+       text-align: center;
+       border: 1px #C0C0C0 solid;
+       background: #FCFCFC;
+}
+</style>
+       <!-- #EndEditable -->
+</head>
+
+<body>
+<div id="wrapper">
+
+       <!-- Header -->
+       <div id="header">
+               <div id="logo">
+                       <img src="../images/logos/empire-db-logo.gif" 
alt="Empire-db: The relational data persistence component." />
+               </div>
+               <div id="asf">
+                       <a id="asfhome" target="_blank" 
href="https://www.apache.org";><img src="../images/logos/feather-small.gif" 
alt="The Apache Software Foundation" /></a>
+                       <label for="asfhome" >The Apache Software 
Foundation</label>
+               </div>
+               <div style="clear:both"></div>
+       </div>
+       
+       <!-- Top -->
+       <div id="top">
+               <div id="topbar">&nbsp;</div>
+       </div>
+       
+       <!-- Middle -->
+       <div id="middle">
+               <div id="left">    
+                               <div id="menuBox">     
+                                       <ul id="mainMenu">
+                                               <li id="menu_home"><a 
href="../index.html">Home</a></li>
+                                               <li id="menu_news"><a 
href="../news.htm">News</a></li>
+                                               <li id="menu_empiredb"><a 
href="../empiredb/empiredb.htm">Empire-db</a>
+                                                               <ul 
class="subMenu">
+                                                                       <li 
id="menu_empiredb_extending_pattern"><a href="../empiredb/pattern.htm">The 
Empire DAO-<br />pattern</a></li>
+                                                                       <li 
id="menu_empiredb_handling_metadata"><a 
href="../empiredb/metadata.htm">Handling data and metadata</a></li>
+                                                                       <li 
id="menu_empiredb_wrong"><a href="../empiredb/hibernate.htm">What's wrong with 
Hibernate and JPA</a></li>
+                                                                       <li 
id="menu_empiredb_stringfree"><a href="../empiredb/stringfree.htm">The 
principle of<br/>string-free coding</a></li>
+                                                                       <li 
id="menu_empiredb_faq"><a href="../empiredb/faq.htm">FAQ</a></li>
+                                                               </ul>
+                                               </li>
+                                               <li id="menu_struts2ext"><a 
href="struts2ext.htm">Empire-db and Struts2</a>
+                                                       <ul class="subMenu">
+                                                               <li 
id="menu_struts2ext_forms_controls"><a href="forms_controls.htm">Forms and 
controls</a></li>
+                                                               <li 
id="menu_struts2ext_rendering_parsing"><a 
href="rendering_parsing.htm">Rendering and parsing</a></li>
+                                                               <!--<li 
id="menu_struts2ext_tag_reference"><a href="struts2ext/tag_reference.htm">Tag 
reference</a></li>-->
+                                                               <li 
id="menu_struts2ext_input_controls"><a href="input_controls.htm">Input 
controls</a></li>
+                                                       </ul>
+                                               </li>
+                                               <li id="menu_downloads"><a 
href="../downloads/latest.htm">Downloads</a>
+                                                               <ul 
class="subMenu">
+                                                                       <li 
id="menu_downloads_previous"><a href="../downloads/previous.htm">Previous 
releases</a></li>
+                                                                       <li 
id="menu_downloads_license"><a href="../downloads/license.htm">License</a></li>
+                                                               </ul>
+                                               </li>
+                                               <li id="menu_documentation"><a 
href="../documentation/documentation.htm">Documentation</a>                     
                 
+                                                       <ul class="subMenu">
+                                                               <li 
id="menu_documentation_class_overview"><a 
href="../documentation/class_overview.htm">Empire-db class<br 
/>overview</a></li>
+                                                               <li 
id="menu_documentation_tutorials"><a 
href="../documentation/tutorial.htm">Tutorial</a></li>
+                                                               <li 
id="menu_documentation_getting_started"><a 
href="../documentation/getting_started.htm">Getting started</a></li>
+                                                               <li 
id="menu_documentation_reverse_engineering"><a 
href="../documentation/reverse_engineering.htm">Reverse Engineering</a></li>
+                                                               <li 
id="menu_documentation_api"><a href="../documentation/api.htm">API</a></li>
+                                                       </ul>
+                                               </li>
+                                               <li id="menu_community"><a 
href="../community/community.htm">Community</a>                                 
     
+                                                       <ul class="subMenu">
+                                                               <li 
id="menu_community_mailing_lists"><a 
href="../community/mailing_lists.htm">Mailing lists</a></li>
+                                                               <li 
id="menu_community_source_code"><a href="../community/source_code.htm">Source 
code</a></li>
+                                                               <li 
id="menu_community_jira"><a href="../community/jira.htm">Ticketing &amp; 
Wiki</a></li>
+                                                               <!--<li 
id="menu_community_road_map"><a href="community/road_map.htm">Road 
map</a></li>-->
+                                                               <li 
id="menu_community_contributors"><a 
href="../community/contributors.htm">Contributors</a></li>
+                                                       </ul>
+                                               </li>
+                                               <li id="menu_apache"><a 
href="../apache.htm">About Apache</a>
+                                                       <ul class="subMenu">
+                                                               <li 
id="menu_apache_home"><a href="https://www.apache.org";>Apache home<span 
class="asflink">&nbsp;</span></a></li>
+                                                               <li 
id="menu_apache_donate"><a 
href="https://www.apache.org/foundation/sponsorship.html";>Sponsorship<span 
class="asflink">&nbsp;</span></a></li>
+                                                               <li 
id="menu_apache_thanks"><a 
href="https://www.apache.org/foundation/thanks.html";>Foundation thanks<span 
class="asflink">&nbsp;</span></a></li>
+                                                               <li 
id="menu_apache_security"><a 
href="https://www.apache.org/security/";>Security<span 
class="asflink">&nbsp;</span></a></li>
+                                                       </ul>
+                                               </li>
+                                               <li id="menu_disclaimer"><a 
href="https://www.apache.org/licenses/";>License<span 
class="asflink">&nbsp;</span></a></li>
+                                       </ul>
+                               </div>
+                               
+               </div>
+       
+               <!-- #BeginEditable "menu" -->  
+       <script type="text/javascript">
+               var menu = new Menu( 'mainMenu', 'menu_struts2ext' );
+       </script>
+               <!-- #EndEditable -->
+               <script type="text/javascript">
+                       /* <![CDATA[ */
+                       if( menu ) {
+                               // Menu fully opened (comment out if not wanted)
+                               // menu.openAll();
+                       /* ]]> */
+                       }
+               </script>
+       
+               <div id="main">         
+                       
+                       <div id="pathway">
+                               <span style="float:left">
+                       <!-- #BeginEditable "pathway" -->
+                       Empire and Struts2
+               <!-- #EndEditable -->
+                       </span>
+                       <a id="downloadLink" href="../downloads/latest.htm" 
style="float:right">Download</a>
+               </div>
+                       
+                       <div id="content">
+                       <!-- #BeginEditable "content" -->
+
+               <h1>Empire-Struts2-Extensions</h1>
+               <p> Empire-db has not been designed for any specific type of 
application or 
+               front end framework and 
+                       is thus suitable likewise for Rich-client, Web or 
command line applications. However 
+                       unlike with other data persistence solutions, 
Empire-db's metadata support can be 
+                       utilized and extended to work all the way through to 
the presentation layer and 
+                       dramatically reduce redundancies which are otherwise 
necessary to shape the user 
+                       interface. This in turn significantly reduces the 
errors caused by inconsistencies 
+                       between view and model – and opens even more 
opportunities for a cleaner separation 
+                       of model and view. This together with the compile-time 
safety provided by object 
+                       references can improve code quality and reduce both 
coding and testing effort.</p>
+               <p> In order to take full advantage of these features however 
some glue 
+               code may be required and convenient to help the presentation 
layer understand the model. For a Web application 
+                       framework for example all of Empire-db's metadata can 
be used directly to supply every 
+                       single attribute value of an HTML tag, but it is a lot 
more convenient to use special 
+                       tags that directly understand Empire-db's data and 
metadata interfaces and get the 
+                       information they need themselves.</p>
+               <p> As the first Web application framework we have chosen to 
provide special support for 
+                       the popular <a 
href="https://struts.apache.org/2.x";>Apache Struts2 framework</a>. 
+                       While Struts2 is a well appreciated and capable 
framework by itself, we think that in 
+                       combination with Empire-db and our extensions library 
serving as the glue between the two, 
+                       it really rocks. We believe that data based Web 
application development has never been 
+               safer and more efficient.</p>
+               <p> The following graphic shows the basic difference:</p>
+               <table id="struts2_comparison">
+               <thead>
+                       <tr><th>Struts 2 with traditional 
integration</th><th>Struts2 with Empire-Struts2-Extensions</th></tr>
+               </thead>
+               <tbody>
+                       <tr><td><img 
src="../images/diagrams/struts2-traditional.gif" alt="Struts 2 with traditional 
integration" /></td><td><img src="../images/diagrams/struts2-empire.gif" 
alt="Struts2 with Empire-Struts2-Extentions" /></td></tr>
+               </tbody>
+               </table>
+               <p> At its heart, Empire-Struts2-Extensions offers a set of 
special tags which are specifically designed to work with Empire-db's data and 
+                       metadata objects and which can be used instead or in 
combination with standard Struts2 tags.</p>
+               <p> This however is just part of the story. In addition its 
unique input control mechanism combines 
+                       the tasks for rendering, parsing and validating data in 
one single class. Its pull rather than 
+                       push request parameter handling makes a huge difference 
whenever special display formatting and 
+                       input control combinations are required.</p>
+               
+               <h1>Find out more...</h1>
+               <table id="find_out_more">
+                       <tr><th><a href="forms_controls.htm">Web form design 
and model / view separation</a></th><td>See how Empire tags can make your form 
definition both simpler and safer and learn how field access logic can be kept 
out 
+                                               of the JSPs offering a much 
cleaner separation of model and view at no cost.</td></tr>
+                       <tr><th><a href="rendering_parsing.htm">Input controls 
part 2 – Rendering and parsing</a></th><td>Understand the problem of form 
data processing with traditional 
+                               Web application frameworks and learn why it's 
sensible to 
+                                               keep rendering, parsing and 
validation of a value together in one easy to implement class.</td></tr>
+               </table>
+               
+               <!--            
+               <h1>Interaction of the Empire Struts 2 Extension, Empire-DB and 
Struts</h1>
+               <img style="display: block; margin: auto;" 
src="../images/diagrams/function_of_input_control.jpg" alt="Operation mode of 
an input control" />-->
+                               <!-- #EndEditable --></div>
+                                       
+                       <div id="nav">
+                               <hr />
+                               <div id="nav_prev">
+                                       <a id="prev" href=""><img 
src="../images/prev.gif" alt="" /> Previous Page</a> 
+                                       &nbsp;
+                               </div>
+                               <div id="nav_next">
+                                       &nbsp;
+                                       <a id="next" href="">Next Page <img 
src="../images/next.gif" alt="" /></a>
+                               </div>
+                               <div style="clear: both;"></div>
+                       </div>
+                       
+                       <script type="text/javascript">
+                       /* <![CDATA[ */
+                               if( ( typeof(prev_page) == "undefined" || 
prev_page == "" ) &&
+                                       ( typeof(next_page) == "undefined" || 
next_page == "" ) ) 
+                               {
+                                       $( 'nav' ).hide();
+                               }
+                               else 
+                               {                       
+                                       if( typeof(prev_page) != "undefined" && 
prev_page != "" ) {
+                                               $( 'prev' ).href = prev_page;
+                                               $( 'prev' ).show();
+                                       }
+                                       else {
+                                               $( 'prev' ).hide();
+                                       }
+                                       
+                                       if( typeof(next_page) != "undefined" && 
next_page !="" ) {
+                                               $( 'next' ).href = next_page;
+                                               $( 'next' ).show();
+                                       }
+                                       else {
+                                               $( 'next' ).hide();
+                                       }
+                               }
+                       /* ]]> */
+                       </script>
+
+               </div>
+
+       </div>
+       
+       <!-- Footer -->         
+       <div id="footer">
+               <div class="cr"><small>Copyright &copy; 2008-2021, The Apache 
Software Foundation</small></div>
+               <div class="tm"><small>Apache Empire-db, Empire-db, Apache, the 
Apache feather logo, and the Apache Empire-db project logo are trademarks of 
The Apache Software Foundation</small></div>
+       </div>
+
+</div>
+
+</body>
+<!-- #EndTemplate -->
+</html>
\ No newline at end of file

Propchange: empire-db/site/legacy/struts2ext/struts2ext.htm
------------------------------------------------------------------------------
    svn:mime-type = text/plain


Reply via email to