<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.3.3" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>
<channel>
	<title>Comments on: Creating Custom Modules with YUI Using the YUI Module Control</title>
	<link>http://yuiblog.com/blog/2007/12/19/custommodules/</link>
	<description>News and Artilces about Designing and Developing with Yahoo! Libraries.</description>
	<pubDate>Fri, 18 Jul 2008 23:18:30 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.3</generator>
		<item>
		<title>By: Cyril Doussin</title>
		<link>http://yuiblog.com/blog/2007/12/19/custommodules/#comment-305953</link>
		<dc:creator>Cyril Doussin</dc:creator>
		<pubDate>Fri, 15 Feb 2008 15:30:31 +0000</pubDate>
		<guid>http://yuiblog.com/blog/2007/12/19/custommodules/#comment-305953</guid>
		<description>@Mike:

1. yes the value is already set. You can this in container.js (in YUI 2.4.1), within the Config.setProperty function line 285 (the handler will get called by the firing of the property event: "this.fireEvent(key, value);", line 287. Please note that the handler won't be called if the setproperty function is called with "true" as its third (called "silent") parameter.

2. in container.js (YUI 2.4.1), line 183, within the Config.addProperty function, you can see that the "silent" parameter is set to true when calling Config.setProperty, which means that the handler will not be called when the property is added using addProperty.

The handler is basically useful as a listener which will get called whenever the value for a config property is changed. It allows you to attach a listener at a per-config property level, when then Config.configChangedEventgets fired no matter which property had its value modified.

No problem, good to see you interested in YUI. YUI has many other powerful features which are little known, feel free to inspect the source code and ask questions on the mailing-list.</description>
		<content:encoded><![CDATA[<p>@Mike:</p>
<p>1. yes the value is already set. You can this in container.js (in YUI 2.4.1), within the Config.setProperty function line 285 (the handler will get called by the firing of the property event: &#8220;this.fireEvent(key, value);&#8221;, line 287. Please note that the handler won&#8217;t be called if the setproperty function is called with &#8220;true&#8221; as its third (called &#8220;silent&#8221;) parameter.</p>
<p>2. in container.js (YUI 2.4.1), line 183, within the Config.addProperty function, you can see that the &#8220;silent&#8221; parameter is set to true when calling Config.setProperty, which means that the handler will not be called when the property is added using addProperty.</p>
<p>The handler is basically useful as a listener which will get called whenever the value for a config property is changed. It allows you to attach a listener at a per-config property level, when then Config.configChangedEventgets fired no matter which property had its value modified.</p>
<p>No problem, good to see you interested in YUI. YUI has many other powerful features which are little known, feel free to inspect the source code and ask questions on the mailing-list.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike</title>
		<link>http://yuiblog.com/blog/2007/12/19/custommodules/#comment-305730</link>
		<dc:creator>Mike</dc:creator>
		<pubDate>Fri, 15 Feb 2008 08:46:08 +0000</pubDate>
		<guid>http://yuiblog.com/blog/2007/12/19/custommodules/#comment-305730</guid>
		<description>Thanks Cyril, that's exactly what i did. But i'm still a little confused. Questions i have in mind are:

1.) Is the property already set in this.cfg when the handler is called? I suppose yes but in some configHandlers i see another call to setProperty().

2.) Is the handler also called when a new object is created with configuration attributes in the constructor call? 

I'm still not quite sure, in which cases such a handler would be useful. Some "real life" problem would be great.

Oh, and i forgot: Thanks for this great article of course. It really opened my eyes on how to unleash the full power of YUI.</description>
		<content:encoded><![CDATA[<p>Thanks Cyril, that&#8217;s exactly what i did. But i&#8217;m still a little confused. Questions i have in mind are:</p>
<p>1.) Is the property already set in this.cfg when the handler is called? I suppose yes but in some configHandlers i see another call to setProperty().</p>
<p>2.) Is the handler also called when a new object is created with configuration attributes in the constructor call? </p>
<p>I&#8217;m still not quite sure, in which cases such a handler would be useful. Some &#8220;real life&#8221; problem would be great.</p>
<p>Oh, and i forgot: Thanks for this great article of course. It really opened my eyes on how to unleash the full power of YUI.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cyril Doussin</title>
		<link>http://yuiblog.com/blog/2007/12/19/custommodules/#comment-305268</link>
		<dc:creator>Cyril Doussin</dc:creator>
		<pubDate>Thu, 14 Feb 2008 16:46:33 +0000</pubDate>
		<guid>http://yuiblog.com/blog/2007/12/19/custommodules/#comment-305268</guid>
		<description>You are completely right Mike, sorry for the omission.
You can see examples of config handler functions in the source code of container.js in the YUI itself.</description>
		<content:encoded><![CDATA[<p>You are completely right Mike, sorry for the omission.<br />
You can see examples of config handler functions in the source code of container.js in the YUI itself.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike</title>
		<link>http://yuiblog.com/blog/2007/12/19/custommodules/#comment-305148</link>
		<dc:creator>Mike</dc:creator>
		<pubDate>Thu, 14 Feb 2008 12:15:16 +0000</pubDate>
		<guid>http://yuiblog.com/blog/2007/12/19/custommodules/#comment-305148</guid>
		<description>In your Example 3 you use a custom config property like this:

this.cfg.addProperty("num_contacts", { 
  handler: this.configNumContacts, 
  [...]

Shouldn't you also supply the &lt;b&gt;configNumContacts()&lt;/b&gt; method? It would be nice to also have an example for it.</description>
		<content:encoded><![CDATA[<p>In your Example 3 you use a custom config property like this:</p>
<p>this.cfg.addProperty(&#8221;num_contacts&#8221;, {<br />
  handler: this.configNumContacts,<br />
  [&#8230;]</p>
<p>Shouldn&#8217;t you also supply the <b>configNumContacts()</b> method? It would be nice to also have an example for it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eric Miraglia</title>
		<link>http://yuiblog.com/blog/2007/12/19/custommodules/#comment-265610</link>
		<dc:creator>Eric Miraglia</dc:creator>
		<pubDate>Mon, 24 Dec 2007 23:38:31 +0000</pubDate>
		<guid>http://yuiblog.com/blog/2007/12/19/custommodules/#comment-265610</guid>
		<description>@BirBal -- For this article, we used Alex Gorbatchev's SyntaxHighlighter (http://code.google.com/p/syntaxhighlighter/).  You may also be interested in checking out http://duartes.org/iris/highlight.html.  Regards, Eric</description>
		<content:encoded><![CDATA[<p>@BirBal &#8212; For this article, we used Alex Gorbatchev&#8217;s SyntaxHighlighter (http://code.google.com/p/syntaxhighlighter/).  You may also be interested in checking out <a href="http://duartes.org/iris/highlight.html." rel="nofollow">http://duartes.org/iris/highlight.html.</a>  Regards, Eric</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: BirBal</title>
		<link>http://yuiblog.com/blog/2007/12/19/custommodules/#comment-265551</link>
		<dc:creator>BirBal</dc:creator>
		<pubDate>Mon, 24 Dec 2007 21:37:13 +0000</pubDate>
		<guid>http://yuiblog.com/blog/2007/12/19/custommodules/#comment-265551</guid>
		<description>I just wrote a Login Module for YUI at http://lamp.techbirbal.com/2007/12/24/yui-login-box/

What code highlighter are you using on ur blog ??</description>
		<content:encoded><![CDATA[<p>I just wrote a Login Module for YUI at <a href="http://lamp.techbirbal.com/2007/12/24/yui-login-box/" rel="nofollow">http://lamp.techbirbal.com/2007/12/24/yui-login-box/</a></p>
<p>What code highlighter are you using on ur blog ??</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Federico Feroldi&#8217;s blog &#187; Blog Archive &#187; links for 2007-12-20</title>
		<link>http://yuiblog.com/blog/2007/12/19/custommodules/#comment-262764</link>
		<dc:creator>Federico Feroldi&#8217;s blog &#187; Blog Archive &#187; links for 2007-12-20</dc:creator>
		<pubDate>Thu, 20 Dec 2007 20:19:58 +0000</pubDate>
		<guid>http://yuiblog.com/blog/2007/12/19/custommodules/#comment-262764</guid>
		<description>[...] Creating Custom Modules with YUI Using the YUI Module Control » Yahoo! User Interface Blog This article looks at the process of extending YAHOO.widget.Module in order to build such a Control. Our example will be a potentially long list of contacts, which we will turn into a customisable, paginated list. (tags: javascript yui module howto tutorial library)     Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages. [...]</description>
		<content:encoded><![CDATA[<p>[&#8230;] Creating Custom Modules with YUI Using the YUI Module Control » Yahoo! User Interface Blog This article looks at the process of extending YAHOO.widget.Module in order to build such a Control. Our example will be a potentially long list of contacts, which we will turn into a customisable, paginated list. (tags: javascript yui module howto tutorial library)     Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages. [&#8230;]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: reza</title>
		<link>http://yuiblog.com/blog/2007/12/19/custommodules/#comment-262644</link>
		<dc:creator>reza</dc:creator>
		<pubDate>Thu, 20 Dec 2007 17:26:32 +0000</pubDate>
		<guid>http://yuiblog.com/blog/2007/12/19/custommodules/#comment-262644</guid>
		<description>I am wondering why resizeable overlay is not as part of standard containers shipped by YUI?

How difficult is to add one more config option like "resizeable:true" as part of Overlay family?

I know that in panel-resize.html in examples, but is that better to put this one in overlay as standard feature?

Thanks
--
Reza</description>
		<content:encoded><![CDATA[<p>I am wondering why resizeable overlay is not as part of standard containers shipped by YUI?</p>
<p>How difficult is to add one more config option like &#8220;resizeable:true&#8221; as part of Overlay family?</p>
<p>I know that in panel-resize.html in examples, but is that better to put this one in overlay as standard feature?</p>
<p>Thanks<br />
&#8211;<br />
Reza</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cyril Doussin</title>
		<link>http://yuiblog.com/blog/2007/12/19/custommodules/#comment-262481</link>
		<dc:creator>Cyril Doussin</dc:creator>
		<pubDate>Thu, 20 Dec 2007 11:44:59 +0000</pubDate>
		<guid>http://yuiblog.com/blog/2007/12/19/custommodules/#comment-262481</guid>
		<description>Sorry, my comment was partly truncated. I meant:

"You would extend Element to create widgets more based on one HTMLElement, which is more self-sufficient. Element is used as the base for DataTable and Charts.

Both provide you with different functionality and you should go with one or the other depending on the type of widget you wish to create."</description>
		<content:encoded><![CDATA[<p>Sorry, my comment was partly truncated. I meant:</p>
<p>&#8220;You would extend Element to create widgets more based on one HTMLElement, which is more self-sufficient. Element is used as the base for DataTable and Charts.</p>
<p>Both provide you with different functionality and you should go with one or the other depending on the type of widget you wish to create.&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cyril Doussin</title>
		<link>http://yuiblog.com/blog/2007/12/19/custommodules/#comment-262478</link>
		<dc:creator>Cyril Doussin</dc:creator>
		<pubDate>Thu, 20 Dec 2007 11:42:14 +0000</pubDate>
		<guid>http://yuiblog.com/blog/2007/12/19/custommodules/#comment-262478</guid>
		<description>Thanks for the positive comments.

@Greg:

Extending Module and extending Element are two different ways of creating your own custom "widgets".

Module as its name states is more appropriate to create "content-containing" widgets, potentially with a header/body/footer structure, and many other elements in its body part.

You would extend Element to create widgets more based on one HTMLElement, which is more self-sufficient. Element is used as the base for DataTable and 

Both provide you with different functionality and you should go with one or the other depending on the type 

Please also note that, even though it is used internally, Element is officially in beta, so parts of its API may change in future releases.

If you need to create an independent piece of logic code, which doesn't necessarily have a representation in the DOM, you could still use AttributeProvider, which is part of Element.js, to handle all its properties in a very structured and powerful way.
Look out for more on this topic in the future :)</description>
		<content:encoded><![CDATA[<p>Thanks for the positive comments.</p>
<p>@Greg:</p>
<p>Extending Module and extending Element are two different ways of creating your own custom &#8220;widgets&#8221;.</p>
<p>Module as its name states is more appropriate to create &#8220;content-containing&#8221; widgets, potentially with a header/body/footer structure, and many other elements in its body part.</p>
<p>You would extend Element to create widgets more based on one HTMLElement, which is more self-sufficient. Element is used as the base for DataTable and </p>
<p>Both provide you with different functionality and you should go with one or the other depending on the type </p>
<p>Please also note that, even though it is used internally, Element is officially in beta, so parts of its API may change in future releases.</p>
<p>If you need to create an independent piece of logic code, which doesn&#8217;t necessarily have a representation in the DOM, you could still use AttributeProvider, which is part of Element.js, to handle all its properties in a very structured and powerful way.<br />
Look out for more on this topic in the future :)</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 1.932 seconds -->
