关闭

ColdFusion 8 - Spry Integration

206人阅读 评论(0) 收藏 举报

Anyone who attended one of Ben Forta's sessions on the Scorpio tour knows that one of the keys to ColdFusion 8 is integration (.NET integration, PDF integration, etc). One of the coolest (IMO) integration features is the cfsprydataset tag. This tag will create a simple Spry dataset in any ColdFusion page without the developer having to bother including the Spry libraries or manually declare the dataset. One simple tag changes this:

<head>
   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
   <title>Spry Example</title>
   <!--Link the Spry libraries-->
   <script type="text/javascript" src="../spry/includes/xpath.js"></script>
   <script type="text/javascript" src="../spry/includes/SpryData.js"></script>
   <!--Create a data set object-->
   <script type="text/javascript">
      var dsSpecials = new Spry.Data.XMLDataSet("dsData.cfm", "specials/menu_item");
   </script>
</head>

To this:

<cfsprydataset bind="url:dsData.cfm" name = "dsSpecials" type = "xml" xpath = "specials/menu_item">

Very cool. What's cooler is that you can treat this dataset just like any other Spry dataset - sort it, filter it, etc.


This post contains references and/or code samples from the public beta of ColdFusion 8 (Scorpio). The features and code here are subject to change and may not work in the final release of ColdFusion 8. Use at your own risk.  
0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:875次
    • 积分:24
    • 等级:
    • 排名:千里之外
    • 原创:2篇
    • 转载:0篇
    • 译文:0篇
    • 评论:0条
    文章存档