Modifying the combobox.ejs File
- Open combobox.ejs in the Source editor (if it is not already open).
- Expand the jMaki Dojo node in the Palette window to reveal the Dojo widgets.
- Locate and drag the Combobox widget into the combobox.ejs file in the Source Editor in between the <body> tags.
- 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'} }); %>
- 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.
- Save your changes.
Modifying the index.ejs File
- Open the index.ejs file in the Source Editor (if it is not already open).
- 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>
- Save your changes.
Modifying the Bio Embedded JavaScript Files
- Open greg.ejs in the Source Editor (if it is not already open).
- Delete the entire contents of greg.ejs.
- 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.
- Save your changes.
- Open jayashri.ejs in the Source Editor (if it is not already open).
- Delete the entire contents of jayashri.ejs.
- 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.
- Save your changes.
- Open roberto.ejs in the Source Editor (if not already open).
- Delete the entire contents of roberto.ejs.
- 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.
- Save your changes.
Adding a Listener to glue.js
- Expand the Web Pages node in the Projects window.
- Double-click glue.js to open the file in the Source Editor.
- 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); }
- 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); }
- Save your changes.
Building and Running the bioFisheye Application
- Right-click the bioFisheye application in the Project Pane.
- 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.