incubator-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <>
Subject [Incubator Wiki] Update of "xap/XAPStruts" by Robert Buffone
Date Thu, 01 Mar 2007 05:54:44 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:

  *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="" id="strutsMco" class="DisplayUIDocument"/>
+ Managed Client Objects or "mcos" are XAP way of complete seperating the business logic
+ 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/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.
+ **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.
+ 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 
+ a HTML for is handled. 
+ The information for the ui components is passed into the javascript method
+ using the expression syntax for an event handler, which is defined in the 
+ newPerson.tfl file.
+ The action handler for the "Add Person" button is as follows
+ onCommand="mco:strutsMco.newPersonAction(event, name.text, lastName.text)"
+ In english the reads call the "newPersonAction" function on the "strutsMco"
+ object.  Pass into the function the "event" object, the "text" attribute of the
+ "name" textField and the "text" attribute of the "lastName" textField.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message