incubator-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Incubator Wiki] Update of "xap/XAPStruts" by Robert Buffone
Date Thu, 01 Mar 2007 05:56:58 GMT
Dear Wiki user,

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

The following page has been changed by Robert Buffone:
http://wiki.apache.org/incubator/xap/XAPStruts

------------------------------------------------------------------------------
  == Introduction ==
  
- This page describes how to integrate [http://incubator.apache.org/xap Apache XAP] with [http://struts.apache.org
Struts2]. I use the Person Manager struts sample to illustrate how to upgrade an html application
to use XAP. Overall the integration is quite simple.  I was able to repurpose all of the Java
code (Data Model, ActionHandlers) from the sample.  All that needed to be done was to re-write
the *.ftl files to output a combination of <strong>xModify</strong> and <strong>XAL</strong>
instead of html.
+ This page describes how to integrate [http://incubator.apache.org/xap Apache XAP] with [http://struts.apache.org
Struts2]. I use the Person Manager struts sample to illustrate how to upgrade an html application
to use XAP. Overall the integration is quite simple.  I was able to repurpose all of the Java
code (Data Model, ActionHandlers) from the sample.  All that needed to be done was to re-write
the *.ftl files to output a combination of ''xModify'' and ''XAL'' instead of html.
  
  I have uploaded a zip file of the converted Person Manager application to my people directory.
 [http://people.apache.org/~bbuffone/share/xap-struts-example.zip Download the XAP Person
Manager Code]  To run the code unzip the archive ontop of the an exploded version of the struts2-showcase-2.0.6.war.
 You can then run the sample by going to http://<server-address>:<port>/struts2-showcase-2.0.6/xap/ajax-index.html
  
@@ -20, +20 @@

  
  In the example there are the following files
  
- *struts.xml - Added an include to the struts-xap.xml file
+ * ''struts.xml'' - Added an include to the struts-xap.xml file
  
- *struts-xap.xml - Created action handlers for my XAP application.  I used the existing ActionHandler
and beans from the person manager example.
+ * ''struts-xap.xml'' - Created action handlers for my XAP application.  I used the existing
ActionHandler and beans from the person manager example.
  
- *decorators.xml - Add excludes for the /xal-actions/* and *.xal files, otherwise they would
get templated.
+ * ''decorators.xml'' - Add excludes for the /xal-actions/* and *.xal files, otherwise they
would get templated.
  
- *xap/ajax-index.html - This file includes the code to bootstrap XAP and is the file you
open to run the application.
+ * ''xap/ajax-index.html'' - This file includes the code to bootstrap XAP and is the file
you open to run the application.
  
- *xap/ajax-index.xal - Initial UI layout and Managed Client Object definition.
+ * ''xap/ajax-index.xal'' - Initial UI layout and Managed Client Object definition.
  
  The "strutsMco" object is defined in the ajax-index.xal file.
  <mco xmlns="http://openxal.org/core/mco" id="strutsMco" class="DisplayUIDocument"/>
@@ -36, +36 @@

  from the UI definition.  This is important when building enterprise applications because,
  if makes the application much easier to maintain.
  
- *xap/xal-actions/listPeople.ftl - Contains the xModify and XAL markup used to a display
table of person objects.
+ * ''xap/xal-actions/listPeople.ftl'' - Contains the xModify and XAL markup used to a display
table of person objects.
  
+ * ''xap/xal-actions/newPeople.ftl'' - Contains the xModify and XAL markup used to cisplay
a form to create a new person.  
  
- *xap/xal-actions/newPeople.ftl - Contains the xModify and XAL markup used to cisplay a form
to create a new person.  
+ * ''xap/src-js/DisplayUIDocument.js'' - Contains the code for the Managed Client Object.
 There are two functions contained in the file.
  
- xap/src-js/DisplayUIDocument.js - Contains the code for the Managed Client Object.  There
are two functions contained in the file.
+ ** ''displayAlert'' - Show what is in XAP's UI Document.  The UI document is what you change
inorder to update the screen.
  
- **displayAlert - Show what is in XAP's UI Document.  The UI document is what you change
inorder to update the screen.
- 
- **newPersonAction - Called from the new person form.
+ ** ''newPersonAction'' - Called from the new person form.
  
  The request service is used to send the ui information to the
  struts action, once sent the struts action is executed in the same way 
@@ -61, +60 @@

  object.  Pass into the function the "event" object, the "text" attribute of the
  "name" textField and the "text" attribute of the "lastName" textField.
  
+ * ''All other documents'' are used in the XAP runtime.
+ 

---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@incubator.apache.org
For additional commands, e-mail: cvs-help@incubator.apache.org


Mime
View raw message