<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://weblogs.asp.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Using client templates, part 2: Live Bindings</title><link>http://weblogs.asp.net/bleroy/archive/2008/09/02/using-client-templates-part-2-live-bindings.aspx</link><description>In part 1 , we saw how to use DataView to render JavaScript data using a simple template. In this post, we'll see how rich bindings unlock richer scenarios where user changes automatically propagate back to the data and to all UI that is bound to it.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>re: Using client templates, part 2: Live Bindings</title><link>http://weblogs.asp.net/bleroy/archive/2008/09/02/using-client-templates-part-2-live-bindings.aspx#7246226</link><pubDate>Tue, 03 Nov 2009 22:01:03 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:7246226</guid><dc:creator>Bertrand Le Roy</dc:creator><author>Bertrand Le Roy</author><description>&lt;p&gt;@Monalisa1: I updated the post to use Preview 6.&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=7246226" width="1" height="1"&gt;</description></item><item><title>re: Using client templates, part 2: Live Bindings</title><link>http://weblogs.asp.net/bleroy/archive/2008/09/02/using-client-templates-part-2-live-bindings.aspx#7245872</link><pubDate>Tue, 03 Nov 2009 12:55:55 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:7245872</guid><dc:creator>Monalisa1</dc:creator><author>Monalisa1</author><description>&lt;p&gt;Hi Bertrand,&lt;/p&gt;
&lt;p&gt;None of these work with preview 6 of same files. Please let me know if there any significant changes in syntac and what could be going wrong here.&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=7245872" width="1" height="1"&gt;</description></item><item><title>re: Using client templates, part 2: Live Bindings</title><link>http://weblogs.asp.net/bleroy/archive/2008/09/02/using-client-templates-part-2-live-bindings.aspx#6996783</link><pubDate>Tue, 24 Mar 2009 20:25:41 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6996783</guid><dc:creator>Bertrand Le Roy</dc:creator><author>Bertrand Le Roy</author><description>&lt;p&gt;@Thanigainathan: well, jQuery does none of that so it's a tough question to answer...&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6996783" width="1" height="1"&gt;</description></item><item><title>re: Using client templates, part 2: Live Bindings</title><link>http://weblogs.asp.net/bleroy/archive/2008/09/02/using-client-templates-part-2-live-bindings.aspx#6996092</link><pubDate>Tue, 24 Mar 2009 09:07:35 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6996092</guid><dc:creator>Thanigainathan</dc:creator><author>Thanigainathan</author><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;how this is different from JQuery based on the performance ?&lt;/p&gt;
&lt;p&gt;Thanks ,&lt;/p&gt;
&lt;p&gt;Thani&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6996092" width="1" height="1"&gt;</description></item><item><title>re: Using client templates, part 2: Live Bindings</title><link>http://weblogs.asp.net/bleroy/archive/2008/09/02/using-client-templates-part-2-live-bindings.aspx#6779883</link><pubDate>Fri, 12 Dec 2008 18:45:13 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6779883</guid><dc:creator>Bertrand Le Roy</dc:creator><author>Bertrand Le Roy</author><description>&lt;p&gt;@geek111222: sure, you can do all that already.&lt;/p&gt;
&lt;p&gt;The syntax in {{ }} is JavaScript so you can reference *any* object from there. For the current dataitem, you don't even need to dereference and you can do {{ subitem }} directly. But you could also have a global object and reference that.&lt;/p&gt;
&lt;p&gt;Nested templates are also already supported. You can reference the parent template's data item using $parentContext.dataItem.&lt;/p&gt;
&lt;p&gt;The DataView exposes an itemCreated event that gets a TemplateContext in the event arguments. You can get to the data item by doing args.get_templateContext().get_dataItem().&lt;/p&gt;
&lt;p&gt;See &lt;a rel="nofollow" target="_new" href="http://weblogs.asp.net/bleroy/archive/2008/11/28/instantiating-components-on-template-markup.aspx"&gt;weblogs.asp.net/.../instantiating-components-on-template-markup.aspx&lt;/a&gt; for an example of that.&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6779883" width="1" height="1"&gt;</description></item><item><title>re: Using client templates, part 2: Live Bindings</title><link>http://weblogs.asp.net/bleroy/archive/2008/09/02/using-client-templates-part-2-live-bindings.aspx#6779621</link><pubDate>Fri, 12 Dec 2008 13:58:29 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6779621</guid><dc:creator>geek111222</dc:creator><author>geek111222</author><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;My question is similar to that asked by &amp;#39;John Lewicki&amp;#39;. I am trying to bind a dataitem which is basically a javascript object. I want to &amp;nbsp;refer its fields inside my templates. Like :&lt;/p&gt;
&lt;p&gt; {{ dataitem.subitem }}&lt;/p&gt;
&lt;p&gt;Is this possible ?&lt;/p&gt;
&lt;p&gt;Can it be made possible in future by allowing child templates, that use &amp;#39;dataitem&amp;#39; from the parent parent as source?&lt;/p&gt;
&lt;p&gt;Also, is it possible to attach a client side callback function (just like the ItemDataBound) which can passed the &amp;#39;dataitem&amp;#39; object as parameter.&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6779621" width="1" height="1"&gt;</description></item><item><title>re: Using client templates, part 2: Live Bindings</title><link>http://weblogs.asp.net/bleroy/archive/2008/09/02/using-client-templates-part-2-live-bindings.aspx#6728542</link><pubDate>Mon, 10 Nov 2008 17:38:13 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6728542</guid><dc:creator>Bertrand Le Roy</dc:creator><author>Bertrand Le Roy</author><description>&lt;p&gt;@Chris: it's actually not one or the other: jQuery has great selector support, which Microsoft Ajax does not, and Microsoft Ajax has a great component model, globalization and localization support, live bindings, ASP.NET integration and lots of other things that jQuery does not. I use both on many of my projects. A few things to consider: only the core jQuery file is supported by Mirosoft (hence jTemplate is not supported). Also, jTemplate does *not* do what live bindings are doing.&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6728542" width="1" height="1"&gt;</description></item><item><title>re: Using client templates, part 2: Live Bindings</title><link>http://weblogs.asp.net/bleroy/archive/2008/09/02/using-client-templates-part-2-live-bindings.aspx#6728394</link><pubDate>Mon, 10 Nov 2008 13:32:38 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6728394</guid><dc:creator>Chris Bower</dc:creator><author>Chris Bower</author><description>&lt;p&gt;Hi Bertrand I have a couple of questions regarding what I should invest my time learning. &lt;/p&gt;
&lt;p&gt;Should I go down the route of Ajax 4.0 or with Microsofts support for jQuery and from what I have seen from buying the book jQuery in Action, the ease at which you can use AJAX with jQuery. Also the use of jTemplates for dong the same as live bindings.&lt;/p&gt;
&lt;p&gt;Which way should I go? Or am I being naive and really Ajax 4 has a lot more to offer.&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6728394" width="1" height="1"&gt;</description></item><item><title>re: Using client templates, part 2: Live Bindings</title><link>http://weblogs.asp.net/bleroy/archive/2008/09/02/using-client-templates-part-2-live-bindings.aspx#6694133</link><pubDate>Mon, 20 Oct 2008 23:14:04 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6694133</guid><dc:creator>Corey J gaudin</dc:creator><author>Corey J gaudin</author><description>&lt;p&gt;How do you 2-way bind a date? When I utilize this AJAX &amp;nbsp;Client Templating to bind to a textbox and add the jQuery Datepicker, it goes all nuts. Changing the Date on the textbox changes it to a string and doesnt really 2-way bind correctly. Is there some Datepicker associated with this library I can use to test so that it maps to and from the Javascript Object seamlessly?&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6694133" width="1" height="1"&gt;</description></item><item><title>re: Using client templates, part 2: Live Bindings</title><link>http://weblogs.asp.net/bleroy/archive/2008/09/02/using-client-templates-part-2-live-bindings.aspx#6681255</link><pubDate>Tue, 14 Oct 2008 19:22:21 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6681255</guid><dc:creator>Bertrand Le Roy</dc:creator><author>Bertrand Le Roy</author><description>&lt;p&gt;@gramic: blogged... &lt;a rel="nofollow" target="_new" href="http://weblogs.asp.net/bleroy/archive/2008/10/14/hack-using-live-bindings-outside-templates.aspx"&gt;weblogs.asp.net/.../hack-using-live-bindings-outside-templates.aspx&lt;/a&gt;&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6681255" width="1" height="1"&gt;</description></item></channel></rss>