Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Les contrôles, le mode déclaratif du comportement JavaScript en XML, le Binding, les contrôles de données tout ça est maintenant disponible sur codeplex avec les sources ici: https://www.codeplex.com/aspnet/Release/ProjectReleases.aspx?ReleaseId=15511
Les features essentielles pour cette Preview 1:
- Client-side template rendering
- Declarative instantiation of behaviors and controls
- DataView control
- Markup extensions
- Bindings
Le tout dans un fichier de 79ko en mode debug.js (bravo Bertrand LeRoy)
Extrait du Readme:
Compatible browsers
-------------------
This release has been tested on the following browsers (but may work on other browsers such as Internet Explorer 8):
* Internet Explorer 7.0.5730
* Firefox 2.0.0.16 and 3.0
* Safari 3.1.2
* Opera 9.51
Client-side template rendering
------------------------------
<div id="myTemplate" class="sys-template">
<h3>{{ Title }}</h3>
Name: <input type="text" value="{{ FirstName + ' ' + LastName}}" />
Date: <input type="text" value="{{ HireDate.format('MM/dd/yyyy') }}"/>
<!--* if (BirthDate) { *-->
BirthDate: <input type="text" value="{{ BirthDate.format('MM/dd/yyyy') }}"/>
<!--* } *-->
</div>
DataView control
----------------
<body xmlns:sys="javascript:Sys" xmlns:dataview="javascript:Sys.Preview.UI.DataView">
...
<div sys:attach="dataview" dataview:data="{{ someArray }}">
<h1>{{ name }}</h1>
<p>{{ description }}</p>
</div>
Bindings
--------
<input id="name" value="{binding name, mode=twoWay}"/>