补充部分官方文档里没有的Client Library以及代码提示Schema更新(一)
2016-07-29 00:00
302 查看
为了保证Intelligence Schema的正确性,不得不仔细地去挖掘文档上没有描述的特性,最好的方式自然是阅读它的代码,似乎进展还算顺利。新增支持的Tag为validator相关和floatingBehavior,具体如下:
<requiredFieldValidator />
<typeValidator />
<rangeValidator />
<regexValidator />
<customValidator />
<validationErrorLabel />
<validationGroupt />
<floatingBehavior />
Schema已经更新,可以点击这里下载。使用方式可以见我前一篇文章《为VS.NET 2005增加Atlas Scripts的代码提示功能》,那里的Schema下载也以更新。
在研究floatingBehavior之后,发现目前似乎缺少对于其location属性和move事件的介绍,因此另外写了一篇文章《FloatingBehavior补遗:Location属性与move事件》对此作了简单的介绍。
有朋友向我反映说,使用了Schema之后再输入page这个tag时,总是会自动变成<page />,很不方便,这只要设定一下VS即可:选择菜单Tools——Options,在左侧树装菜单中选择Text Editor——HTML——Format,接着在右侧点击Tag Specific Options按钮,如图:
接着在弹出窗口中选择ASP.NET Controls——Page,然后在右侧将“Closing tag”设为“Separate cloasing tag”,如图:
这样,再次输入page时,就会出现<page></page>而不是<page />了。
以下是自制的Class Library,为了方便自己和需要的朋友作为参考。其中可以发现继承于Sys.Component的类都会有id和dataContext两个属性,我也如官方Class Library一般列出,虽然可能不会用到。
另外,如果有朋友发现问题请及时指出:
RequiredFieldValidator Class
The validator class which fires an error if the field on which the validator is configured is empty.
Syntax
Javascript
new
Sys.UI.RequiredFieldValidator();
Declarative
<
requiredFieldValidator
dataContext="source for data binding operations"
errorMessage
="the error message"
id="identifier for looking up the component by name"
propertyChanged="event handler"
>
<bindings>
<!-- bindings -->
</bindings>
<propertyChanged>
<!-- actions -->
</propertyChanged>
</requiredFieldValidator>
[b]Script components: [/b] required
Inherits: Sys.UI.Validator
TypeValidator Class
The validator class which fires an error if the field on witch the validator is configured is not in the specific type.
Syntax
Javascript
new
Sys.UI.TypeValidator();
Declarative
<
typeValidator
dataContext="source for data binding operations"
errorMessage
="the error message"
id="identifier for looking up the component by name"
propertyChanged="event handler"
type
="Number|String|Boolean"
>
<bindings>
<!-- bindings -->
</bindings>
<propertyChanged>
<!-- actions -->
</propertyChanged>
</typeValidator>
[b]Script components: [/b] required
Inherits: Sys.UI.Validator
RangeValidator Class
The validator class which fires an error if the field on witch the validator is configured is not in the specific range.
Syntax
Javascript
new
Sys.UI.RangeValidator();
Declarative
<
rangeValidator
dataContext="source for data binding operations"
errorMessage
="the error message"
id="identifier for looking up the component by name"
lowerBound
="the lower bound"
propertyChanged="event handler"
upperBound
="the upper bound"
>
<bindings>
<!-- bindings -->
</bindings>
<propertyChanged>
<!-- actions -->
</propertyChanged>
</rangeValidator>
[b]Script components: [/b] required
Inherits: Sys.UI.Validator
RegexValidator Class
The validator class which fires an error if the field on witch the validator is configured is not match the regular expresstion.
Syntax
Javascript
new
Sys.UI.RegexValidator();
Declarative
<
regexValidator
dataContext="source for data binding operations"
errorMessage
="the error message"
id="identifier for looking up the component by name"
propertyChanged="event handler"
regex
="the regular expression"
>
<bindings>
<!-- bindings -->
</bindings>
<propertyChanged>
<!-- actions -->
</propertyChanged>
</regexValidator>
[b]Script components: [/b] required
Inherits: Sys.UI.Validator
CustomValidator Class
The validator class which fires an error if the field on witch the validator is configured is not pass the validation events.
Syntax
Javascript
new
Sys.UI.CustomValidator();
Declarative
<
rangeValidator
dataContext="source for data binding operations"
errorMessage
="the error message"
id="identifier for looking up the component by name"
propertyChanged="event handler"
validateValue
="validation event handler"
>
<bindings>
<!-- bindings -->
</bindings>
<propertyChanged>
<!-- actions -->
</propertyChanged>
</customValidator>
[b]Script components: [/b] required
Inherits: Sys.UI.Validator
ValidationErrorLabel Class
The label to show the error message of a control which is being validated.
Syntax
Javascript
c
=
new
Sys.UI.ValidationErrorLabel(associatedElement)
.
.
c.initialize();
Declarative
<
validationErrorLabel
accessKey
="accelerator key"
associatedControl="the associated control being validated"
cssClass
="CSS class"
dataContext
="source for data binding operations"
enabled
="true|false"
htmlEncode
="false|true"
id
="identifier for looking up the component by name"
propertyChanged
="event handler"
tabIndex
="element's tab index"
text
="control value"
visibilityMode
="Hidden|Collapse"
visible
="true|false"
>
<
behaviors
>
<!--
behaviors
-->
</
behaviors
>
<
bindings
>
<!--
bindings
-->
</
bindings
>
<
propertyChanged
>
<!--
actions
-->
</
propertyChanged
>
</
validationErrorLabel
>
[b]Script components: [/b] required
Inherits: Sys.UI.Label
ValidationGroup Class
The control group the controls which are being validated.
Syntax
Javascript
c
=
new
Sys.UI.ValidationGroup();
.
.
c.initialize();
Declarative
<
validationGroup
dataContext="source for data binding operations"
id
="identifier for looking up the component by name"
propertyChanged="event handler"
>
<
associatedControls
>
<
reference
component
="the control which is being validated"
/>
<!--
other references
-->
</
associatedControls
>
<bindings>
<!-- bindings -->
</bindings>
<propertyChanged>
<!-- actions -->
</propertyChanged>
</
validationGroup
>
[b]Script components: [/b] required
Inherits: Sys.UI.Component
FloatingBehavior Class
Make a control float on the page.
Syntax
Javascript
new
Sys.UI.FloatingBehavior();
Declarative
<
floatingBehavior
dataContext="source for data binding operations"
handle
="the handle to move the floating control"
id="identifier for looking up the component by name"
location
="a string like 'x,y' to indicate the position"
move="event handler"
propertyChanged="event handler"
>
<
bindings
>
<!--
bindings
-->
</
bindings
>
<
move
>
<!--
actions
-->
</
move
>
<
propertyChanged
>
<!--
actions
-->
</
propertyChanged
>
</
floatingBehavior
>
[b]Script components: [/b] required
Inherits: Sys.UI.Behavior
<requiredFieldValidator />
<typeValidator />
<rangeValidator />
<regexValidator />
<customValidator />
<validationErrorLabel />
<validationGroupt />
<floatingBehavior />
Schema已经更新,可以点击这里下载。使用方式可以见我前一篇文章《为VS.NET 2005增加Atlas Scripts的代码提示功能》,那里的Schema下载也以更新。
在研究floatingBehavior之后,发现目前似乎缺少对于其location属性和move事件的介绍,因此另外写了一篇文章《FloatingBehavior补遗:Location属性与move事件》对此作了简单的介绍。
有朋友向我反映说,使用了Schema之后再输入page这个tag时,总是会自动变成<page />,很不方便,这只要设定一下VS即可:选择菜单Tools——Options,在左侧树装菜单中选择Text Editor——HTML——Format,接着在右侧点击Tag Specific Options按钮,如图:
接着在弹出窗口中选择ASP.NET Controls——Page,然后在右侧将“Closing tag”设为“Separate cloasing tag”,如图:
这样,再次输入page时,就会出现<page></page>而不是<page />了。
以下是自制的Class Library,为了方便自己和需要的朋友作为参考。其中可以发现继承于Sys.Component的类都会有id和dataContext两个属性,我也如官方Class Library一般列出,虽然可能不会用到。
另外,如果有朋友发现问题请及时指出:
RequiredFieldValidator Class
The validator class which fires an error if the field on which the validator is configured is empty.
Syntax
Javascript
new
Sys.UI.RequiredFieldValidator();
Declarative
<
requiredFieldValidator
dataContext="source for data binding operations"
errorMessage
="the error message"
id="identifier for looking up the component by name"
propertyChanged="event handler"
>
<bindings>
<!-- bindings -->
</bindings>
<propertyChanged>
<!-- actions -->
</propertyChanged>
</requiredFieldValidator>
[b]Script components: [/b] required
Inherits: Sys.UI.Validator
TypeValidator Class
The validator class which fires an error if the field on witch the validator is configured is not in the specific type.
Syntax
Javascript
new
Sys.UI.TypeValidator();
Declarative
<
typeValidator
dataContext="source for data binding operations"
errorMessage
="the error message"
id="identifier for looking up the component by name"
propertyChanged="event handler"
type
="Number|String|Boolean"
>
<bindings>
<!-- bindings -->
</bindings>
<propertyChanged>
<!-- actions -->
</propertyChanged>
</typeValidator>
[b]Script components: [/b] required
Inherits: Sys.UI.Validator
RangeValidator Class
The validator class which fires an error if the field on witch the validator is configured is not in the specific range.
Syntax
Javascript
new
Sys.UI.RangeValidator();
Declarative
<
rangeValidator
dataContext="source for data binding operations"
errorMessage
="the error message"
id="identifier for looking up the component by name"
lowerBound
="the lower bound"
propertyChanged="event handler"
upperBound
="the upper bound"
>
<bindings>
<!-- bindings -->
</bindings>
<propertyChanged>
<!-- actions -->
</propertyChanged>
</rangeValidator>
[b]Script components: [/b] required
Inherits: Sys.UI.Validator
RegexValidator Class
The validator class which fires an error if the field on witch the validator is configured is not match the regular expresstion.
Syntax
Javascript
new
Sys.UI.RegexValidator();
Declarative
<
regexValidator
dataContext="source for data binding operations"
errorMessage
="the error message"
id="identifier for looking up the component by name"
propertyChanged="event handler"
regex
="the regular expression"
>
<bindings>
<!-- bindings -->
</bindings>
<propertyChanged>
<!-- actions -->
</propertyChanged>
</regexValidator>
[b]Script components: [/b] required
Inherits: Sys.UI.Validator
CustomValidator Class
The validator class which fires an error if the field on witch the validator is configured is not pass the validation events.
Syntax
Javascript
new
Sys.UI.CustomValidator();
Declarative
<
rangeValidator
dataContext="source for data binding operations"
errorMessage
="the error message"
id="identifier for looking up the component by name"
propertyChanged="event handler"
validateValue
="validation event handler"
>
<bindings>
<!-- bindings -->
</bindings>
<propertyChanged>
<!-- actions -->
</propertyChanged>
</customValidator>
[b]Script components: [/b] required
Inherits: Sys.UI.Validator
ValidationErrorLabel Class
The label to show the error message of a control which is being validated.
Syntax
Javascript
c
=
new
Sys.UI.ValidationErrorLabel(associatedElement)
.
.
c.initialize();
Declarative
<
validationErrorLabel
accessKey
="accelerator key"
associatedControl="the associated control being validated"
cssClass
="CSS class"
dataContext
="source for data binding operations"
enabled
="true|false"
htmlEncode
="false|true"
id
="identifier for looking up the component by name"
propertyChanged
="event handler"
tabIndex
="element's tab index"
text
="control value"
visibilityMode
="Hidden|Collapse"
visible
="true|false"
>
<
behaviors
>
<!--
behaviors
-->
</
behaviors
>
<
bindings
>
<!--
bindings
-->
</
bindings
>
<
propertyChanged
>
<!--
actions
-->
</
propertyChanged
>
</
validationErrorLabel
>
[b]Script components: [/b] required
Inherits: Sys.UI.Label
ValidationGroup Class
The control group the controls which are being validated.
Syntax
Javascript
c
=
new
Sys.UI.ValidationGroup();
.
.
c.initialize();
Declarative
<
validationGroup
dataContext="source for data binding operations"
id
="identifier for looking up the component by name"
propertyChanged="event handler"
>
<
associatedControls
>
<
reference
component
="the control which is being validated"
/>
<!--
other references
-->
</
associatedControls
>
<bindings>
<!-- bindings -->
</bindings>
<propertyChanged>
<!-- actions -->
</propertyChanged>
</
validationGroup
>
[b]Script components: [/b] required
Inherits: Sys.UI.Component
FloatingBehavior Class
Make a control float on the page.
Syntax
Javascript
new
Sys.UI.FloatingBehavior();
Declarative
<
floatingBehavior
dataContext="source for data binding operations"
handle
="the handle to move the floating control"
id="identifier for looking up the component by name"
location
="a string like 'x,y' to indicate the position"
move="event handler"
propertyChanged="event handler"
>
<
bindings
>
<!--
bindings
-->
</
bindings
>
<
move
>
<!--
actions
-->
</
move
>
<
propertyChanged
>
<!--
actions
-->
</
propertyChanged
>
</
floatingBehavior
>
[b]Script components: [/b] required
Inherits: Sys.UI.Behavior
相关文章推荐
- 补充部分官方文档里没有的Client Library以及代码提示Schema更新(二)
- 补充部分官方文档里没有的Client Library以及代码提示Schema更新(一)
- 补充部分官方文档里没有的Client Library以及代码提示Schema更新(一)
- 补充部分官方文档里没有的Client Library以及代码提示Schema更新(三)
- 补充部分官方文档里没有的Client Library以及代码提示Schema更新(三)
- 补充部分官方文档里没有的Client Library以及代码提示Schema更新(二)
- 补充部分官方文档里没有的Client Library以及代码提示Schema更新(二)
- 补充部分官方文档里没有的Client Library以及代码提示Schema更新(三)
- Win7 update部分更新没有安装错误代码80246008
- 今天用httpclient访问jenkins遇到请求被转发到登录页面,看了网上的一些教程也没能解决。后来参考了下官方文档解决了,代码如下
- vs2017更新后web项目部分后台代码类没有颜色,也没有自动提示输入功能
- Eclipse For JavaEE SVN更新代码时提示“unable to load default svn client ”错误
- vs2012没有C#智能代码提示+更新后报错“未找到与约束匹配的导出”
- CoolWeather项目实战(第三部分终章:手动更新天气和切换城市以及后台自动更新)--->第一行代码-Android(第2版)
- Android App更新版本以及提示用户下载最新apk(有图,有代码,有最终效果图)详细解释及思路
- 手动添加文档注释让原本没有文档注释的dll库在使用时显示代码提示
- 在看官方的例子时候由一个grid实例,在每一行之前有个加号,展开可以显示内容,在实际应用中还是非常有用的,照搬例子的代码,发现老是提示对象不存在,查阅资料后发现是没有加载插件,这里和大家分享下Ext.grid.RowExpander插件的使用,
- Client Copy官方帮助文档
- 在WSUS 3.0的环境中,部分客户机没有向WSUS服务器更新状态,该如何解决?