Bruce Phillips Blog on Java, ColdFusion, Flex and Spry - Spry /blog/index.cfm Tutorials on using Java, ColdFusion, Flex, and Spry en-us Wed, 16 Nov 2016 07:23:27 -0700 Wed, 30 Jul 2008 13:18:00 -0700 BlogCFC Bruce Phillips Blog on Java, ColdFusion, Flex and Spry /blog/index.cfm no Introduction to Using Java, JSON, and the Spry Ajax and JavaScript Framework /blog/index.cfm/2008/7/30/Introduction-to-Using-Java-JSON-and-the-Spry-Ajax-and-JavaScript-Framework <h3>Introduction</h3> <p><a href='' target='_blank'>Adobe's Spry Ajax and JavaScript framework</a> provides web application developers with a relatively easy to use collection of dynamic tags, widgets and Ajax features. Behind the scenes, Spry can use either XML or JavaScript Object Notation (JSON) as the data source for its dynamic areas and widgets. Spry can be used with any server-side technology, including Java.</p> <p>In this article I'll review how to use Java to transform a collection of Java objects into a collection of JSON objects and return the JSON objects to the browser where they can be used by Spry. I'll then show a simple Spry dynamic region that creates a table that can be sorted by each column heading. The table will contain a row for each JSON object. <span style="font-weight:bold; color:red;">(Updated example includes an accordion widget and data paging)</span> </p> [More] Spry Java Wed, 30 Jul 2008 13:18:00 -0700 /blog/index.cfm/2008/7/30/Introduction-to-Using-Java-JSON-and-the-Spry-Ajax-and-JavaScript-Framework ColdFusion 7, Spry 1.6, and JSON - A Beginner's Tutorial /blog/index.cfm/2007/12/4/ColdFusion-7-Spry-16-and-JSON--A-Beginners-Tutorial <h3>Introduction</h3> <p>Spry now supports the JavaScript Object Notation (JSON) data format. You can use ColdFusion to generate JSON formatted data that can be used by Spry. One advantage of using the JSON data format over XML is the JSON format enables a smaller file size and quicker processing (see references 1 and 2). I wanted to test using JSON formatted data instead of XML with a project I was working on so I researched how to use ColdFusion to create JSON formatted data and use that data with Spry. This post provides a step-by-step tutorial to create a very simple example of using JSON formatted data with Spry.</p> [More] Spry ColdFusion Tue, 04 Dec 2007 22:21:00 -0700 /blog/index.cfm/2007/12/4/ColdFusion-7-Spry-16-and-JSON--A-Beginners-Tutorial Use Spry and ColdFusion To Create Paged Data With Additional Information Loaded Using Ajax /blog/index.cfm/2007/12/1/Use-Spry-and-ColdFusion-To-Create-Paged-Data-With-Additional-Information-Loaded--Using-Ajax <p>I needed to create a web page that would show data from a database a page of data at a time and for each item shown, have a link that would dynamically load into the page--just below the item--more details about that item. The challenge was that I could not return all the details needed from the database into one dataset because of the number of items and the size of each item. It would just take too long to get back all that XML. However, by using Spry and ColdFusion I could get the additional details for an item and load it into the page after the user clicked on a link for that item. Thus the dataset I first get when the page loads can be much smaller since it doesn't have to include all the extra details for each item.</p> [More] Spry ColdFusion Sat, 01 Dec 2007 22:59:00 -0700 /blog/index.cfm/2007/12/1/Use-Spry-and-ColdFusion-To-Create-Paged-Data-With-Additional-Information-Loaded--Using-Ajax Examples of How To Use Spry's Checkbox Validation Widget /blog/index.cfm/2007/6/26/Examples-of-How-To-Use-Sprys-Checkbox-Validation-Widget <p>I recently needed to validate how many checkboxes a user checks on one of my forms. I decided to use the Spry checkbox validation widget. The checkbox validation widget can display error messages if a user fails to select a minimum number of checkboxes or selects more than the maximum allowed number of checkboxes. The widget can validate the form when the user clicks on the submit button or when the user changes a checkbox. Since the demo provided by Adobe for this widget doesn't show some of the different ways to use the checkbox validation widget I thought I <a href="/spry/sprycheckbox/TestSpryCheckBox.html" target="_blank">would provide an example of the different ways you may use this widget</a>.</p> [More] Spry Tue, 26 Jun 2007 14:32:00 -0700 /blog/index.cfm/2007/6/26/Examples-of-How-To-Use-Sprys-Checkbox-Validation-Widget Spry 1.5 "Pre-Release" Available On Adobe Labs /blog/index.cfm/2007/5/18/Spry-15-PreRelease-Available-On-Adobe-Labs <p>Spry (Adobe's ajax/dhtml javascript library) &quot;pre-release&quot;1.5 is now <a href="">available on Adobe labs</a>. New in this release are JSON and HTML data sets, changes in the effects model, and new widgets. There is now avalilable an Application Program Interface document for Spry and additional documentation. Below are some links to the various Spry 1.5 pages on Adobe labs. </p> [More] Spry Fri, 18 May 2007 16:21:00 -0700 /blog/index.cfm/2007/5/18/Spry-15-PreRelease-Available-On-Adobe-Labs Use Spry's New Auto Suggest Widget To Handle Large Numbers of Suggestions /blog/index.cfm/2007/3/31/Use-Sprys-New-Auto-Suggest-Widget-To-Handle-Large-Numbers-of-Suggestions <h3>Introduction</h3> <p>In mid-March 2007, the Adobe Spry team provided developers with a sneak peak at the upcoming Spry 1.5 release (see reference 1). As part of this update, the Auto Suggest widget was given additional capabilities. A new feature of the Auto Suggest widget is the ability to specify a minimum number of characters before auto suggestions are shown and also to dynamically get the auto suggestions from a server, rather than from a cached data set.</p> <p>The sample code provided in the Spry 1.5 Preview did not include using a ColdFusion backend that was pulling data from a database to populate the auto suggestions. So in this blog entry, I'll explore how you can use ColdFusion on the backend and Spry's updated Auto Suggest widget on the front end to handle large numbers of auto suggestions.</p> [More] Spry Sat, 31 Mar 2007 19:36:00 -0700 /blog/index.cfm/2007/3/31/Use-Sprys-New-Auto-Suggest-Widget-To-Handle-Large-Numbers-of-Suggestions Use Spry to Page Forward and Backward Through Records - A Simple Tutorial /blog/index.cfm/2006/12/27/Use-Spry-to-Page-Forward-and-Backward-Through-Records--A-Simple-Tutorial <p>In mid-December, Adobe released Spry 1.4 (see: <a href="" target="_blank"></a>). Spry is Adobe's ajax framework, enabling developers to build web pages with dynamic regions. Shortly before Christmas, the Spry developers <a href=";catid=602&amp;threadid=1226651&amp;enterthread=y" target="_blank">posted a SpryPagedView JavaScript class and a sample of how to use the class</a>. The SpryPagedView class provides the capability to page forward and backward through a Spry DataSet.</p> <p>The Adobe sample using the SpryPagedView class is available here: <a href="" target="_blank"></a>. Adobe's excellent sample include additional Spry features (filtering, master-detail data sets). I wanted to create my own sample and tutorial that just focused on using the SpryPagedView class to page through a DataSet. You can view my sample here: <a href="/spry/pagedDataSet/testpaging.cfm" target="_blank">/spry/pagedDataSet/testpaging.cfm</a>. </p> [More] Spry Wed, 27 Dec 2006 12:32:00 -0700 /blog/index.cfm/2006/12/27/Use-Spry-to-Page-Forward-and-Backward-Through-Records--A-Simple-Tutorial How To Use Spry's Spry.utils.updateContent Function To Update Content Without Reloading The Web Page /blog/index.cfm/2006/12/17/How-To-Use-Sprys-SpryutilsupdateContent-Function-To-Update-Content-Without-Reloading-The-Web-Page <p>Adobe released update 1.4 to their Spry ajax framework. You can learn more about Spry and download the 1.4 release here: <a href="" target="_blank"></a>. I'm impressed with Spry and how easy Spry makes complex ajax functions and DOM manipulation.</p> <p>New in Spry release 1.4 is a JavaScript function called Spry.utils.updateContent that you can use to update content in a web page without having to reload the entire page. The documentation for the various Spry capabilities (dataset functions, utility functions, widgets, and effects) has been much improved in this release. However, besides a sample web page that uses Spry.utils.updateContent, this function is not clearly explained in the documentation provided with release 1.4 (at least I could not find it - if there is documentation for this function please post a link to it in a comment). </p> [More] Spry Sun, 17 Dec 2006 12:09:00 -0700 /blog/index.cfm/2006/12/17/How-To-Use-Sprys-SpryutilsupdateContent-Function-To-Update-Content-Without-Reloading-The-Web-Page Use ColdFusion Function Return Type of XML to Provide XML to Both Spry and Flex /blog/index.cfm/2006/11/11/Use-ColdFusion-Function-Return-Type-of-XML-to-Provide-XML-to-Both-Spry-and-Flex <p>This blog entry discusses how I create a function that queries a database, transforms the query results into XML, and returns the XML in a format that can be used by either Spry (pre-release version 1.3) or Flex 2.0. ColdFusion 7 added a return type of XML (see: <a href=";file=00000263.htm" target="_blank">ColdFusion 7 documentation</a>). However, I've had to experiment some to get my CFC functions to return XML that can be used by both Spry and Flex 2.0. </p> [More] Spry Flex ColdFusion Sat, 11 Nov 2006 17:31:00 -0700 /blog/index.cfm/2006/11/11/Use-ColdFusion-Function-Return-Type-of-XML-to-Provide-XML-to-Both-Spry-and-Flex Modifying Spry's Auto Suggest Widget to Bind User's Selection to A Form /blog/index.cfm/2006/11/6/Modifing-Sprys-Auto-Suggest-Widget-to-Bind-Users-Selection-to-A-Form <p>I recently had to develop a new administrative interface for our staff to use to track presenters and update their contact information. I decided to use Adobe's Spry ajax tool set to make the pages more interactive and to save time for staff. One use case I had was staff needed to be able to find a specific presenter using his last name (which is not unique among presenters) and then update his contact information. </p> <p> I could have fulfilled this use case by having the staff person enter the last name, return a page with presenters matching that last name, then have the user select the specific presenter from all those with that last name, and then populate the update contact form. But I had recently been learning how to use Spry's auto suggest widget and decided to try to modify the widget so that the staff person could start typing the presenter's last name and Spry would show possible matches. Then the user could select the correct presenter and the form fields would be populated with that presenter's information. I wanted to do all these tasks without a page refresh.</p> [More] Spry Mon, 06 Nov 2006 16:16:00 -0700 /blog/index.cfm/2006/11/6/Modifing-Sprys-Auto-Suggest-Widget-to-Bind-Users-Selection-to-A-Form Spry Master - Detail Data Sets /blog/index.cfm/2006/11/1/Spry-Master--Detail-Data-Sets <p><a href="/spry/masterdetailexample/" target="_blank">In this example</a> of using the Adobe Spry ajax framework, we will add to our previous example the ability for the user to select a city from a drop down select box and then update the table with the information for that city. This technique is known as a master (city) - detail (city's information) relationship. Spry makes creating master-detail dynamic regions easy.</p> [More] Spry Wed, 01 Nov 2006 10:54:00 -0700 /blog/index.cfm/2006/11/1/Spry-Master--Detail-Data-Sets Creating A Basic Spry Data Set and Dynamic Region /blog/index.cfm/2006/10/31/Creating-A-Basic-Spry-Data-Set-and-Dynamic-Region <p>In our first Spry example, I'll go over how to create a basic Spry data set and bind the data set to a dynamic region of the web page. In future examples we will add additional Spry features. </p> <p>Step 1 - Create a CFC method that returns the data you want as XML (GetInfo.cfc in my example). Make sure you set the output to false for the component and for the function. Return type must be XML (which works beginning with CFMX 7.0.1). </p> <p>Step 2 - Test calling the CFC via a URL. You should see your data and if you view source you should see the XML formatting. Note the name of the root node (the first node) and the node below the root that repeats for each set of data. In my example the root node is NewDataSet and Table is the node below that and repeats for each row of data. </p> [More] Spry Tue, 31 Oct 2006 22:36:00 -0700 /blog/index.cfm/2006/10/31/Creating-A-Basic-Spry-Data-Set-and-Dynamic-Region What Does Spry Include? /blog/index.cfm/2006/10/31/What-Does-Spry-Include <h3><font color="red">NOTE - Adobe released Spry version 1.4 on Dec 15, 2006. You can get a copy of Spry 1.4 here: <a href=""></a>. Much of what Spry 1.4 includes is described below since I included a description of some material the Spry development team had released unofficially after 1.3 was released. However, Spry 1.4 does include alot more documentation on these features and some additional capabilites not mentioned below.</font></h3> <p>I've been using Adobe's Spry ajax tool set in some of my web applications so I've decided to add a Spry category to my blog and post some examples of how you can use Spry. But step one is to understand what Spry includes and how to get the Spry files.</p> [More] Spry Tue, 31 Oct 2006 14:14:00 -0700 /blog/index.cfm/2006/10/31/What-Does-Spry-Include