<?xml version="1.0" encoding="utf-8"?>
<feed version="0.3" xmlns="http://purl.org/atom/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xml:lang="en">
<title>Carla Mott&apos;s Blog</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/carlavmott/" />
<modified>2008-05-12T23:41:32Z</modified>
<tagline></tagline>
<id>tag:weblogs.java.net,2008:/blog/carlavmott/259</id>
<generator url="http://www.movabletype.org/" version="3.01D">Movable Type</generator>
<copyright>Copyright (c) 2008, carlavmott</copyright>
<entry>
<title>jMaki at Community One day</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/carlavmott/archive/2008/05/jmaki_at_commun.html" />
<modified>2008-05-12T23:41:32Z</modified>
<issued>2008-05-12T23:41:27Z</issued>
<id>tag:weblogs.java.net,2008:/blog/carlavmott/259.9784</id>
<created>2008-05-12T23:41:27Z</created>
<summary type="text/plain">Last week at Community One day, the jMaki session included a couple of speakers from the community.   It is great to see jMaki used in the real world. </summary>
<author>
<name>carlavmott</name>

<email>Carla.Mott@Sun.COM</email>
</author>
<dc:subject>Web Applications</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/carlavmott/">
<![CDATA[<p>
Last week at Community One day, the jMaki session included a couple of speakers from the community.   It is great to see jMaki used in the real world.
<p>
We had four speakers at our session and I'll admit it was a lot given we only had an hour.  But I was excited to include both Jennifer Myers and Daniel Ziaoure since they are both using jMaki in their projects.  
<p>The session was divided as follows.  I gave a high level overview of jMaki and talked about the framework, widgets and pub/sub bus. It was pretty quick since I wanted to give others time but I was able to squeeze in a short demo. 
<p> Jennifer who also works for Sun talked about project Miso  and the interface that they built using jMaki.  Project Miso, provides deep, fast and broad search and indexing services and will initially be integrated into the Communication Suite.  Currently the project is focussed on email, calendar and Instant Messaging products from Sun.  Jennifer used the Yahoo table to display the list of items found in the search  and the dcontainer to display the image that was found. Jennifer mentioned that she had no prior Ajax experience prior to starting on the project and found jMaki a great tool for quickly developing the user interface.  <img alt="Jenn-greg.jpg" src="http://weblogs.java.net/blog/carlavmott/Jenn-greg.jpg" width="380" height="250" /> 
 
<p>Daniel Z, an employee of TravleMuse Inc., covered the architecture of his project and showed how jMaki is used in their site.  TravelMuse helps travelers save time and make better decisions at every step of the travel planning process by providing the Web’s most user-friendly travel planning experience. Daniel explained how the jMaki framework is used for developing widgets and for widget to widget communication.  The application is JSF based.  The site is live now with many enhancements coming in the next month at <a href="http://travelmuse.com">http://travelmuse.com.</a> <img alt="danielz.jpg" src="http://weblogs.java.net/blog/carlavmott/archive/danielz.jpg" width="380" height="250" />

<p>And Greg closed with some of the new features like the performance enhancements and the <a href="http://jmaki.com/webtop">jMaki webtop</a> that is now available in jMaki 1.8.  ]]>

</content>
</entry>
<entry>
<title>Adding jMaki wrapped Yahoo widgets to a GWT app</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/carlavmott/archive/2008/05/adding_jmaki_wr.html" />
<modified>2008-05-12T19:11:17Z</modified>
<issued>2008-05-12T19:11:07Z</issued>
<id>tag:weblogs.java.net,2008:/blog/carlavmott/259.9756</id>
<created>2008-05-12T19:11:07Z</created>
<summary type="text/plain">To prepare for our JavaOne session, GWT and jMaki: Expanding the GWT Universe, I decided I should add a jMaki Yahoo widget to a GWT application.  Here is what I did. </summary>
<author>
<name>carlavmott</name>

<email>Carla.Mott@Sun.COM</email>
</author>
<dc:subject>Web Applications</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/carlavmott/">
<![CDATA[<p> To prepare for our JavaOne session, GWT and jMaki: Expanding the GWT Universe, I decided I should add a jMaki Yahoo widget to a GWT application.  Here is what I did. 

<p>  I wanted to start with an existing application and I chose the Java PetStore demo application which Greg had rewritten  using jMaki widgets and GWT.  The code for that application is in the <a href="https://jmaki-store.dev.java.net/">jmaki-store project</a> along with a README.txt containing all the build and install instructions.  First I checked out the <a href="https://jmaki-store.dev.java.net/source/browse/jmaki-store/">jmaki-store workspace</a>, built and deployed the application to make sure I had a working copy of the app.  Follow the instructions in README.txt file to build and deploy but basically you need to go to the jmaki-store/code/gwt/webapp dir and type ant.  There also is a target to deploy the application or you can copy the war file to the auto deploy directory.  In my case I chose to deploy to GlassFish V3 and deployment was extremely fast.   
 
<p>I decided to add the Calendar Yahoo widget to the application because I thought it would be pretty straight forward.  The following are steps needed to add the widget to the application.  First, I had to add an additional class (Calendar, java) in jmaki-store/code/gwt/widgets/sc/java/jmaki/client.  Calendar.java contains the following: 

<pre>  
package jmaki.client;

import jmaki.client.JMakiWidget;

/**
 * Calendar Widget.
 */
public class Calendar extends JMakiWidget {
   
  public Calendar(int width, int height) {
      super(width,height);   
  }     
    
  public String getWidgetName(){
      return "yahoo.calendar";
  }
    
} </pre>

<p>  This class extends JMakiWidget which is a wrapper for the jMaki widgets.  The Calendar widget has 2 methods, a constructor and the getWidgetName  method which returns the name of the widget.  Following the jMaki convention the name of the widget is the toolkit name dot widget name.   

<p>Next I updated the Widgets.gwt.xml file to list all the dependencies for this widget.  It turns out that the list is already in the widgets.json file as that information is needed by the jMaki plugins so I started there.  I had to update the paths and reorder the list because here order matters.  The Yahoo toolkit CSS files need to appear before jMaki CSS files then the Yahoo toolkit library dependencies and then the jmaki component.js file.  jMaki framework will take care of this automatically but in GWT land the list needs to be specified in order.  The Widgets.gwt.xml file looks like: 

<pre> &lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;module&gt;
 &lt;inherits name="com.google.gwt.core.Core"/&gt;
 &lt;source path="client"/&gt;
 &lt;public path="public"/&gt; 
 &lt;script src="resources/jmaki.js"/&gt;
 
 &lt;stylesheet src="resources/jmaki/ibrowser/component.css"/&gt;
 &lt;script src="resources/jmaki/ibrowser/component.js"/&gt;
 
 &lt;stylesheet src="resources/jmaki/resources/styles/themes/charcol/theme.css"/&gt;
 &lt;stylesheet src="resources/jmaki/accordionMenu/component.css"/&gt;
 &lt;script src="resources/jmaki/accordionMenu/component.js"/&gt;

  &lt;stylesheet src="resources/jmaki/cart/component.css"/&gt;
 &lt;script src="resources/jmaki/cart/component.js"/&gt;
 
 &lt;stylesheet src="resources/jmaki/feedreader/component.css"/&gt;
 &lt;script src="resources/jmaki/feedreader/component.js"/&gt;

 &lt;stylesheet src="resources/yahoo/resources/libs/yahoo/v2.5.1/calendar/assets/skins/sam/calendar.css"/&gt;
 &lt;stylesheet src="resources/yahoo/calendar/component.css"/&gt;
 &lt;script src="resources/yahoo/resources/libs/yahoo/v2.5.1/yahoo-dom-event/yahoo-dom-event.js"/&gt;
 &lt;script src="resources/yahoo/resources/libs/yahoo/v2.5.1/element/element-beta-min.js"/&gt;
 &lt;script src="resources/yahoo/resources/libs/yahoo/v2.5.1/container/container_core-min.js"/&gt;
&lt;script src="resources/yahoo/resources/libs/yahoo/v2.5.1/menu/menu-min.js"/&gt;
 &lt;script src="resources/yahoo/resources/libs/yahoo/v2.5.1/button/button-min.js"/&gt;
 &lt;script src="resources/yahoo/resources/libs/yahoo/v2.5.1/datasource/datasource-beta-min.js"/&gt;
&lt;script src="resources/yahoo/resources/libs/yahoo/v2.5.1/calendar/calendar-min.js"/&gt;
&lt;stylesheet src="resources/yahoo/resources/libs/yahoo/v2.5.1/menu/assets/skins/sam/menu.css"/&gt;
&lt;stylesheet src="resources/yahoo/resources/libs/yahoo/v2.5.1/button/assets/skins/sam/button.css"/&gt;
  &lt;script src="resources/yahoo/calendar/component.js"/&gt;
&lt;/module&gt;
</pre>  

<p>So far I have listed the resources needed for the widget and now I need to copy those files into the web app.  All the resources are in the jMaki bundle so I just need to get what is on the list and add it to my application.  Here I cheated a little.  I created a project using NetBeans and put a single widget (Yahoo calendar) in the page. Doing so copied in the appropriate resources and so I had the directory I needed to copy for my GWT app.  The resources/yahoo/calendar/* directory under the new project was copied to the jmaki-store/code/shared/widgets/resource/yahoo directory in the jmaki-store project. 

<p> The last thing I need to do is to add the new widget to the Main window of my app.   Edit jmaki-store/code/gwt/webapp/src/java/jmaki/store/client/MainEntryPoint.java to look as follows: <pre> 
package jmaki.store.client;

import com.google.gwt.core.client.EntryPoint;

import com.google.gwt.user.client.ui.RootPanel;
import com.google.gwt.user.client.ui.DockPanel;
import com.google.gwt.user.client.ui.Widget;

import jmaki.client.IBrowse;
import jmaki.client.AccordionMenu;
import jmaki.client.Cart;
import jmaki.client.Calendar;


public class MainEntryPoint implements EntryPoint {
    
    /** Creates a new instance of MainEntryPoint */
    public MainEntryPoint() {
    }
    
    /**
     * The entry point method, called automatically by loading a module
     * that declares an implementing class as an entry-point
     */
    public void onModuleLoad() {
        DockPanel dp = new DockPanel();
 
        AccordionMenu am = new AccordionMenu("menu.json", 200,400);
         dp.add(am, DockPanel.WEST);
         
       
        IBrowse ib = new IBrowse(400,400);
        RootPanel.get().add(ib);
        dp.add(ib, DockPanel.CENTER);
    
        Cart cart = new Cart(250, 400);
        dp.add(cart, DockPanel.EAST);
       
        Calendar cal = new Calendar(150, 150);
        dp.add(cal, DockPanel.EAST);
       
        RootPanel.get().add(dp);
    }
    
}
</pre>
<p>Now when you build and deploy the app again you will see the calendar widget in the page.  Note that you do not need to change the build files. 
<p>  It really is pretty easy once you figure out the order that the JavaScript dependencies should be in.  Using jMaki wrapped widgets means that 3rd party components can easily be added to GWT.]]>

</content>
</entry>
<entry>
<title>jMaki at JavaOne</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/carlavmott/archive/2008/04/jmaki_at_javaon_1.html" />
<modified>2008-04-29T08:47:08Z</modified>
<issued>2008-04-29T08:47:01Z</issued>
<id>tag:weblogs.java.net,2008:/blog/carlavmott/259.9629</id>
<created>2008-04-29T08:47:01Z</created>
<summary type="text/plain">There&apos;s lots of ways to learn about jMaki this year.
Come see us at CommunityOne and JavaOne 2008.</summary>
<author>
<name>carlavmott</name>

<email>Carla.Mott@Sun.COM</email>
</author>
<dc:subject>Web Applications</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/carlavmott/">
<![CDATA[<p>Community One day and JavaOne are just around the corner.  Community One day is a free event so we hope you will come out and learn about jMaki, GlassFish and NetBeans.  

Come to Moscone Center on Monday May 5 for many interesting sessions.
Greg and I will be speaking along with some folks from the community.  
<ul> <li>
Session: jMaki: The power of Ajax made easy.<br>
Time: 12:25- 1:20<br>
Room : Hall E,  133<br>
</li>
</ul>

<p> JavaOne runs Tuesday May 6 - May 9 also at Moscone Center. There's lots of ways to learn about jMaki this year. There are sessions and Hands on labs to help you learn more.  Also look for jMaki in the general session on Tuesday.
<ul> <li>
Session: jMaki- Ajax with Java™ Technology Made Easier<br>
Day: Wednesday, May 07<br>
Time: 09:30 - 10:30   <br>
Room: Moscone Center - Esplanade 301<br>
</li>
<li>

Hands on Lab: Building Rich Web Applications, Using jMaki<br>
Day: Wednesday, May 07<br>
Time: 14:50 - 16:50   <br>
Room: Moscone Center - Hall E 130/131 (LAB)<br>
</li>
<li>
Hands on Lab: Plug Into GlassFish™ V3 With JavaServer™ Faces and jMaki<br>
Day: Wednesday, May 07<br>
Time: 18:30 - 20:30   <br>
Room: Moscone Center - Hall E 132 (LAB)<br>
</li>
<li>
Session: GWT and jMaki: Expanding the GWT Universe<br>
Day: Thursday, May 08<br>
Time: 09:30 - 10:30   <br>
room: Moscone Center - Esplanade 307-310<br>
</li>
</ul>
]]>

</content>
</entry>
<entry>
<title> Loading data into jMaki widgets</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/carlavmott/archive/2008/04/_loading_extern.html" />
<modified>2008-04-17T01:22:51Z</modified>
<issued>2008-04-17T01:22:46Z</issued>
<id>tag:weblogs.java.net,2008:/blog/carlavmott/259.9380</id>
<created>2008-04-17T01:22:46Z</created>
<summary type="text/plain">I&apos;ve gotten a few questions about how to get datainto jMaki widgets.  This blogs describes the different ways in jMaki to load data into widgets.</summary>
<author>
<name>carlavmott</name>

<email>Carla.Mott@Sun.COM</email>
</author>
<dc:subject>Web Applications</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/carlavmott/">
<![CDATA[<p>I've gotten a few questions about how to get datainto jMaki widgets.  This blogs describes the different ways in jMaki to load data into widgets. 
<p> Let's look at the JSP tag for including a jMaki accordionMenu widget in your web application. 

<pre> &lt;a:widget name="jmaki.accordionMenu"
      value="{menu : [
       {label: 'Links',
            menu: [
                { label : 'Sun.com',
                  href : 'http://www.sun.com'},
                { label : 'jMaki.com',
                  href : 'http://www.jmaki.com'}
                ]
       },
       {label: 'Actions',
            menu: [
                { label : 'Select',
                  action :{topic: '/foo/select',
                         message: { targetId : 'bar'}}
                },
                { label :'Set Content',
                  action :{topic: '/foo/setContent',
                         message: { value : 'test.jsp'}}
                }
                ]}
                ]
       }" /&gt;  </pre> 

<p>jMaki uses the attributes <b>value</b> and <b> service</b> to pass data to the widgets wrappers.  The <b>value</b> attribute is used when the data is located in the page itself and therefore static.  We use this feature in the code snippet that is dropped into a page when using an IDE so we don't have to provide a server side component just to get the widget to render correctly.  The code snipet allows users to start with a working example which can be easily modified to learn more about the widget and the data model for that widget. 

<p> In the tag above the <b>value</b> attribute is set equal to the JSON representation of the data described in the <a href="http://wiki.java.net/bin/view/Projects/jMakiDataModels">data models</a> for that widget.  The data model pages describe the format for the different widgets in jMaki. All the code snipets provided for the IDE follow the data models for the supported platforms, Java, PHP and Ruby.  

<p>The <b>value</b> attribute can also be passed a client side value expression.  I described how to use the value expression in my last blog,<a href="http://weblogs.java.net/blog/carlavmott/archive/2008/03/loading_blog_fe.html"> 
How to load blog feeds into jMaki widgets</a>.  Basically, the data is loaded into a local JavaScript variable which is assigned to the <b>value</b> attribute using the "@" character.

<p> Often you will want to load data that is not statically located in the page and in jMaki this is done through the <b>service</b> attribute.  The next example shows how to get data from a server side component in your application. The tag above now becomes:  <pre> &lt;a:widget name="jmaki.accordionMenu"
      service="data.jsp" /&gt;    </pre> 

<p>As a quick example I will put the data I want to load into the file data.jsp as follows: <pre> {menu : [
       {label: 'Links',
            menu: [
                { label : 'Sun.com',
                  href : 'http://www.sun.com'},
                { label : 'jMaki.com',
                  href : 'http://www.jmaki.com'}
                ]
       },
       {label: 'Actions',
            menu: [
                { label : 'Select',
                  action :{topic: '/foo/select',
                         message: { targetId : 'bar'}}
                },
                { label :'Set Content',
                  action :{topic: '/foo/setContent',
                         message: { value : 'test.jsp'}}
                }
                ]}
                ]
       } </pre> 

<p>What really is happening here is when data.jsp is processed non-JSP commands are echoed out as they appear in the file.  As a result the data I need is returned in JSON format which is what the widget is expecting.  This is just an easy way to see how to use the <b>service</b> attribute without having to write a server side component.  In reality, you will have to collect the data, format in JSON and print it out.  The jMaki 1.1 release contains Java helper classes to create JSON object literals.  You can also take a look at <a href="http://blogs.sun.com/jenniferb/date/20070926">Jennifer's blog</a>.  The main point is that getting data from a server side component is done using the <b>service</b> attribute.
<p> In PHP the same thing can be done as follows:
<pre> &lt;?php  addWidget( array("name" =&gt; "jmaki.accordionMenu",
    "service" =&gt; "data.php"
        ));
?&gt;
</pre>

<p>
The data is in a file called data.php (notice it looks just like data.jsp). 
<pre>
{menu : [
       {label: 'Links',
            menu: [
                { label : 'Sun.com',
                  href : 'http://www.sun.com'},
                { label : 'jMaki.com',
                  href : 'http://www.jmaki.com'}
                ]
       },
       {label: 'Actions',
            menu: [
                { label : 'Select',
                  action :{topic: '/foo/select',
                         message: { targetId : 'bar'}}
                },
                { label :'Set Content',
                  action :{topic: '/foo/setContent',
                         message: { value : 'test.php'}}
                }
                ]}
                ]
       }
</pre>

<p>The jMaki runtime passes the attributes from the tag to the widget constructors.  In the case of the <b>service</b> attribute, the widgets make a jmaki.doAjax call to retrieve the data when the widget is initialized.  To update the data once the widget has been initialized, you can write a handler which makes additional jmaki.doAjax calls and sends that data to the widget. See my blog on <a href="http://weblogs.java.net/blog/carlavmott/archive/2007/09/how_to_implemen.html"> How to implement data pagination in jMaki tables</a> for an example. 

<p>jMaki also provides an XMLHttpProxy so you can safely and easily access RESTful Web Services outside the application domain.  To access a service through the proxy you use the service attribute too.  In this case the tag looks like:

<pre>
&lt;a:widget name="jmaki.accordionMenu"
      service="/xhp?id=rss" /&gt;
</pre>
<p>
By design you will need to use a token key to identify the service to access. The token key is specified in a file called xhp.json in the resources directory.  An entry in the xhp.json file looks like: 

<pre> {"id": "rss",
      "url":"http://weblogs.java.net/blog/ludo/index.rdf",
      "xslStyleSheet": "rss.xsl"
     }  </pre> 

<p> The id is "rss" and this entry specifies the name of the style sheet to apply to the returned data by the proxy. In this example, the data is coming back as XML so we want to convert it to JSON. The current style sheet recognizes RSS 1, RSS2, ATOM 1 and ATOM 2 and converts the XML data to JSON. The style sheet is called rss.xsl and is called by the proxy server before the data is handed to the widget.

See Arun's blog <a href=" http://weblogs.java.net/blog/arungupta/archive/2007/07/jmaki_accessing.html">jMaki - Accessing External Services </a> for more details on how to access external services using jMaki.]]>

</content>
</entry>
<entry>
<title>Using  jMaki in your web apps?  Get a t-shirt.</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/carlavmott/archive/2008/03/using_jmaki_in.html" />
<modified>2008-03-22T08:19:10Z</modified>
<issued>2008-03-22T08:19:06Z</issued>
<id>tag:weblogs.java.net,2008:/blog/carlavmott/259.9404</id>
<created>2008-03-22T08:19:06Z</created>
<summary type="text/plain">Are you using jMaki in your web apps?  If so let us know and we&apos;ll send you a t-shirt.</summary>
<author>
<name>carlavmott</name>

<email>Carla.Mott@Sun.COM</email>
</author>

<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/carlavmott/">
<![CDATA[<p>
I've noticed a few web sites are using jMaki in their web apps and thought that there are probably a lot more.  If you are using jMaki I'd love to here about what you are using and alittle about your application.  Let me know if I can post a link to your site on the jMaki site.  
<p>
Don't forget to send me ( carla dot mott @ sun dot com) your address so I can send the t-shirt.  Thanks for using jMaki!]]>

</content>
</entry>
<entry>
<title>jMaki 1.1 developer release available</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/carlavmott/archive/2008/03/jmaki_11_develo.html" />
<modified>2008-03-22T08:00:47Z</modified>
<issued>2008-03-22T08:00:40Z</issued>
<id>tag:weblogs.java.net,2008:/blog/carlavmott/259.9400</id>
<created>2008-03-22T08:00:40Z</created>
<summary type="text/plain">There&apos;s a lot of new functionality in this release of jMaki. Performance enhancements, new widgets, upgrades to Yahoo 2.5 and Dojo 1.0.2, documentation and the new jMaki webtop are just some of what you will find.</summary>
<author>
<name>carlavmott</name>

<email>Carla.Mott@Sun.COM</email>
</author>
<dc:subject>Web Applications</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/carlavmott/">
<![CDATA[<p>
There's a lot of new functionality in the <a href="https://ajax.dev.java.net/download.html">developer release of jMaki 1.1</a>. Performance enhancements, new widgets, upgrades to Yahoo 2.5 and Dojo 1.0.2, documentation and the new jMaki webtop are just some of what you will find.
<p>
The team has been busy creating new widgets such as a flow widget, bread crumbs, tag cloud and carousel are new. Thanks to the awesome work by SitePen, all jMaki native widgets have 2 new themes. Default theme is <b>kame</b> and also available is <b>ocean</b>.  Finally, we have updated the jmaki-charting widget lib to support Google and Yahoo charts as well.
<p> jMaki core has some performance upgrades where CSS is injected in the page along with JavaScript code and caching can be turned on.  We see a 20-30% improvement.  Also there are security improvements because we use the latest json.org secure json parser and only publish events and data to jMaki managed containers.
<p> Yahoo 2.5 and Dojo 1.0.2 toolkits have been integrated and we support both Dojo .4.3 and 1.0.2 widgets in the same page. We also have brought back and improved the <a href="https://ajax.dev.java.net/gallery/#0">widget gallery</a>.
<p> 
We want to add more and more documentation in this release.  Currently we have updated the Getting Started Guide for JSP and are working on the JSF version.  The PHP version will follow soon.  There are some new blogs on <a href="http://weblogs.java.net/blog/carlavmott/archive/2008/03/loading_blog_fe.html">loading blog feeds like feedburner into a widget</a> and <a href="http://weblogs.java.net/blog/gmurray71/archive/2007/12/index.html">supporting GWT with jMaki</a>.   Also see Arun's blog, <a href="http://blogs.sun.com/arungupta/entry/jmaki_on_rails_reloaded_for">jMaki on Rails</a>. Finally much of the website has been translated to Japanese.  Of course, we will be writing more documentation before this release goes final.  
<p>
Finally, we are working on a new widget called jMaki webtop.  The code is not yet available but will be soon.  For now we have deployed it on jmaki.com so you can play around with <a href="http://jmaki.com/webtop"> jmaki webtop</a>.  You will notice that the widgets in webtop are the same widgets that are available to build jMaki applications.  You will also notice that events can be sent and received in webtop just like jMaki web applications.  Play around with the webtop and let us know what you think.]]>

</content>
</entry>
<entry>
<title>Glassfish and jMaki at EclipseCon</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/carlavmott/archive/2008/03/glassfish_jmaki.html" />
<modified>2008-03-22T08:01:52Z</modified>
<issued>2008-03-21T17:21:24Z</issued>
<id>tag:weblogs.java.net,2008:/blog/carlavmott/259.9396</id>
<created>2008-03-21T17:21:24Z</created>
<summary type="text/plain">Today Ludo and I spoke at EclipseCon on Glassfish and jMaki.  Our talk was well attended and well received.</summary>
<author>
<name>carlavmott</name>

<email>Carla.Mott@Sun.COM</email>
</author>
<dc:subject>Community</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/carlavmott/">
<![CDATA[<p>
Today Ludo and I spoke at EclipseCon on Glassfish and jMaki.  Our talk was well attended and well received.  Here is an overview of the talk and some comments.
<p>Ludo started the talk with a discussion about Glassfish V2 and V3.  He mentioned that Glassfish v2 is enterprise-centric providing clustering, load-balancing and HA support.  He also talked about the world record performance numbers we're seeing, specifically  the JSP container and Grizzly siting the performance and scaling improvements there. He said "You no longer need to chose between Open Source and Performance".  He also mentioned that GlassFish v3 is coming and is focused on having a small footprint, being modular and fast startup.  He followed with a demo of the Glassfish Eclipse plugin using the V3 preview release that is avaliable today. The GlassFish community is active and growing with 5.5 million downloads, dozens of external contributors and over 7000 members.
<p>
Then I got to talk about jMaki and demo the latest release, <a href="http://weblogs.java.net/blog/carlavmott/archive/2008/03/jmaki_11_develo.html">jMaki 1.1 developer preview</a>.  I talked about what jMaki is and why folks would want to use it. The main points were client server framework, client side runtime to bootstrap widgets and provide publish and subscribe communication bus, the server runtime to inject necessary JavaScript code into web pages and XmlHttpProxy to access external RESTful web services.  I got to demo the latest jMaki release using the Eclipse plugin.  I then showed jMaki webtop, one of the latest features we are working on.  See http://jmaki.com/webtop  and I ended the talk with a demo of jMaki running on GlassFish with Comet enabled.  This is a  demo that ships with the jMaki standalone bundle.  I like this demot because the audience can participate and each person's activity is broadcast to all who are connected.    
<p>
Attendees wanted to know when GlassFish v3 will be available and they liked the demos especially the comet demo which I was told was pretty impressive.
<p> 
I hope we impressed upon others that Sun is committed to providing plugins to Eclipse. ]]>

</content>
</entry>
<entry>
<title>How to load blog feeds into jMaki widgets</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/carlavmott/archive/2008/03/loading_blog_fe.html" />
<modified>2008-03-07T08:12:17Z</modified>
<issued>2008-03-07T08:12:13Z</issued>
<id>tag:weblogs.java.net,2008:/blog/carlavmott/259.9324</id>
<created>2008-03-07T08:12:13Z</created>
<summary type="text/plain">Recently I wanted to load data from a blog feed into a jMaki widget.  Here I describe how to do just that.</summary>
<author>
<name>carlavmott</name>

<email>Carla.Mott@Sun.COM</email>
</author>
<dc:subject>Web Applications</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/carlavmott/">
<![CDATA[<p>Recently I wanted to load data from a blog feed into a jMaki widget.  Here I describe how to do just that.
<p> 
The feed I want to read is coming from <a href="http://blogs.sun.com/theaquarium/">The Aquarium</a>.  I want to view the the title and the first 60 characters of each blog entry using the jMaki blockList widget since it automatically handles paging. The Aquarium uses Feedburner to publish blog entries so I looked for a Feedburner API to read the feed.  It also needs to support https to avoid security notifications since the page will be on a java.net project. I found an API that returns the data in JSON format which allows me to provide a callback function to handle the data.  This is exactly what I needed since jMaki widgets expect data in JSON format.  
<p>
To get the data I added the following call to my page.  
<pre>
        &lt;script&gt;
             function processTAFeed(_in) {
             window.taItems= _in;
         }
           &lt;/script&gt;
         &lt;script type="text/javascript" 
src="https://api.feedburner.com/format/1.0/JSONP?uri=TheAquarium_en&callback=processTAFeed"&gt;
             &lt;/script&gt;

</pre>

<p>
The data is now available in the variable <b>taItems</b> in the window object.  Next I want to get the data in the widget.  First I add the tag to the page that specifies the widget and then I use the value binding option to pass the data.  Using the <b>@</b> notation tells the jMaki client runtime that following is a variable that needs to be resolved so the contents of <b>window.taItem</b> is placed in the <b>value</b> attribute.  The tag looks like:
<pre>
  &lt;a:widget name="jmaki.blockList" 
       args="{filter : 'jmaki.widgets.jmaki.blockList.TAFilter'}" 
       value="@{window.taItems}"  /&gt;
                     
</pre>

<p>
Notice that I specified the filter <b>jmaki.widgets.jmaki.blockList.TAFilter</b>.  Filters are called by the jMaki client runtime and allow me to manipulate the data before it is passed to the widget.
<p>
Before looking at the filter, let's look at the template file for this widget. The blockList widget displays data in a repeating format as specified by the template in component.htm.  I updated that template to include the data I want to display and wrote a filter to load the values in the template.  Specifically I will replace <b>link</b>, <b>title</b> and <b>shortContent</b>.
<pre>
&lt;div id="${uuid}" class="jmk-blocklist jmakiBackround"&gt;
    &lt;div id="${uuid}_content" class="jmk-blocklist-content"&gt;
        &lt;ul id="${uuid}_list"&gt;
        &lt;/ul&gt;
    &lt;/div&gt;
    &lt;div id="${uuid}_nav" class="jmk-blocklist-nav"&gt;
            &lt;div id="${uuid}_previous" class="previous"&gt;Previous&lt;/div&gt;
            &lt;div id="${uuid}_mid" class="mid"&gt;&lt;/div&gt;
            &lt;div id="${uuid}_next" class="next"&gt;Next&lt;/div&gt;
    &lt;/div&gt;
    &lt;div id="${uuid}_template" style="display:none"&gt;
        &lt;div  class="jmk-blocklist-item"&gt;
            &lt;a href="@{link}"&gt;@{title}&lt;/a&gt;
            @{shortContent}&lt;br/&gt; 
        &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;

</pre>
<p>
Now let's look at the filter code as the final step.  
<pre>
jmaki.widgets.jmaki.blockList.TAFilter = function(_in) {
    var maxLength = 60;
    var _rows = [];

    for (var _i=0; _i < _in.feed.items.length;_i++) {
      var _des = _in.feed.items[_i].body;
      
        var rex = new RegExp("\\\\n", "g");
        _des =  _des.replace(rex," ");

        rex = new RegExp("\\\\\"","g");
        _des =  _des.replace(rex,"\"");
        var rex2 = new RegExp("&lt;p&gt;.*?&lt;/p&gt;");
        var content = _des.match(rex2)[0];

      if (content.length > maxLength) {
          content = content.substring(0, maxLength) + "... </p>";
      }
      var row = {      
         title : _in.feed.items[_i].title,
         link : _in.feed.items[_i].link,
         date : _in.feed.items[_i].date,
         body : _des,
         shortContent : content
      };
      _rows.push(row);
    }
    return _rows;  
}
</pre>
<p>
The data returned from the feed has several properties such as <b>link</b>, <b>date</b>, <b>title</b>, <b>body</b>. The <b>link</b> and <b>title</b> properties are used without modification.  The <b>body</b> property contains the entire blog but recall that I only want to display the first 60 characters.  With Greg's help we figured out how to normalize the data and pickup the first paragraph using regular expressions. The blockList takes each row array and creates an entry in a list. The filter needs a bit more work because there is the case where a link tag can appear in the first 60 characters and the closing tag is after the first 60 characters.   
<p>
Support for the value binding attribute has been available in jMaki since the 1.0 release.  As a result of this exercise, we'll create a feedReader widget.

]]>

</content>
</entry>
<entry>
<title>Dojo Dijit widgets and jMaki</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/carlavmott/archive/2008/02/dojo_dijit_widg.html" />
<modified>2008-02-13T00:13:21Z</modified>
<issued>2008-02-13T00:13:14Z</issued>
<id>tag:weblogs.java.net,2008:/blog/carlavmott/259.9186</id>
<created>2008-02-13T00:13:14Z</created>
<summary type="text/plain">We just posted the jMaki wrappers for many of the Dojo Dijit 1.0.2 widgets.  Check it out.</summary>
<author>
<name>carlavmott</name>

<email>Carla.Mott@Sun.COM</email>
</author>
<dc:subject>Web Applications</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/carlavmott/">
<![CDATA[<p>
We just posted the <a href="https://widgets.dev.java.net/servlets/ProjectDocumentList?folderID=0">jMaki wrappers for many of the Dojo Dijit 1.0.2 widgets</a>.  Widgets wrapped include the grid, tabbed view, tree, accordion, button, fisheye, calendar and more.   All the widgets support the jMaki data models as described on the wiki pages <a href="http://wiki.java.net/bin/view/Projects/jMakiDataModels"> here</a>.  <p>
Follow the instructions on <a href="http://weblogs.java.net/blog/ludo/archive/2007/01/extending_the_j.html">Ludo's blog</a> to add the library to NetBeans IDE or simply unzip the file in your jMaki web app and add the appropriate tags to you page.  

Enjoy!]]>

</content>
</entry>
<entry>
<title>jMaki wrappers for ExtJs now available</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/carlavmott/archive/2007/12/jmaki_wrappers.html" />
<modified>2007-12-27T18:19:41Z</modified>
<issued>2007-12-27T18:19:34Z</issued>
<id>tag:weblogs.java.net,2007:/blog/carlavmott/259.8897</id>
<created>2007-12-27T18:19:34Z</created>
<summary type="text/plain"> In a joint effort with the ExtJs toolkit team, the jMaki wrappers for the ExtJs 1.1 toolkit are now available, jmaki-ext-1.0.1.zip. Included are wrappers for the menu, grid and tree widgets from the ExtJs toolkit. The wrappers support the...</summary>
<author>
<name>carlavmott</name>

<email>Carla.Mott@Sun.COM</email>
</author>
<dc:subject>Web Applications</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/carlavmott/">
<![CDATA[<p> In a joint effort with the <a href="http://extjs.com/">ExtJs toolkit </a> team, the jMaki wrappers for the ExtJs 1.1 toolkit are now available, <a href="http://extjs.com/deploy/jmaki/jmaki-ext-1.0.1.zip">jmaki-ext-1.0.1.zip</a>.  Included are wrappers for the menu, grid and tree widgets from the ExtJs toolkit.  The wrappers support the jMaki data and event models as described on our <a href="http://wiki.java.net/bin/view/Projects/jMakiDataModels">wiki</a>.
<p> You have several options for including the widget library in your application.  If you use NetBeans follow the instructions for adding the jmaki-charting widget library on <a href="http://weblogs.java.net/blog/ludo/archive/2007/01/extending_the_j.html">Ludo's blog</a>.  Simply load the ExtJs library you downloaded instead of jmaki-charting.  You can then drag and drop widgets from the palette into your application.  Otherwise unzip the widget library into your application and add the appropriate tag to your page. For example, the ExtJs grid tag including default data looks like: 
<pre>
 &lt;a:widget name="Ext.grid"
    value="{columns : [
     { label : 'Title', id : 'title'},
     { label :'Author', id : 'author'},
     { label : 'ISBN', id : 'isbn'},
     { label : 'Description', id : 'description'}
     ],
     rows : [
     { title : 'Book Title 1', author : 'Author 1', isbn: '4412', description : 'A Some long description'},
     { id : 'bar', title : 'Book Title 2', author : 'Author 2', isbn : '4412', description : 'A Some long description'}
     ]
     }" /&gt;
</pre> 
 ]]>

</content>
</entry>
<entry>
<title>jMaki 1.0.3 available</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/carlavmott/archive/2007/12/jmaki_103_avail.html" />
<modified>2007-12-18T04:24:05Z</modified>
<issued>2007-12-18T04:23:56Z</issued>
<id>tag:weblogs.java.net,2007:/blog/carlavmott/259.8854</id>
<created>2007-12-18T04:23:56Z</created>
<summary type="text/plain">jMaki, a client server framework for creating Ajax web applications, is how shipping release 1.0.3</summary>
<author>
<name>carlavmott</name>

<email>Carla.Mott@Sun.COM</email>
</author>
<dc:subject>Web Applications</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/carlavmott/">
<![CDATA[<p> <a href="https://ajax.dev.java.net/download.html">jMaki</a>, a client server framework for creating Ajax web applications, is how shipping release 1.0.3.  This release contains several bug fixes, and integrates Yahoo UI 2.4 release.  In addition, one of the developers, Ahmad Zawawi, wrote a test harness using JS/glue/JSP and updated the the <a href="https://ajax.dev.java.net/servlets/ProjectDocumentList?folderID=6844&expandFolder=6844&folderID=0">Yahoo and Dojo unit tests</a> to run in the test harness.   Now we can run the unit tests automatically.  Currently we are testing that the widgets get loaded.  Future plans include integration with 2.4.0 YUI asynchronous Test suite.  
<p>Ahmad's work has been a great help in testing this release and we will look to automated testing as part of the builds.  I've uploaded the test bundles that contain the latest changes.  You can run the tests manually or try out the automated harness.]]>

</content>
</entry>
<entry>
<title>jMaki 1.0.1 available</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/carlavmott/archive/2007/11/jmaki_101_avail.html" />
<modified>2007-11-17T21:23:59Z</modified>
<issued>2007-11-17T21:23:51Z</issued>
<id>tag:weblogs.java.net,2007:/blog/carlavmott/259.8673</id>
<created>2007-11-17T21:23:51Z</created>
<summary type="text/plain">jMaki 1.0.1, a client server framework for creating Ajax enabled web applications, is now available.  This release contains many bug fixes and limited features.</summary>
<author>
<name>carlavmott</name>

<email>Carla.Mott@Sun.COM</email>
</author>
<dc:subject>Web Applications</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/carlavmott/">
<![CDATA[<p><a href="https://ajax.dev.java.net/download.html">jMaki 1.0.1</a>, a client server framework for creating Ajax enabled web applications, is now available.  This release contains many bug fixes. Some of the fixes include support for server side internationalization, updates for Ruby templates and updates to the command line tool support.  
<p> Try out the new release and <a href="http://forums.java.net/jive/forum.jspa?forumID=96">let us know</a> what you think. ]]>

</content>
</entry>
<entry>
<title>Connecting widgets in jMaki</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/carlavmott/archive/2007/10/connecting_widg.html" />
<modified>2007-10-23T19:56:34Z</modified>
<issued>2007-10-23T19:56:28Z</issued>
<id>tag:weblogs.java.net,2007:/blog/carlavmott/259.8459</id>
<created>2007-10-23T19:56:28Z</created>
<summary type="text/plain">Just how do I connect widgets to each other in jMaki?  This blogs talks about peer to peer and anonymous connections and how you can use that in your code.</summary>
<author>
<name>carlavmott</name>

<email>Carla.Mott@Sun.COM</email>
</author>

<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/carlavmott/">
<![CDATA[<p>
Just how do I connect widgets to each other in jMaki?  The publish/subscribe mechanism in jMaki is quite powerful and allows for peer to peer and anonymous communication.  This blog talks about how to use the different styles of publish and subscribe in your code.  I'll start with the anonymous case first and work my way to peer to peer connections.  
<p>
As you know jMaki uses <a href="https://ajax.dev.java.net/introGlue.html">publish and subscribe (pub/sub) mechanism</a> for the under lying communication between components.  We call this form of communication anonymous because the publisher doesn't know who is listening and the subscriber really doesn't know who did the publishing.
It is useful when multiple components need the same notification and when we don't want to tie them closely together.  All interested parties are notified sequentially of an event. You can see an implementation of this in one of my blogs <a href="http://weblogs.java.net/blog/carlavmott/archive/2007/07/jmaki_widgets_t.html">Widgets talking to widgets</a>.  
<p> 
Using topics to communicate across components can be a little confusing so I wanted to cover how jMaki widgets use topics.  Almost all widgets that are included in jMaki subscribe to a topic or publish to a topic or both.  The topic names are of the form /dojo/table or /lib name/widget name.  We're in the process of updating the documentation files to include this information so that it is easily accessible. All topic names can be over written when specifying the widget in the page.  This is done using the 'publish' and 'subscribe' attributes on the taglib or function call.  Note that a widget can subscribe to multiple topics but publish to only one. 
<p>
Getting an event, regardless of how you get it, is more meaningful if you also get data and know what to do with it.  Therefore we have the ability to pass data along with the event and we have specified the format of the data for the various types of widgets.  The data is passed in the payload of the event.  The format of the data in the payload is described in detail in the <a href="http://wiki.java.net/bin/view/Projects/jMakiDataModels"> data model pages</a>.  
<p>
But how does the receiving component know what to do with the data?  When an event is published, the topic name includes a base name and a command.  The base name is as described above and the command (indicating what action to perform) is appended to the base name.  The command portion is the last string after the last '/' and the string before the last '/' is the base topic name.  For example, the topic /dojo/table/select has a base topic name /dojo/table/ and command is select. All subscribers to the /dojo/table/select topic will be called and passed the payload which in this case, should identify the id of the item to be selected.   If there are multiple table widgets on the same page subscribed to this topic all receive the notification.
<p> 
Although pub/sub is anonymous you can use a naming convention when naming the topics so they correspond to a particular widget.  For example,  there can be three buttons on a page and you can use specific topics for each.  Button 1 uses /button1, button 2 uses /button2 and so on.  Next create a separate subscriber for each of the button topics.  This, in affect, maps a button to a specific subscriber creating a little more closely coupled relationship.
<p>
Finally, there times when you really want to interact with a specific instance of a widget.  There is a function in jMaki which will return the widget instance.  Simply call jmaki.getWidget passing it the id of the widget.  You can then call the public functions available from the widget. Below is the code  showing how to set the id of a widget and how to get the widget instance.
<p>

Set the widget id:
<pre>
   &lt;a:widget name="dojo.editor" id="myeditor" value="Edit this" &gt;

</pre>
<p>
In my glue code I can get the widget instance and use that to get the contents of the widget.
<pre>
       var editorId = jmaki.getWidget('myeditor');
       var content = editorId.getValue();
</pre>

<p>
The publish and subscribe mechanism in jMaki is very powerful and allows widgets to talk to each other and other components.  Defining the data and event models for the different widgets simplies and standardizes the interactions.]]>

</content>
</entry>
<entry>
<title>New widget library for jMaki</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/carlavmott/archive/2007/10/new_widget_libr.html" />
<modified>2007-10-08T06:06:45Z</modified>
<issued>2007-10-08T06:06:36Z</issued>
<id>tag:weblogs.java.net,2007:/blog/carlavmott/259.8388</id>
<created>2007-10-08T06:06:36Z</created>
<summary type="text/plain">I just made a few more widgets available for the jMaki framework.</summary>
<author>
<name>carlavmott</name>

<email>Carla.Mott@Sun.COM</email>
</author>
<dc:subject>Web Applications</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/carlavmott/">
<![CDATA[<p>
I just made a few more widgets available for the <a href="http://www.ajax.dev.java.net">jMaki framework</a>. I've included widgets that folks have asked us to provide that did not go into the main release.  The new widget library is called extra and is <a href="https://widgets.dev.java.net/servlets/ProjectDocumentList"> available for download </a> from the widgets project. It includes the revolver widget which we use on the <a href="https://ajax.dev.java.net/samples/index.html"> samples page</a>, and the list and ibrowser widgets which were part of the jMaki beta release.  The library contains everything you need to run these widgets.  
<p>
If you are using NetBeans then all you need to do is to click Tools-> Palette -> Add jMaki Library and the library will be added to the palette ready for you to drag and drop items in your application.  Otherwise you will have to unzip the library contents in your web application.   ]]>

</content>
</entry>
<entry>
<title>jMaki app using Google Gears</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/carlavmott/archive/2007/09/jmaki_app_using.html" />
<modified>2007-09-29T00:50:26Z</modified>
<issued>2007-09-29T00:50:17Z</issued>
<id>tag:weblogs.java.net,2007:/blog/carlavmott/259.8338</id>
<created>2007-09-29T00:50:17Z</created>
<summary type="text/plain">I created a simple app as a demo that uses Google Gears for local storage and also sends data to the server upon user request.  I showed this at AjaxWorld where there was alot of interest so I decided I would blog about it.</summary>
<author>
<name>carlavmott</name>

<email>Carla.Mott@Sun.COM</email>
</author>
<dc:subject>Web Applications</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/carlavmott/">
<![CDATA[<p>
I created a simple app as a demo that uses Google Gears for local storage and also sends data to the server upon user request.  I showed this at AjaxWorld where there was alot of interest so I decided I would blog about it.
<p>
Building on the <a href="http://jmaki.com/jmaki/index.php">Get Widget Data Sample</a> that is part of the jMaki bundle, I added Google Gears so that it will be called when the save icon of the editor is clicked.  The data in the editor is saved locally each time the editor save button is clicked.  I kept the functionality of sending the data back to the server by simply adding a 'submit' button which does a jmaki.doAjax call sending the contents of the editor to a server side component.
<p>
If you are using NetBeans you can install the <a href="https://jmaki-ext.dev.java.net/servlets/ProjectDocumentList">Google Gears Extension comp lib</a> and add the appropriate code by dragging from the palette.  To install a  comp lib go to tools -> palette -> add jMaki library.  If you are not using NetBeans then follow the instructions on <a href="http://weblogs.java.net/blog/gmurray71/archive/2007/06/jmaki_extension_1.html">Greg's blog on adding google gears extension</a> to you app.
<p>
In order to save the editor contents to the local storage add the following code (in addition to the extension handler) to the onSave handler in the glue.js file.
<pre>
// map topics ending with  /onSave to the handler

jmaki.subscribe("*onSave", function(args) {
    // empty the table then save it
    jmaki.publish("/google/gears/execute",
    { query : 'delete from jmaki',
     callback : function() {
       jmaki.log("Removing Previous Values");
       jmaki.publish("/google/gears/execute",
          { query : 'insert into jmaki values (?, ?)',
             args : [args.value, new Date()],
         callback : function() {
             jmaki.log("Saved " + args.value);
         }
        });
       }
    });
});

</pre>
<p>
This handler gets called each time an onSave event occurs and saves data locally.  A real app may use a specific topic for the editor in case other widgets in the application fire an onSave event. In this example I clear the local store each time I save.  
<p>
I add a button to the the page which will push the contents of the editor to a server side components which can then save the data in a data base there.  I've included the code snippet for the button and the editor widgets here:
<pre>
 &lt;div id="main"&gt;
                &lt;div id="leftSidebar"&gt;
                    &lt;a:widget name="yahoo.button" value="{label : 'Submit contents', action : {topic : '/submitData'}}"/&gt;
                  
                    
                &lt;/div&gt; &lt;!-- leftSidebar --&gt;

                &lt;div id="content" style="height:400px"&gt;
                    
                    &lt;a:widget name="dojo.editor" id="myeditor" value="@{window.editorData}" /&gt;

                &lt;/div&gt; &lt;!-- content --&gt;       
            &lt;/div&gt; &lt;!-- main --&gt;


</pre>
<p>
In PHP the code looks like:
<pre>
 &lt;div id="main"&gt;
                &lt;div id="leftSidebar"&gt;
                    &lt;?php
  addWidget( array ( "name" =>"yahoo.button" value=>"{label : 'Submit contents', action : {topic : '/submitData'}}" )); 
?&gt;
                  
                    
                &lt;/div&gt; &lt;!-- leftSidebar --&gt;

                &lt;div id="content" style="height:400px"&gt;
                    
                    &lt;?php
  addWidget( array ( "name" =>"dojo.editor" id=> "myeditor" value=>"Edit this value." )); 
?&gt;

                &lt;/div&gt; &lt;!-- content --&gt;       
            &lt;/div&gt; &lt;!-- main --&gt;


</pre>
<p>
Notice that I use the id attribute on the editor widget tag.  I did this because it is easy to get the widget later in the handler.  I also set the topic in the button widget tag so I can easily set the handler.  
<p>
I now need to add a handler for the button which sends data back to the server.   The complete code for glue.js is listed below:
<pre>
jmaki.namespace("jmaki.listeners");

jmaki.subscribe("/submitData", "jmaki.listeners.editorListener");

jmaki.listeners.editorListener = function(args) {
    var editorId = jmaki.getWidget('myeditor');
    var contentValue = editorId.getValue();
    if ( typeof contentValue != 'undefined' ) {
        jmaki.log("Editor content=  " + contentValue);
        // send data back to server
         jmaki.doAjax({method: "POST",
                               url: "Service.jsp",
                               content: {message: contentValue },
                               callback: function(_req) {
                                   // handle any errors
                               }
                           });
    } 
};

// map topics ending with  /onSave to the handler

jmaki.subscribe("*onSave", function(args) {
    // empty the table then save it
    jmaki.publish("/google/gears/execute",
    { query : 'delete from jmaki',
     callback : function() {
       jmaki.log("Removing Previous Values");
       jmaki.publish("/google/gears/execute",
          { query : 'insert into jmaki values (?, ?)',
             args : [args.value, new Date()],
         callback : function() {
             jmaki.log("Saved " + args.value);
         }
        });
       }
    });
});

jmaki.subscribe("/jmaki/runtime/extensionsLoaded", function() {

  jmaki.publish("/google/gears/execute", 
    { query : 'select * from jmaki order by Timestamp desc',
     callback : function(_rs) {
         if (typeof _rs != "undefined" &&
             typeof _rs.isValidRow != "undefined" &&
             _rs.isValidRow()) {
             // set data on the global window object for later access
             if (typeof _rs.field != "undefined") window.editorData = _rs.field(0);
             else window.editorData = "";
             jmaki.log("Loaded Editor Data: " + editorData);
         } else {
             window.editorData = "";
             jmaki.log("No data available");
         }
         jmaki.log('done');
     }
    });
    
});
</pre>

<p>

The code above shows how I used the settings in the tag to access the editor widget and also send data to the server.   When the 'Submit contents' button is clicked the function jmaki.listeners.editorListener is called.  That function looks up the editor widget using the id that we set on the widget tag.  It then calls a function in the wrapper that returns the contents of the editor.  The jmaki.doAjax call send the data back to a server component called Service.jsp.  
<p>
That's it.  I have created a <a href="https://ajax.dev.java.net/servlets/ProjectDocumentList?folderID=7838">war file </a> of the demo app and posted here so you can see working app.  ]]>

</content>
</entry>

</feed>