老赵点滴


  先做人,再做技术人员,最后做程序员。
  我的理想:“让外国人看中国人写的技术书籍和文章”。Try as I might
posts - 293, comments - 11089, trackbacks - 167, articles - 6
  博客园 :: 首页 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理
  这次补充了所有的Data Access相关控件,现在似乎Atlas.js中最常用的Tag都已经写进了Schema。这次更新的Tag有:

<itemView />
<listView />
<dataSource />
<dataView />
<dataNavigator />
<xmlDataSource />
<xsltView />
<sortBehavior />
<propertyFilter />

  请点击这里下载,所有的下载链接均已更新。使用方式可以见我前一篇文章《为VS.NET 2005增加Atlas Scripts的代码提示功能》,那里的Schema下载也以更新。

  另外,XMLDataSource也出现了DataNavigator类似的问题,在它的代码里有:
this.getDescriptor = function() {
    
var td = Sys.Data.DataSource.callBaseMethod(this, 'getDescriptor');
        
    ...
        
    
return td;
}

  又是“Sys.Data.DataSource.callBaseMethod”了。哎,它们Code Review没有看出来吗?还好,似乎对结果没有什么影响……


  以下是我写的Client Library,希望对大家有所帮助。


ItemView Class

A control designed for viewing a single record at a time.

Syntax

Javascript

var c = Sys.UI.Data.ItemView(associatedElement);
    .
    .
c.initialize();

Declarative

<itemView
    
accessKey="accelerator key"
    cssClass
="CSS class"
    dataContext
="source for data binding operations"
    dataIndex
="the index of the currently selected item in the data source"
    enabled
="true|false"
    id
="identifier for looking up the component by name"
    propertyChanged
="event handler"
    tabIndex
="element's tab index"
    visibilityMode
="Hidden|Collapse"
    visible
="true|false"
>
    
<behaviors>
        
<!-- behaviors -->
    
</behaviors>
    
<bindings>
        
<!-- bindings -->
    
</bindings>
    
<emptyTemplate>
        
<!-- template -->
    
</emptyTemplate>
    
<itemTemplate>
        
<!-- template -->
    
</itemTemplate>
    
<propertyChanged>
        
<!-- actions -->
    
</propertyChanged>
</itemView>

Script components:  required

Inherits:  Sys.UI.Data.DataControl




ListView Class

A control complements the ItemView control, which allows you to view a range of record that are selected by the bound DataSource control.

Syntax

Javascript

var c = Sys.UI.Data.ListView(associatedElement);
    .
    .
c.initialize();

Declarative

<listView
    
accessKey="accelerator key"
    alternatingItemCssClass="CSS class for alternating rows"
    cssClass
="CSS class"
    dataContext
="source for data binding operations"
    dataIndex
="the index of the currently selected item in the data source"
    enabled
="true|false"
    id
="identifier for looking up the component by name"
    itemCssClass="CSS class for individual items"
    itemTemplateParentElementId="identifier of the parent of the template"
    propertyChanged
="event handler"
    separatorCssClass="CSS class for the separator"
    selectedItemCssClass="CSS class for the selected item"
    tabIndex
="element's tab index"
    visibilityMode
="Hidden|Collapse"
    visible
="true|false"
>
    
<behaviors>
        
<!-- behaviors -->
    
</behaviors>
    
<bindings>
        
<!-- bindings -->
    
</bindings>
    
<emptyTemplate>
        
<!-- template -->
    
</emptyTemplate>
    
<itemTemplate>
        
<!-- template -->
    
</itemTemplate>
    <layoutTemplate>
        
<!-- template -->
    
</layoutTemplate>
    <separatorTemplate>
        
<!-- template -->
    
</separatorTemplate>

    
<propertyChanged>
        
<!-- actions -->
    
</propertyChanged>
</listView>

Script components:  required

Inherits:  Sys.UI.Data.DataControl




DataSource Class

A control creates the "connection" between your controls and the back-end datasets.

Syntax

Javascript

new Sys.Data.DataSource();

Declarative

<dataSource
    autoLoad="true|false"
    dataAvailable="event handler"
    dataContext
="source for data binding operations"
    id
="identifier for looking up the component by name"
    initialData="the initial data when the page loads"
    propertyChanged
="event handler"
    serviceURL="the URL of the web service that will supply the data"
    serviceType="DataService|Handler"
>
    
<bindings>
        
<!-- bindings -->
    
</bindings>
    <dataAvailable>
        
<!-- actions -->
    
</dataAvailable>
    <parameters prop1="value1" prop2="value2" ... />
    <propertyChanged>
        
<!-- actions -->
    
</propertyChanged>
</dataSource>

Script components:  required

Inherits:  Sys.Component




DataView Class

A control gives a filtered view of a of data source.

Syntax

Javascript

new Sys.Data.DataView();

Declarative

<dataSource
    dataContext="source for data binding operations"
    id
="identifier for looking up the component by name"
    pageIndex="the current index of page"
    pageSize="the size of page"

    propertyChanged="event handler"
    sortColumn="the column for sorting"
    sortDirection="Ascending|Descending"
>
    
<bindings>
        
<!-- bindings -->
    
</bindings>
    <filters>
        
<!-- filters -->
    
</filters>
    <propertyChanged>
        
<!-- actions -->
    
</propertyChanged>
</dataSource>

Script components:  required

Inherits:  Sys.Component




DataNavigator Class

A control gives page navigation for a data view.

Syntax

Javascript

var c = new Sys.UI.Data.DataNavigator(associatedElement);
    .
    .
c.initialize();

Declarative

<itemView
    
accessKey="accelerator key"
    cssClass
="CSS class"
    dataContext
="source for data binding operations"
    dataView="the data view of page navigation"
    enabled="true|false"
    id
="identifier for looking up the component by name"
    propertyChanged
="event handler"
    tabIndex
="element's tab index"
    visibilityMode
="Hidden|Collapse"
    visible
="true|false"
>
    
<behaviors>
        
<!-- behaviors -->
    
</behaviors>
    
<bindings>
        
<!-- bindings -->
    
</bindings>
    <propertyChanged>
        
<!-- actions -->
    
</propertyChanged>
</itemView>

Script components:  required

Inherits:  Sys.UI.Control




XMLDataSource Class

A datasouce for xml data.

Syntax

Javascript

new Sys.Data.XMLDataSource();

Declarative

<xmlDataSource
    autoLoad="true|false"
    documentAvailable="event handler"
    dataContext
="source for data binding operations"
    id
="identifier for looking up the component by name"
    initialDocument="the initial document when the page loads"
    propertyChanged
="event handler"
    serviceURL="the URL of the web service that will supply the data"
    xpath="the xpath for getting part of xml"
>
    
<bindings>
        
<!-- bindings -->
    
</bindings>
    <documentAvailable>
        
<!-- actions -->
    
</documentAvailable>
    <parameters prop1="value1" prop2="value2" ... />
    <propertyChanged>
        
<!-- actions -->
    
</propertyChanged>
</xmlDataSource>

Script components:  required

Inherits:  Sys.Component




XSLTView Class

A control to show data by converting xml data with xslt.

Syntax

Javascript

var c = new Sys.UI.Data.XSLTView(associatedElement);
    .
    .
c.initialize();

Declarative

<itemView
    
accessKey="accelerator key"
    cssClass
="CSS class"
    dataContext
="source for data binding operations"
    enabled
="true|false"
    id
="identifier for looking up the component by name"
    propertyChanged
="event handler"
    tabIndex
="element's tab index"
    visibilityMode
="Hidden|Collapse"
    visible
="true|false"
>
    
<behaviors>
        
<!-- behaviors -->
    
</behaviors>
    
<bindings>
        
<!-- bindings -->
    
</bindings>
    <parameters prop1="value1" prop2="value2" ... />
    
<propertyChanged>
        
<!-- actions -->
    
</propertyChanged>
</itemView>

Script components:  required

Inherits:  Sys.UI.Control




SortBehavior Class

A behavior to sort the data of a dataview.

Syntax

Javascript

new Sys.UI.Data.SortBehavior();

Declarative

<sortBehavior
    dataContext
="source for data binding operations"

    dataView="the data view for sorting"
    id="identifier for looking up the component by name"
    propertyChanged="event handler"
    sortAscendingCssClass="CSS class when sort the data order by asc"
    sortColumn="the column to sort"
    sortDescendingCssClass="CSS class when sort the data order by desc"
>
    
<bindings>
        
<!-- bindings -->
    
</bindings>
    
<propertyChanged>
        
<!-- actions -->
    
</propertyChanged>
</sortBehavior>

Script components:  required

Inherits:  Sys.UI.Behavior




PropertyFilter Class

Syntax

Javascript

new Sys.Data.PropertyFilter();

Declarative

<propertyFilter
    dataContext
="source for data binding operations"

    id="identifier for looking up the component by name"
    property="the property to filter"
    propertyChanged="event handler"
    value="the value to display"
>
    
<bindings>
        
<!-- bindings -->
    
</bindings>
    
<propertyChanged>
        
<!-- actions -->
    
</propertyChanged>
</sortBehavior>

Script components:  required

Inherits:  Sys.Data.DataFilter


Feedback

#1楼    回复  引用  查看    

2006-09-29 15:35 by dudu      
写个摘要吧。

#2楼 [楼主]   回复  引用  查看    

2006-09-29 15:39 by Jeffrey Zhao      
@dudu
阿?是指索引吗?

#3楼    回复  引用  查看    

2006-09-29 15:41 by 阿不      
辛勤的劳动,是应该得到鲜花和掌声的。在这里没有鲜花和掌声,只能说声辛苦了。

#4楼 [楼主]   回复  引用  查看    

2006-09-29 15:42 by Jeffrey Zhao      
@阿不
谢谢。其实这些东西对我也有用,即使不贴出来我也会为自己做一个。:)

#5楼    回复  引用  查看    

2006-09-29 15:45 by dudu      
@Jeffrey Zhao
请看博客园FAQ第5项,http://www.cnblogs.com/dudu/articles/52480.aspx

#6楼 [楼主]   回复  引用  查看    

2006-09-29 15:59 by Jeffrey Zhao      
@dudu
哎?我写了阿……

#7楼    回复  引用  查看    

2006-09-29 16:03 by dudu      
不好意思,看上去有点乱,我以为是系统自动生成的摘要。

#8楼 [楼主]   回复  引用  查看    

2006-09-29 16:14 by Jeffrey Zhao      
@dudu
呵呵,写这个摘要还蛮麻烦的,还要把“<”和“>”都encodeHTML一下。
还有就是系统会自动生成摘要吗?我看到几篇文章在首页上占了很大篇幅,没有摘要阿……

#9楼    回复  引用  查看    

2006-09-29 16:26 by dudu      
@Jeffrey Zhao
超过字数限制才自动生成摘要,那些文章换行比较多,所以没生成摘要。

#10楼 [楼主]   回复  引用  查看    

2006-09-29 16:33 by Jeffrey Zhao      
@dudu
谢谢,我是新来的,不知道这些。:)

#11楼    回复  引用  查看    

2006-10-06 10:03 by 高海东      
有图片事例吗

#12楼 [楼主]   回复  引用  查看    

2006-10-06 11:58 by Jeffrey Zhao      
@高海东
请问您说的图片示例是指什么呢?:)




标题  
姓名  
主页
Email (博主才能看到) 
验证码 *  看不清,换一张 [登录][注册]
内容(请不要发表任何与政治相关的内容)  
  登录  使用高级评论  新用户注册  返回页首  恢复上次提交      
该文被作者在 2006-10-16 00:56 编辑过
Google站内搜索

China-pub 计算机图书网上专卖店!6.5万品种 2-8折!
近千种 9-95 新二手计算图书火热销售中!
开发者征途系统新作:《设计模式——基于C#的工程化实现及扩展》

相关文章:

相关链接: