<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Using the new HTMLHelperProperty in MachII 1.8</title>
	<atom:link href="http://www.tntechnohermit.com/2009/06/27/using-the-new-htmlhelperproperty-in-machii-1-8/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.tntechnohermit.com/2009/06/27/using-the-new-htmlhelperproperty-in-machii-1-8/</link>
	<description>Random Thoughts of a Techno-Hermit</description>
	<lastBuildDate>Mon, 30 Jan 2012 21:07:54 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Dan Skaggs</title>
		<link>http://www.tntechnohermit.com/2009/06/27/using-the-new-htmlhelperproperty-in-machii-1-8/comment-page-1/#comment-340</link>
		<dc:creator>Dan Skaggs</dc:creator>
		<pubDate>Tue, 14 Jul 2009 02:58:14 +0000</pubDate>
		<guid isPermaLink="false">http://dan.skaggsfamily.ws/?p=251#comment-340</guid>
		<description>Thanks Peter...I&#039;ll keep that in mind. We&#039;re not using any caching at the moment but that will be something good to remember when we get to that point.</description>
		<content:encoded><![CDATA[<p>Thanks Peter&#8230;I&#8217;ll keep that in mind. We&#8217;re not using any caching at the moment but that will be something good to remember when we get to that point.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter J. Farrell</title>
		<link>http://www.tntechnohermit.com/2009/06/27/using-the-new-htmlhelperproperty-in-machii-1-8/comment-page-1/#comment-339</link>
		<dc:creator>Peter J. Farrell</dc:creator>
		<pubDate>Tue, 14 Jul 2009 01:55:15 +0000</pubDate>
		<guid isPermaLink="false">http://dan.skaggsfamily.ws/?p=251#comment-339</guid>
		<description>Dan, FYI don&#039;t use cfhtmlhead if you are ever going to use Mach-II caching as the cfhtmlhead tags won&#039;t get replayed when an item is gotten from the cache.  Use the addHtmlHeadElement() method available in the ViewContext to add an element to the head. The CacheHandler uses this as an observer point so they can get replayed when using cached data.  We do the same for cfheader tag -- use addHTTPHeader() method instead. Probably should highlight this more in the docs.</description>
		<content:encoded><![CDATA[<p>Dan, FYI don&#8217;t use cfhtmlhead if you are ever going to use Mach-II caching as the cfhtmlhead tags won&#8217;t get replayed when an item is gotten from the cache.  Use the addHtmlHeadElement() method available in the ViewContext to add an element to the head. The CacheHandler uses this as an observer point so they can get replayed when using cached data.  We do the same for cfheader tag &#8212; use addHTTPHeader() method instead. Probably should highlight this more in the docs.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter J. Farrell</title>
		<link>http://www.tntechnohermit.com/2009/06/27/using-the-new-htmlhelperproperty-in-machii-1-8/comment-page-1/#comment-322</link>
		<dc:creator>Peter J. Farrell</dc:creator>
		<pubDate>Mon, 29 Jun 2009 07:19:05 +0000</pubDate>
		<guid isPermaLink="false">http://dan.skaggsfamily.ws/?p=251#comment-322</guid>
		<description>Dan, yeah we thought about combining all ad-hoc code into one script tag however it gets pretty complicated when you mix in M2 caching and subroutines.  We weren&#039;t ready to tackle this in 1.8 and something I&#039;m sure we&#039;ll think about for 1.9.</description>
		<content:encoded><![CDATA[<p>Dan, yeah we thought about combining all ad-hoc code into one script tag however it gets pretty complicated when you mix in M2 caching and subroutines.  We weren&#8217;t ready to tackle this in 1.8 and something I&#8217;m sure we&#8217;ll think about for 1.9.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dan Skaggs</title>
		<link>http://www.tntechnohermit.com/2009/06/27/using-the-new-htmlhelperproperty-in-machii-1-8/comment-page-1/#comment-320</link>
		<dc:creator>Dan Skaggs</dc:creator>
		<pubDate>Sun, 28 Jun 2009 14:34:15 +0000</pubDate>
		<guid isPermaLink="false">http://dan.skaggsfamily.ws/?p=251#comment-320</guid>
		<description>&lt;a href=&quot;#comment-318&quot; rel=&quot;nofollow&quot;&gt;@Peter J. Farrell &lt;/a&gt; 
Thanks for the feedback Peter...always nice to know someone is reading this.

I took a look at the script tag you mentioned. That&#039;s a much nicer solution than having your scripts sprinkled through the body of the rendered HTML document and for someone that&#039;s not using the HTMLHelperProperty in their application, that would be the way to go.

However, I still feel like there would be some benefit to allowing the HTMLHelperProperty to do something similar, but combine all the ad-hoc scripts that are set into it through the request into one &lt;script&gt; tag in the &lt;head&gt; section of the HTML document. 

With the current M2 script view, you&#039;ll wind up with separate &lt;script&gt; tags in the header for each time you call the tag.  Some would say that this is nitpicky and I&#039;d probably agree, but the functionality is so close to being there as it is. For those using the HTMLHelperProperty in their applications, it would be nice to do everything in one place rather than using 2 different mechanisms.</description>
		<content:encoded><![CDATA[<p><a href="#comment-318" rel="nofollow">@Peter J. Farrell </a><br />
Thanks for the feedback Peter&#8230;always nice to know someone is reading this.</p>
<p>I took a look at the script tag you mentioned. That&#8217;s a much nicer solution than having your scripts sprinkled through the body of the rendered HTML document and for someone that&#8217;s not using the HTMLHelperProperty in their application, that would be the way to go.</p>
<p>However, I still feel like there would be some benefit to allowing the HTMLHelperProperty to do something similar, but combine all the ad-hoc scripts that are set into it through the request into one &lt;script&gt; tag in the &lt;head&gt; section of the HTML document. </p>
<p>With the current M2 script view, you&#8217;ll wind up with separate &lt;script&gt; tags in the header for each time you call the tag.  Some would say that this is nitpicky and I&#8217;d probably agree, but the functionality is so close to being there as it is. For those using the HTMLHelperProperty in their applications, it would be nice to do everything in one place rather than using 2 different mechanisms.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter J. Farrell</title>
		<link>http://www.tntechnohermit.com/2009/06/27/using-the-new-htmlhelperproperty-in-machii-1-8/comment-page-1/#comment-318</link>
		<dc:creator>Peter J. Farrell</dc:creator>
		<pubDate>Sat, 27 Jun 2009 19:45:11 +0000</pubDate>
		<guid isPermaLink="false">http://dan.skaggsfamily.ws/?p=251#comment-318</guid>
		<description>Great post Dan! Glad you like everything, let us know if the leaving off the .js extensions is a bug of ours.  It works on Adobe CF8 and OpenBD just fine so I think there might be a little buglet in Railo maybe.  For things that use multiple libraries of JS / CSS (one example is Lightwindow or Lightbox on Prototype that uses prototype / scriptaculous / css files) is to use the asset packages which you say all the files you need for that asset package as metadata package and use addAsset(&quot;nameOfPackage&quot;).  Any js files you that have already been included in the head won&#039;t be added twice.  Also, it makes it easier because you change versions of a library (and the file name changes), you make the change in one place versus in multiple view files. This would be great for your example that uses jquery, datatables and fancybox.

For ad-hoc js code, take a peek at the script tag in the View library:



ad-hoc code here


By default the script tag in the view custom tag library puts stuff in the HTML head area just like the HTMLHelper. There is also a &quot;style&quot; tag that does similar stuff.  I don&#039;t know your blog accepts links, but here is the link to the doco:
http://greatbiztoolsllc.trac.cvsdude.com/mach-ii/wiki/MachII1.8SpecificationViewTagLib#ThescriptTag</description>
		<content:encoded><![CDATA[<p>Great post Dan! Glad you like everything, let us know if the leaving off the .js extensions is a bug of ours.  It works on Adobe CF8 and OpenBD just fine so I think there might be a little buglet in Railo maybe.  For things that use multiple libraries of JS / CSS (one example is Lightwindow or Lightbox on Prototype that uses prototype / scriptaculous / css files) is to use the asset packages which you say all the files you need for that asset package as metadata package and use addAsset(&#8220;nameOfPackage&#8221;).  Any js files you that have already been included in the head won&#8217;t be added twice.  Also, it makes it easier because you change versions of a library (and the file name changes), you make the change in one place versus in multiple view files. This would be great for your example that uses jquery, datatables and fancybox.</p>
<p>For ad-hoc js code, take a peek at the script tag in the View library:</p>
<p>ad-hoc code here</p>
<p>By default the script tag in the view custom tag library puts stuff in the HTML head area just like the HTMLHelper. There is also a &#8220;style&#8221; tag that does similar stuff.  I don&#8217;t know your blog accepts links, but here is the link to the doco:<br />
<a href="http://greatbiztoolsllc.trac.cvsdude.com/mach-ii/wiki/MachII1.8SpecificationViewTagLib#ThescriptTag" rel="nofollow">http://greatbiztoolsllc.trac.cvsdude.com/mach-ii/wiki/MachII1.8SpecificationViewTagLib#ThescriptTag</a></p>
]]></content:encoded>
	</item>
</channel>
</rss>

