sun.com docs.sun.com My Sun Worldwide Sites

  Previous Contents Next

Modifying the combobox.ejs File

  1. Open combobox.ejs in the Source editor (if it is not already open).
  2. Expand the jMaki Dojo node in the Palette window to reveal the Dojo widgets.
  3. Locate and drag the Combobox widget into the combobox.ejs file in the Source Editor in between the <body> tags.
  4. Change the default arguments as follows:
    value : model.value,
    args: {topic:'/dojo/combobox/value'}

    The insert function should now look like this:

    <% library.jmaki.insert({
       component : "dojo.combobox",
       value : model.value,
       args:{topic:'/dojo/combobox/value'}
    }); %>
  5. Copy the insert function statement for the dContainer widget from fisheye.ejs to combobox.ejs, below the insertion of the combobox widget.

    Make sure the copy includes the <div> tags that enclose the statement.

  6. Save your changes.

Modifying the index.ejs File

  1. Open the index.ejs file in the Source Editor (if it is not already open).
  2. In between the body tags, add the following tags:
    <a href=<%= library.view.quoteUrl("/fisheye/fisheye") %>>
        View bios Using the Fisheye Widget</a>
    <p>
    <a href=<%= library.view.quoteUrl("/fisheye/combobox") %>>
        View bios Using the Combobox Widget</a></p>
  3. Save your changes.

Modifying the Bio Embedded JavaScript Files

  1. Open greg.ejs in the Source Editor (if it is not already open).
  2. Delete the entire contents of greg.ejs.
  3. Insert the following lines into greg.ejs:
    <h2>Greg Murray</h2>
    <img src="../images/blog_murray.jpg"/><p>
    <p>Appointed as Ajax Architect for Sun Microsystems, Greg Murray is deeply 
    involved in the Ajax movement through his participation in the OpenAJAX 
    Alliance and contributions to the Dojo Foundation's open-source JavaScript 
    toolkit. Within Sun, Greg leads a grass roots effort advancing the 
    integration of client-side scripting with Java technologies and is
     the creator and principal architect of Project jMaki. jMaki uses the best 
    parts of Java and the best parts of JavaScript to deliver rich Ajax 
    style widgets through a single, easy-to-use interface that accesses 
    components from popular widget libraries such as Dojo, Script.aculo.us,
    Yahoo's UI Library, Spry, DHTML Goodies, and Google's Web Toolkit. 
    Greg recently contributed to the design and development of the 
    Ajax-based Java Pet Store 2.0 Demo and helped create Java BluePrints 
    solutions for using Ajax with Java technologies.
  4. Save your changes.
  5. Open jayashri.ejs in the Source Editor (if it is not already open).
  6. Delete the entire contents of jayashri.ejs.
  7. Insert the following lines into jayashri.ejs:
    <h2>Jayashri Visvanathan</h2>
    <hr>
    <img src="../images/JayashriVisvanathan.jpg"/><p>
    I am Jayashri Visvanathan and I work on Sun Java(tm) Studio Creator.<br>
    My area of interest/expertise is JavaServer(tm) Faces components. <br>
    Before I joined the Creator team, I used to work on the <br>
    JavaServer Faces Reference Implementation (RI). I have been part of the team<br> 
    developing JavaServer Faces technology since its inception and have contributed <br>
    to various releases including the current release JavaServer Faces Technology 1.2. <br>
    I was also managing the javaserverfaces.dev.java.net project since its launch.<br> 
    Prior to joining the team developing JavaServer Faces technology, I worked on<br> 
    various client and server side web products/technologies within Sun including<br> 
    Mozilla, WebTop Registry Server and HotJava(tm) Browser.
  8. Save your changes.
  9. Open roberto.ejs in the Source Editor (if not already open).
  10. Delete the entire contents of roberto.ejs.
  11. Insert the following lines into roberto.ejs:
    <h3>Roberto Chinnici</h3>
    <img src="../images/chinnici.jpg"/><p>
    <p>Roberto Chinnici is a senior staff engineer at Sun Microsystems, Inc. 
    where he works on the Java Platform, Enterprise Edition, with particular 
    focus on Web Services and Ease of Development. He is the specification 
    lead for the Java(tm) API for XML-based RPC("JAX-RPC") 1.1 and 
    Java APIs for XML Web Services("JAX-WS") 2.0 technologies, 
    both developed under the Java Community Process. He is also Sun's principal 
    representative in the Web Services Description Working Group at W3C 
    and has been a member of the WS-I Basic Profile Working Group. 
    Mr. Chinnici holds an M.S. in Computer Science from the University of
    Milan, Italy.
  12. Save your changes.

Adding a Listener to glue.js

  1. Expand the Web Pages node in the Projects window.
  2. Double-click glue.js to open the file in the Source Editor.
  3. Add the following line to the jmaki.listeners.handleFisheye function:
    jmaki.publish("/jmaki/centercontainer", args.target.url);

    The function should now look like this:

    jmaki.listeners.handleFisheye = function(args) {
        alert("glue.js : fisheye event");
        jmaki.publish("/jmaki/centercontainer", args.target.url);
    }
  4. Add the following to the end of the file:
    jmaki.addGlueListener("/dojo/combobox/value", "jmaki.listeners.getValue");
    
    jmaki.listeners.getValue = function(args) {
        // get the root URL of this application and add
        // the value onto it
        var url = jmaki.webRoot + "/" + args.value;
        jmaki.publish("/jmaki/centercontainer", url);
    }
  5. Save your changes.

Building and Running the bioFisheye Application

  1. Right-click the bioFisheye application in the Project Pane.
  2. Select Run Project.

    The NetBeans IDE 5.5.1generates a WAR file, deploys it to your server, and runs the application in your browser window.

Previous Contents Next
Company Info Contact Terms of Use Privacy Copyright 1994-2007 Sun Microsystems, Inc.