<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-3428280531116353301</id><updated>2024-09-12T11:45:52.336+01:00</updated><category term="FLEX"/><category term=".NET"/><category term="Ruby On Rails"/><category term="JavaFX"/><category term="Date"/><category term="SQL"/><category term="Datagrid"/><category term="DateField"/><category term="De-serialization"/><category term="Popup Manager"/><category term="Recurrence Pattern"/><category term="Serialization"/><category term="dynamic finders"/><category term="filterFunction"/><category term="popup button"/><category term="ASP"/><category term="Alert"/><category term="ArrayCollection"/><category term="Binary"/><category term="Checkbox"/><category term="Collections"/><category term="ComboBox"/><category term="Containers"/><category term="Database"/><category term="Database Views"/><category term="DateChooser"/><category term="DateFormatters"/><category term="Display"/><category term="GDI"/><category term="Graphics"/><category term="HTTP"/><category term="IO"/><category term="Inheritance"/><category term="LIKE"/><category term="Linked Tables"/><category term="MS-Access"/><category term="Open Office"/><category term="Passing Parameters using URL"/><category term="Process"/><category term="Programming Techniques"/><category term="Repeaters"/><category term="Request"/><category term="Response"/><category term="Sequences"/><category term="Simple Math functions"/><category term="Soap"/><category term="System Processes"/><category term="TECH NEWS"/><category term="URL"/><category term="Web Services"/><category term="Windows"/><category term="XML"/><category term="accordion"/><category term="filtering by date"/><category term="labelField"/><title type='text'>Programming Articles</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://amthekkel.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3428280531116353301/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://amthekkel.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/3428280531116353301/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>39</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3428280531116353301.post-5762911362439767757</id><published>2009-02-02T10:21:00.002+00:00</published><updated>2009-02-02T10:25:31.323+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="JavaFX"/><category scheme="http://www.blogger.com/atom/ns#" term="Sequences"/><title type='text'>JavaFX - Introduction to Sequences</title><content type='html'>&lt;meta equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot;&gt;&lt;meta name=&quot;ProgId&quot; content=&quot;Word.Document&quot;&gt;&lt;meta name=&quot;Generator&quot; content=&quot;Microsoft Word 11&quot;&gt;&lt;meta name=&quot;Originator&quot; content=&quot;Microsoft Word 11&quot;&gt;&lt;link rel=&quot;File-List&quot; href=&quot;file:///C:%5CDOCUME%7E1%5Camathews%5CLOCALS%7E1%5CTemp%5Cmsohtml1%5C01%5Cclip_filelist.xml&quot;&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:worddocument&gt;   &lt;w:view&gt;Normal&lt;/w:View&gt;   &lt;w:zoom&gt;0&lt;/w:Zoom&gt;   &lt;w:punctuationkerning/&gt;   &lt;w:validateagainstschemas/&gt;   &lt;w:saveifxmlinvalid&gt;false&lt;/w:SaveIfXMLInvalid&gt;   &lt;w:ignoremixedcontent&gt;false&lt;/w:IgnoreMixedContent&gt;   &lt;w:alwaysshowplaceholdertext&gt;false&lt;/w:AlwaysShowPlaceholderText&gt;   &lt;w:compatibility&gt;    &lt;w:breakwrappedtables/&gt;    &lt;w:snaptogridincell/&gt;    &lt;w:wraptextwithpunct/&gt;    &lt;w:useasianbreakrules/&gt;    &lt;w:dontgrowautofit/&gt;   &lt;/w:Compatibility&gt;   &lt;w:browserlevel&gt;MicrosoftInternetExplorer4&lt;/w:BrowserLevel&gt;  &lt;/w:WordDocument&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:latentstyles deflockedstate=&quot;false&quot; latentstylecount=&quot;156&quot;&gt;  &lt;/w:LatentStyles&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;style&gt; &lt;!--  /* Font Definitions */  @font-face 	{font-family:Wingdings; 	panose-1:5 0 0 0 0 0 0 0 0 0; 	mso-font-charset:2; 	mso-generic-font-family:auto; 	mso-font-pitch:variable; 	mso-font-signature:0 268435456 0 0 -2147483648 0;} @font-face 	{font-family:Verdana; 	panose-1:2 11 6 4 3 5 4 4 2 4; 	mso-font-charset:0; 	mso-generic-font-family:swiss; 	mso-font-pitch:variable; 	mso-font-signature:536871559 0 0 0 415 0;}  /* Style Definitions */  p.MsoNormal, li.MsoNormal, div.MsoNormal 	{mso-style-parent:&quot;&quot;; 	margin:0cm; 	margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:12.0pt; 	font-family:Verdana; 	mso-fareast-font-family:&quot;Times New Roman&quot;; 	mso-bidi-font-family:&quot;Times New Roman&quot;;} @page Section1 	{size:612.0pt 792.0pt; 	margin:72.0pt 90.0pt 72.0pt 90.0pt; 	mso-header-margin:36.0pt; 	mso-footer-margin:36.0pt; 	mso-paper-source:0;} div.Section1 	{page:Section1;}  /* List Definitions */  @list l0 	{mso-list-id:55249890; 	mso-list-type:hybrid; 	mso-list-template-ids:-197225818 67698689 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;} @list l0:level1 	{mso-level-number-format:bullet; 	mso-level-text:; 	mso-level-tab-stop:54.0pt; 	mso-level-number-position:left; 	margin-left:54.0pt; 	text-indent:-18.0pt; 	font-family:Symbol;} ol 	{margin-bottom:0cm;} ul 	{margin-bottom:0cm;} --&gt; &lt;/style&gt;&lt;!--[if gte mso 10]&gt; &lt;style&gt;  /* Style Definitions */  table.MsoNormalTable 	{mso-style-name:&quot;Table Normal&quot;; 	mso-tstyle-rowband-size:0; 	mso-tstyle-colband-size:0; 	mso-style-noshow:yes; 	mso-style-parent:&quot;&quot;; 	mso-padding-alt:0cm 5.4pt 0cm 5.4pt; 	mso-para-margin:0cm; 	mso-para-margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:10.0pt; 	font-family:&quot;Times New Roman&quot;; 	mso-ansi-language:#0400; 	mso-fareast-language:#0400; 	mso-bidi-language:#0400;} &lt;/style&gt; &lt;![endif]--&gt;&lt;span style=&quot;&quot; lang=&quot;EN-GB&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;    &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot; lang=&quot;EN-GB&quot;&gt;Sequences are clever arrays but differ widely from the primitive java arrays and have more commonality with collections in Java.&lt;/span&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;!--[if !supportLists]--&gt;&lt;!--[endif]--&gt;&lt;span style=&quot;&quot; lang=&quot;EN-GB&quot;&gt;Sequence uses a square bracket syntax&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;      &lt;ul&gt;&lt;li&gt;&lt;span  lang=&quot;EN-GB&quot; style=&quot;font-family:Symbol;&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:7;&quot;  &gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style=&quot;&quot; lang=&quot;EN-GB&quot;&gt;You can declare an object type when declaring the sequence as follows&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot; lang=&quot;EN-GB&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 72pt;&quot;&gt;&lt;span style=&quot;&quot; lang=&quot;EN-GB&quot;&gt;var s1:String[] = [“a1”,”a2”,”a3”,”a4”]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 72pt;&quot;&gt;&lt;span style=&quot;&quot; lang=&quot;EN-GB&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 72pt;&quot;&gt;&lt;span style=&quot;&quot; lang=&quot;EN-GB&quot;&gt;or you can declare it without an object type as&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 72pt;&quot;&gt;&lt;span style=&quot;&quot; lang=&quot;EN-GB&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 72pt; text-align: left;&quot;&gt;&lt;span style=&quot;&quot; lang=&quot;EN-GB&quot;&gt;var s1 = [“a1”,”a2”, ”a3”,”a4”]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt;&quot;&gt;&lt;span style=&quot;&quot; lang=&quot;EN-GB&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;ul&gt;&lt;li&gt;&lt;!--[if !supportLists]--&gt;&lt;span  lang=&quot;EN-GB&quot; style=&quot;font-family:Symbol;&quot;&gt;&lt;span style=&quot;&quot;&gt;·&lt;span style=&quot;;font-family:&amp;quot;;font-size:7;&quot;  &gt;        &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style=&quot;&quot; lang=&quot;EN-GB&quot;&gt;Inserting a sequence as an element of another sequence, results in the new sequence containing elements of the old sequence and the new elements.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 54pt;&quot;&gt;&lt;span style=&quot;&quot; lang=&quot;EN-GB&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 54pt;&quot;&gt;&lt;span style=&quot;&quot; lang=&quot;EN-GB&quot;&gt;e.g. var s2:String = [s1,”a5”,”a6”] &lt;span style=&quot;&quot;&gt; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 54pt;&quot;&gt;&lt;span style=&quot;&quot; lang=&quot;EN-GB&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 54pt;&quot;&gt;&lt;span style=&quot;&quot; lang=&quot;EN-GB&quot;&gt;//s2 now contains [“a1”,”a2”,”a3”,”a4”,”a5,”a6]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 54pt;&quot;&gt;&lt;span style=&quot;&quot; lang=&quot;EN-GB&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;ul&gt;&lt;li&gt;&lt;!--[if !supportLists]--&gt;&lt;span  lang=&quot;EN-GB&quot; style=&quot;font-family:Symbol;&quot;&gt;&lt;span style=&quot;&quot;&gt;·&lt;span style=&quot;;font-family:&amp;quot;;font-size:7;&quot;  &gt;        &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style=&quot;&quot; lang=&quot;EN-GB&quot;&gt;Sequences like Java arrays have a starting index of 0 and elements can be used by passing their index in square brackets&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 54pt;&quot;&gt;&lt;span style=&quot;&quot; lang=&quot;EN-GB&quot;&gt;e.g. &lt;span style=&quot;&quot;&gt; &lt;/span&gt;System.out.printf(“displaying 1&lt;sup&gt;st&lt;/sup&gt; and 3&lt;sup&gt;rd&lt;/sup&gt; element of s1” + s1[0]+” “+s1[2]);&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 54pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 54pt;&quot;&gt;//output  :    displaying &lt;span style=&quot;&quot; lang=&quot;EN-GB&quot;&gt;1&lt;sup&gt;st&lt;/sup&gt; and 3&lt;sup&gt;rd&lt;/sup&gt; element of s1 a1  a3&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;&quot; lang=&quot;EN-GB&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot; lang=&quot;EN-GB&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  </content><link rel='replies' type='application/atom+xml' href='http://amthekkel.blogspot.com/feeds/5762911362439767757/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3428280531116353301/5762911362439767757' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3428280531116353301/posts/default/5762911362439767757'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3428280531116353301/posts/default/5762911362439767757'/><link rel='alternate' type='text/html' href='http://amthekkel.blogspot.com/2009/02/javafx-introduction-to-sequences.html' title='JavaFX - Introduction to Sequences'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3428280531116353301.post-1576964618920542145</id><published>2009-02-01T14:45:00.002+00:00</published><updated>2009-02-01T14:48:59.564+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Inheritance"/><category scheme="http://www.blogger.com/atom/ns#" term="JavaFX"/><title type='text'>JavaFX - Inheritance in JavaFX</title><content type='html'>The following is an example for inheritance in JavaFX&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;br /&gt;// Define class A&lt;br /&gt;class A {&lt;br /&gt;    var x: Integer;&lt;br /&gt;    var y: Integer;&lt;br /&gt;    function add(x: Integer, y: Integer): Integer {&lt;br /&gt;        return x  y;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    function subtract(x: Integer, y: Integer): Integer {&lt;br /&gt;        return x- y;&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;//Inheriting variables and methods from Class A and adding extra method.&lt;br /&gt;&lt;br /&gt;class B extends A {&lt;br /&gt;     function multiply(x: Integer, y: Integer): Integer {&lt;br /&gt;        return x * y;&lt;br /&gt;    }  &lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;// Creating and object of class B, which also has access to variables and methods of class A&lt;br /&gt;var c = B {&lt;br /&gt;    x: 21&lt;br /&gt;    y: 31&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;println(&amp;quot; adding two values {c.add(c.a, c.b)}&amp;quot;);&lt;br /&gt;println(&amp;quot; subtracting two values {c.subtract(c.b, c.a)}&amp;quot;);&lt;br /&gt;println(&amp;quot;multiplying two values= {c.multiply(c.a, c.b)}&amp;quot;);&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://amthekkel.blogspot.com/feeds/1576964618920542145/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3428280531116353301/1576964618920542145' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3428280531116353301/posts/default/1576964618920542145'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3428280531116353301/posts/default/1576964618920542145'/><link rel='alternate' type='text/html' href='http://amthekkel.blogspot.com/2009/02/javafx-inheritance-in-javafx.html' title='JavaFX - Inheritance in JavaFX'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3428280531116353301.post-812796387006082635</id><published>2009-02-01T13:41:00.003+00:00</published><updated>2009-02-01T14:01:48.686+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="JavaFX"/><category scheme="http://www.blogger.com/atom/ns#" term="Simple Math functions"/><title type='text'>JavaFX- doing simple maths function in Java FX</title><content type='html'>The following code creates a class for doing basic math function such as adding, subtracting, multiplying and dividing numbers.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;br /&gt;class Calc {&lt;br /&gt;   var a: Integer;&lt;br /&gt;   var b: Integer;&lt;br /&gt; &lt;br /&gt;   function add(a: Integer, b: Integer): Integer {&lt;br /&gt;       return a   b;&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;   function subtract(a: Integer, b: Integer): Integer {&lt;br /&gt;       return a - b;&lt;br /&gt;   }&lt;br /&gt;   function multiply(a: Integer, b: Integer): Integer {&lt;br /&gt;       return a * b;&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;// Note in JavaFX scripting language, Number represents Double data //type in Java. If you try passing the parameters as Integer, the result //will be an integer.&lt;br /&gt;   function divide(a: Number, b: Number):Number{&lt;br /&gt;     &lt;br /&gt;       return  a/b;&lt;br /&gt;   }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;var calc_obj= new Calc();&lt;br /&gt;println(&quot;adding two values = {calc_objadd(5, 6)}&quot;);&lt;br /&gt;println(&quot;subtracting two values = {calc_objsubtract(6, 5)}&quot;);&lt;br /&gt;println(&quot;multiply two values = {calc_objmultiply(5, 6)}&quot;);&lt;br /&gt;println(&quot;Dividing two values = {calc_objdivide(6, 4)}&quot;);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Another way to create an instance&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;// Literal object instance&lt;br /&gt;var calc_obj = Calc{&lt;br /&gt;   a: 20&lt;br /&gt;   b: 30&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;println(&quot;value 1 is = {calc_obj.a}&quot;);&lt;br /&gt;println(&quot; value 2 is = {calc_obj.b}&quot;);&lt;br /&gt;&lt;br /&gt;//calling the add method.&lt;br /&gt;println(&quot; of two values is = {calc_obj.add(calc_obj.a,calc_obj.b)}%&quot;);&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://amthekkel.blogspot.com/feeds/812796387006082635/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3428280531116353301/812796387006082635' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3428280531116353301/posts/default/812796387006082635'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3428280531116353301/posts/default/812796387006082635'/><link rel='alternate' type='text/html' href='http://amthekkel.blogspot.com/2009/02/javafx-doing-simple-maths-function-in.html' title='JavaFX- doing simple maths function in Java FX'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3428280531116353301.post-2819441656145648425</id><published>2009-02-01T11:43:00.001+00:00</published><updated>2009-02-01T11:51:56.473+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="JavaFX"/><title type='text'>JavaFX - Hello World program</title><content type='html'>Start Netbeans and create a new JavaFX project called MyFirstJavaFXApp&lt;br /&gt;&lt;br /&gt;Netbeans will automatically create a Main.fx file.  All that needs done is tweak the code slightly to your requirement. &lt;br /&gt;&lt;br /&gt;Change the content variable of the text object to “hello World” or what ever you like. I have put “Hello World – from Abhilash Mathews”&lt;br /&gt;&lt;br /&gt;If you want you can also change the title of the applet by changing the title variable , I have called it “My First Application”. Similarly, you can try changing the height and width to your requirements.&lt;br /&gt;&lt;br /&gt;Build your application ( in Netbeans, press F11 ). The run the application (F6 in Netbeans)&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;br /&gt;package myfirstjavafxapp;&lt;br /&gt;&lt;br /&gt;import javafx.stage.Stage;&lt;br /&gt;import javafx.scene.Scene;&lt;br /&gt;import javafx.scene.text.Text;&lt;br /&gt;import javafx.scene.text.Font;&lt;br /&gt;&lt;br /&gt;/**&lt;br /&gt; * @author amathews&lt;br /&gt; */&lt;br /&gt;&lt;br /&gt;Stage {&lt;br /&gt;    title: &amp;quot;My First Application&amp;quot;&lt;br /&gt;    width: 500&lt;br /&gt;    height: 80&lt;br /&gt;    scene: Scene {&lt;br /&gt;        content: Text {&lt;br /&gt;            font : Font {&lt;br /&gt;                size : 24&lt;br /&gt;            }&lt;br /&gt;            x: 10, y: 30&lt;br /&gt;            content: &amp;quot;Hello World - from Abhilash Mathews&amp;quot;&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://amthekkel.blogspot.com/feeds/2819441656145648425/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3428280531116353301/2819441656145648425' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3428280531116353301/posts/default/2819441656145648425'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3428280531116353301/posts/default/2819441656145648425'/><link rel='alternate' type='text/html' href='http://amthekkel.blogspot.com/2009/02/javafx-hello-world-program.html' title='JavaFX - Hello World program'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3428280531116353301.post-2923382292734131552</id><published>2009-01-30T14:41:00.005+00:00</published><updated>2009-01-30T15:57:14.315+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Containers"/><category scheme="http://www.blogger.com/atom/ns#" term="Display"/><category scheme="http://www.blogger.com/atom/ns#" term="FLEX"/><title type='text'>FLEX- Dynamically displaying containers</title><content type='html'>The following code shows how you can call different containers such as VBOX, HBOX etc based on user interaction&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I have four files, main.mxml, MainBox.mxml,MenuList.mxml,PeopleList.mxml&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;main.mxml contains my Application Component. This is basically a template file and just indicates whats to be included in each page, i.e the header, body and footer etc.&lt;br /&gt;&lt;br /&gt;MainBox.mxml, is the file that is populated in the body section of the template. My design for the body includes a main HBOX which is divided into two VBOX. The left VBOX called sidePanel is contains my menu options including various buttons that can be used to request for a particular functionality. MenuList.mxml is loaded here using an accordion. {Note the pom name space created on the HBox declaration, this creates a namespace that refers to all my component files including MenuList.mxml}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&amp;gt;&lt;br /&gt;&amp;lt;mx:HBox xmlns:mx=&quot;http://www.adobe.com/2006/mxml&quot; xmlns:pom=&quot;com.abhi.components.*&quot; paddingLeft=&quot;5&quot;/&amp;gt;&lt;br /&gt;&amp;lt;mx:VBox width=&quot;257&quot; height=&quot;90%&quot;&amp;gt;&lt;br /&gt;&amp;lt;mx:Accordion width=&quot;254&quot; height=&quot;350&quot;&amp;gt;&lt;br /&gt;&amp;lt;pom:MenuList id=&quot;menuList&quot;/&amp;gt;&lt;br /&gt;&amp;lt;/mx:Accordion&amp;gt;&lt;br /&gt;&amp;lt;/mx:VBox&amp;gt;&lt;br /&gt;&amp;lt;/mx:HBox&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The right VBOX called mainPanel, this is the container that will host the different containers based on user interactions carried out in the sidePanel.&lt;br /&gt;&lt;br /&gt;The following is a section of the code from the MenuList.mxml file. Here is a link button that onclick launches the function launchPanel and passes the name of the PeopleList.mxml path as a string.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;mx:LinkButton label=&quot;View People&quot; width=&quot;92&quot; click=&quot;launchPanel(&#39;com.abhi.components.PeopleList&#39;)&quot;/&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Here is the code for the launchPanel function&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;import com.abhi.components.*;&lt;br /&gt;import mx.core.ClassFactory;&lt;br /&gt;import flash.utils.getQualifiedClassName;&lt;br /&gt;import flash.utils.getDefinitionByName;&lt;br /&gt;&lt;br /&gt;public function launchPanel(classToUse:String):void&lt;br /&gt;{&lt;br /&gt;//remove all existing children that have been added to the mainPanel&lt;br /&gt; Application.application.MainBox.mainPanel.removeAllChildren();&lt;br /&gt;&lt;br /&gt;// Get a reference to the component&#39;s class&lt;br /&gt;var classRef:Class = getDefinitionByName(classToUse) as Class;&lt;br /&gt;// Create factory object&lt;br /&gt;var factory:ClassFactory = new ClassFactory(classRef);&lt;br /&gt;// Create a new instance of the component&lt;br /&gt;var comp:* = factory.newInstance();&lt;br /&gt;// add it to the mainPanel&lt;br /&gt;Application.application.MainBox.mainPanel.addChild(comp);&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;(Note: credit for the above code goes to Paulo, here is the link to the original article http://www.paulofierro.com/archives/520/ }&lt;br /&gt;&lt;br /&gt;The imports are necessary for the above function to work. The function gets the name of the mxml component as a string i.e. %u201Ccom.abhi.components.PeopleList%u201D. It then clears any existing containers that are already added to the mainPanel.  Rest of the code is self explanatory.&lt;br /&gt;&lt;br /&gt;PeopleList.mxml, contains a VBOX and couple of components that need to be displayed.</content><link rel='replies' type='application/atom+xml' href='http://amthekkel.blogspot.com/feeds/2923382292734131552/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3428280531116353301/2923382292734131552' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3428280531116353301/posts/default/2923382292734131552'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3428280531116353301/posts/default/2923382292734131552'/><link rel='alternate' type='text/html' href='http://amthekkel.blogspot.com/2009/01/flex-dynamically-displaying-containers.html' title='FLEX- Dynamically displaying containers'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3428280531116353301.post-1412971249921112484</id><published>2009-01-28T12:59:00.002+00:00</published><updated>2009-01-28T13:15:25.106+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Open Office"/><category scheme="http://www.blogger.com/atom/ns#" term="TECH NEWS"/><title type='text'>TECH NEWS - Open Office 3.0.1 released</title><content type='html'>Open office, one of the best open source alternatives to a an office suite has released version 3.0.1. This is a major update to Version 3.0 which was released last year. Support is available for Windows, Linux and Mac OS platforms.&lt;br /&gt;&lt;br /&gt;Currently, support for only the English and German version is available. Installation files for other regions will be available shortly. Follow the link to access the download page where you will be able to choose the version, language and platform as per your requirement.&lt;br /&gt;&lt;br /&gt;Download link : http://download.openoffice.org/other.html#en-US</content><link rel='replies' type='application/atom+xml' href='http://amthekkel.blogspot.com/feeds/1412971249921112484/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3428280531116353301/1412971249921112484' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3428280531116353301/posts/default/1412971249921112484'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3428280531116353301/posts/default/1412971249921112484'/><link rel='alternate' type='text/html' href='http://amthekkel.blogspot.com/2009/01/tech-news-open-office-301-released.html' title='TECH NEWS - Open Office 3.0.1 released'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3428280531116353301.post-5346484646224367142</id><published>2009-01-26T15:05:00.004+00:00</published><updated>2009-01-26T15:20:02.840+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ComboBox"/><category scheme="http://www.blogger.com/atom/ns#" term="FLEX"/><category scheme="http://www.blogger.com/atom/ns#" term="labelField"/><title type='text'>FLEX- Displaying xml data in ComboBox</title><content type='html'>The following section shows how to display selected XML element while displaying xml in a Flex ComboBox component.&lt;br /&gt;&lt;br /&gt;The following are two elements in an xml list called &lt;span style=&quot;font-weight: bold;&quot;&gt;ListXLC.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;LOOKUPVALUES&amp;gt;&lt;br /&gt; &amp;lt;STOREVALUE&amp;gt;{12122-311}&amp;lt;/STOREVALUE&amp;gt;&lt;br /&gt; &amp;lt;DISPLAYVALUE&amp;gt;Car&amp;lt;/DISPLAYVALUE&amp;gt;&lt;br /&gt;&amp;lt;/LOOKUPVALUES&amp;gt;&lt;br /&gt;&amp;lt;LOOKUPVALUES&amp;gt;&lt;br /&gt; &amp;lt;STOREVALUE&amp;gt;{12124-233}&amp;lt;/STOREVALUE&amp;gt;&lt;br /&gt; &amp;lt;DISPLAYVALUE&amp;gt;Bike&amp;lt;/DISPLAYVALUE&amp;gt;&lt;br /&gt;&amp;lt;/LOOKUPVALUES&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;To display the xmlList in a combo box, displaying each node by its &lt;span style=&quot;font-weight: bold; font-style: italic;&quot;&gt;DISPLAYVALUE&lt;/span&gt; name i.e car, bike etc.., the &lt;span style=&quot;font-weight: bold;&quot;&gt;labelField&lt;/span&gt; property of the combobox should be set to D&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;mx:ComboBox id=&quot;cmbList&quot; dataProvider=&quot;{ListXLC}&quot; labelField=&quot;DISPLAYVALUE&quot;/&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Failing to provide the labelField will result in the combo box displaying each xml node as an item in the combobox list. So instead of seeing &lt;span style=&quot;font-weight: bold;&quot;&gt;car&lt;span style=&quot;font-style: italic;&quot;&gt;&lt;/span&gt;&lt;/span&gt; the following will be displayed:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;LOOKUPVALUES&amp;gt;&lt;br /&gt; &amp;lt;STOREVALUE&amp;gt;{12122-311}&amp;lt;/STOREVALUE&amp;gt;&lt;br /&gt; &amp;lt;DISPLAYVALUE&amp;gt;Car&amp;lt;/DISPLAYVALUE&amp;gt;&lt;br /&gt;&amp;lt;/LOOKUPVALUES&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;To display the STOREVALUE instead of the DISPLAYVALUE, just change the labelField to point at the STOREVALUE instead, as follows:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;mx:ComboBox id=&quot;cmbList&quot; dataProvider=&quot;{ListXLC}&quot; labelField=&quot;STOREVALUE&quot;/&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://amthekkel.blogspot.com/feeds/5346484646224367142/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3428280531116353301/5346484646224367142' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3428280531116353301/posts/default/5346484646224367142'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3428280531116353301/posts/default/5346484646224367142'/><link rel='alternate' type='text/html' href='http://amthekkel.blogspot.com/2009/01/flex-displaying-xml-data-in-combobox.html' title='FLEX- Displaying xml data in ComboBox'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3428280531116353301.post-5981837054460098587</id><published>2009-01-26T10:33:00.003+00:00</published><updated>2009-01-26T10:51:04.296+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Datagrid"/><category scheme="http://www.blogger.com/atom/ns#" term="FLEX"/><category scheme="http://www.blogger.com/atom/ns#" term="popup button"/><category scheme="http://www.blogger.com/atom/ns#" term="Popup Manager"/><title type='text'>FLEX - Displaying a DataGrid using Popup button</title><content type='html'>The following code shows how to display a  DataGrid Component when clicking on a popup button.&lt;br /&gt;&lt;br /&gt;call the necessary imports.. &lt;br /&gt;&lt;br /&gt;import mx.managers.PopUpManager;&lt;br /&gt;import mx.core.IFlexDisplayObject;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;mx:PopUpButton x=&amp;quot;331&amp;quot; y=&amp;quot;24&amp;quot; label=&amp;quot;Select an Item&amp;quot; width=&amp;quot;235&amp;quot; openAlways=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;     &amp;lt;mx:popUp&amp;gt;&lt;br /&gt;   &amp;lt;mx:DataGrid id=&amp;quot;FilterDataGrid&amp;quot; dataProvider=&amp;quot;{ListXLC}&amp;quot;&amp;gt;&lt;br /&gt;    &amp;lt;mx:columns&amp;gt;&lt;br /&gt;     &amp;lt;mx:DataGridColumn dataField=&amp;quot;FIRSTNAME&amp;quot; headerText=&amp;quot;First Name&amp;quot;/&amp;gt;&lt;br /&gt;     &amp;lt;mx:DataGridColumn dataField=&amp;quot;LASTNAME&amp;quot; headerText=&amp;quot;Last Name&amp;quot;/&amp;gt;&lt;br /&gt;     &amp;lt;mx:DataGridColumn dataField=&amp;quot;REFERENCENUMBER&amp;quot; headerText=&amp;quot;Reference No&amp;quot;/&amp;gt;&lt;br /&gt;   &amp;lt;/mx:columns&amp;gt;&lt;br /&gt;  &amp;lt;/mx:DataGrid&amp;gt;&lt;br /&gt;  &amp;lt;/mx:popUp&amp;gt;&lt;br /&gt;  &amp;lt;/mx:PopUpButton&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;In the above code, when the popup button is opened, the specified DataGrid is displayed.</content><link rel='replies' type='application/atom+xml' href='http://amthekkel.blogspot.com/feeds/5981837054460098587/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3428280531116353301/5981837054460098587' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3428280531116353301/posts/default/5981837054460098587'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3428280531116353301/posts/default/5981837054460098587'/><link rel='alternate' type='text/html' href='http://amthekkel.blogspot.com/2009/01/flex-displaying-datagrid-using-popup.html' title='FLEX - Displaying a DataGrid using Popup button'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3428280531116353301.post-3850228945163727451</id><published>2009-01-22T17:14:00.002+00:00</published><updated>2009-01-22T17:24:07.527+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="FLEX"/><category scheme="http://www.blogger.com/atom/ns#" term="popup button"/><title type='text'>FLEX - popUpButton openAlways attribute</title><content type='html'>A popup button consists of two sections. The main button and the down arrow button.&lt;br /&gt;&lt;br /&gt;By default , clicking on the main button does not open up the popup window. This is because the openAlways attribute is set to false. Therefore in default mode, the only way to open the popup window is by pressing on the down arrow button.&lt;br /&gt;&lt;br /&gt;To allow the pop up window to appear when clicking on the main button as well, just set the openAlways attribute of the popup button to true. This can be done via ActionScript or when creating the mxml component.</content><link rel='replies' type='application/atom+xml' href='http://amthekkel.blogspot.com/feeds/3850228945163727451/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3428280531116353301/3850228945163727451' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3428280531116353301/posts/default/3850228945163727451'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3428280531116353301/posts/default/3850228945163727451'/><link rel='alternate' type='text/html' href='http://amthekkel.blogspot.com/2009/01/flex-popupbutton-openalways-attribute.html' title='FLEX - popUpButton openAlways attribute'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3428280531116353301.post-1058577781702285187</id><published>2009-01-22T14:37:00.002+00:00</published><updated>2009-01-22T15:04:14.785+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="dynamic finders"/><category scheme="http://www.blogger.com/atom/ns#" term="LIKE"/><category scheme="http://www.blogger.com/atom/ns#" term="Ruby On Rails"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL"/><title type='text'>Ruby on Rails - SELECT statement with LIKE clause</title><content type='html'>the following code shows to configure the controller to use the LIKE clause.&lt;br /&gt;&lt;br /&gt;e.g query. SELECT * FROM CUSTOMERS WHERE LASTNAME LIKE &#39;H%&#39;&lt;br /&gt;This query retrieves the records for all customers whose last name begins with the letter &#39;H&#39;&lt;br /&gt;&lt;br /&gt;@pid=&#39;H%&#39;&lt;br /&gt;@results=Customer.find(:all, :conditions =&gt; [&quot;LASTNAME LIKE ?&quot;, @pid])&lt;br /&gt;&lt;br /&gt;To make a more generic function that retrieves the records for all customers whose Last name begins with a letter specified by the user.&lt;br /&gt;&lt;br /&gt;The url if the user wants customer records for people with last name starting with J would look like&lt;br /&gt;&lt;br /&gt;http://localhost:3000/customers.xml?pid=J&lt;br /&gt;&lt;br /&gt;in your Customer controller index method&lt;br /&gt;&lt;br /&gt;@pid=params[:pid]+&#39;%&#39;&lt;br /&gt;@results=Customer.find(:all, :conditions =&gt; [&quot;LASTNAME LIKE ?&quot;, @pid])&lt;br /&gt;&lt;br /&gt;If the user doesn&#39;t provide the letter to search with, as is shown below&lt;br /&gt;&lt;br /&gt;http://localhost:3000/customers.xml?pid=&lt;br /&gt;&lt;br /&gt;the result will be that all records will be retrieved. &lt;br /&gt;&lt;br /&gt;The following is not possible as that results in an error&lt;br /&gt;&lt;br /&gt;http://localhost:3000/customers.xml?pid=J%</content><link rel='replies' type='application/atom+xml' href='http://amthekkel.blogspot.com/feeds/1058577781702285187/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3428280531116353301/1058577781702285187' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3428280531116353301/posts/default/1058577781702285187'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3428280531116353301/posts/default/1058577781702285187'/><link rel='alternate' type='text/html' href='http://amthekkel.blogspot.com/2009/01/ruby-on-rails-select-statement-with.html' title='Ruby on Rails - SELECT statement with LIKE clause'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3428280531116353301.post-6712262272096290993</id><published>2009-01-21T14:57:00.005+00:00</published><updated>2009-01-22T09:18:42.244+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="DateChooser"/><category scheme="http://www.blogger.com/atom/ns#" term="DateField"/><category scheme="http://www.blogger.com/atom/ns#" term="FLEX"/><title type='text'>FLEX - Enabling Year Navigation in Date Chooser &amp; DateField Component</title><content type='html'>The DateChooser and DateField component  in Flex by default, does not allow you to navigate from one year to the other unless you traverse through each month of that year. So if you are viewing Jan 2008 and want to see Jan 2009, you will have to traverse through Jan till dec 2008 before you reach Jan 2009.&lt;br /&gt;&lt;br /&gt;To have the option of navigating between years i.e from viewing Jan 2008 to Jan 2009 just set yearNavigationEnabled=&quot;true&quot; . This is one of the attributes for the DateChooser componenet and DateField components.This can be set either using actionscript or when creating the component using mxml.</content><link rel='replies' type='application/atom+xml' href='http://amthekkel.blogspot.com/feeds/6712262272096290993/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3428280531116353301/6712262272096290993' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3428280531116353301/posts/default/6712262272096290993'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3428280531116353301/posts/default/6712262272096290993'/><link rel='alternate' type='text/html' href='http://amthekkel.blogspot.com/2009/01/flex-enabling-year-navigation-in-date.html' title='FLEX - Enabling Year Navigation in Date Chooser &amp; DateField Component'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3428280531116353301.post-6021577333041292328</id><published>2009-01-20T18:47:00.003+00:00</published><updated>2009-01-20T18:51:21.857+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="filterFunction"/><category scheme="http://www.blogger.com/atom/ns#" term="FLEX"/><title type='text'>FLEX - Resetting a filterFunction</title><content type='html'>The following code shows how to reset the filterFuntion. &lt;br /&gt;Suppose you have a ListCollectionView called myList&lt;br /&gt;&lt;br /&gt;you have previously set a filterFunction for myList somewhere in your code.(To learn about using filterFuntion please read this article &lt;a href=&quot;http://amthekkel.blogspot.com/search/label/filterFunction&quot;&gt;&lt;/a&gt; )&lt;br /&gt;&lt;br /&gt;Here is the code to reset the filterFunction&lt;br /&gt;&lt;br /&gt;myList.filterFuntion=null;&lt;br /&gt;myList.refresh();&lt;br /&gt;&lt;br /&gt;Do remember to refresh your collection for the changes to take effect.</content><link rel='replies' type='application/atom+xml' href='http://amthekkel.blogspot.com/feeds/6021577333041292328/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3428280531116353301/6021577333041292328' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3428280531116353301/posts/default/6021577333041292328'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3428280531116353301/posts/default/6021577333041292328'/><link rel='alternate' type='text/html' href='http://amthekkel.blogspot.com/2009/01/flex-resetting-filterfunction.html' title='FLEX - Resetting a filterFunction'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3428280531116353301.post-2424088799946248238</id><published>2009-01-20T18:03:00.002+00:00</published><updated>2009-01-20T18:13:11.795+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Collections"/><category scheme="http://www.blogger.com/atom/ns#" term="Datagrid"/><category scheme="http://www.blogger.com/atom/ns#" term="FLEX"/><title type='text'>FLEX - Listening for changes to Datagrid Data provider</title><content type='html'>The following code shows how to listen for changes to a dataprovider for a datagrid.&lt;br /&gt;&lt;br /&gt;Lets say you have an XMLList called  dp as your dataprovider for your datagrid.&lt;br /&gt;and Lets say your datagrid is called DGrid&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;import mx.controls.Alert;&lt;br /&gt;import mx.events.CollectionEvent;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;public function init():void&lt;br /&gt;{//add an Event listener to the datagrid to listen for change in dataprovider&lt;br /&gt; //specify the function that will handle the change as the second parameter&lt;br /&gt; DGrid.addEventListener(CollectionEvent.COLLECTION_CHANGE, handleChangeEvent);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;//function for handling the data change event&lt;br /&gt;public function handleChangeEvent(event:CollectionEvent):void&lt;br /&gt;{&lt;br /&gt; Alert.show(&amp;quot;Data provider has been changed&amp;quot;);&lt;br /&gt; //rest of the code for dealing with data change&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://amthekkel.blogspot.com/feeds/2424088799946248238/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3428280531116353301/2424088799946248238' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3428280531116353301/posts/default/2424088799946248238'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3428280531116353301/posts/default/2424088799946248238'/><link rel='alternate' type='text/html' href='http://amthekkel.blogspot.com/2009/01/flex-listening-for-changes-to-datagrid.html' title='FLEX - Listening for changes to Datagrid Data provider'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3428280531116353301.post-2096536852733099616</id><published>2009-01-20T17:28:00.003+00:00</published><updated>2009-01-20T17:43:27.277+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="dynamic finders"/><category scheme="http://www.blogger.com/atom/ns#" term="filtering by date"/><category scheme="http://www.blogger.com/atom/ns#" term="Ruby On Rails"/><title type='text'>Ruby on Rails - Filtering records based on date range</title><content type='html'>The following code shows how to pass date values to the controller and filter records that have their StartTime value lying in between these dates.&lt;br /&gt;&lt;br /&gt;my url is http://localhost:3000/amshift.xml?startdate=01/01/2009&amp;amp;enddate=01/03/2009&lt;br /&gt;&lt;br /&gt;here amshift relates to my controller and startdate and enddate are the date range&lt;br /&gt;&lt;br /&gt;Here is my controller&#39;s index action &lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;def index&lt;br /&gt;&lt;br /&gt; # storing the parameters in variables and converting them into date time&lt;br /&gt; @from_date = Date.strptime(params[:startdate],&amp;quot;%d/%m/%Y&amp;quot;)&lt;br /&gt; @to_date = Date.strptime(params[:enddate],&amp;quot;%d/%m/%Y&amp;quot;)&lt;br /&gt;&lt;br /&gt;@amshift=Amshift.find(:all,conditions =&amp;gt; [&amp;quot;StartTime &amp;gt; ? and StartTime &amp;lt; ?&amp;quot;,@from_date,@end_date])&lt;br /&gt;&lt;br /&gt; respond_to do |format|&lt;br /&gt;      format.html # index.html.erb&lt;br /&gt;      format.xml  { render :xml =&amp;gt; @amshift }&lt;br /&gt;    end&lt;br /&gt;  end&lt;br /&gt;&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://amthekkel.blogspot.com/feeds/2096536852733099616/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3428280531116353301/2096536852733099616' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3428280531116353301/posts/default/2096536852733099616'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3428280531116353301/posts/default/2096536852733099616'/><link rel='alternate' type='text/html' href='http://amthekkel.blogspot.com/2009/01/ruby-on-rails-filtering-records-based.html' title='Ruby on Rails - Filtering records based on date range'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3428280531116353301.post-5235305673293654170</id><published>2009-01-16T18:31:00.004+00:00</published><updated>2009-01-16T18:40:33.081+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Date"/><category scheme="http://www.blogger.com/atom/ns#" term="FLEX"/><title type='text'>FLEX- converting date string to date</title><content type='html'>Following code is used to convert a date string into a date object. For this you need to use &lt;br /&gt;&lt;br /&gt;import mx.controls.DateField; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt; var d:Date = DateField.stringToDate(&quot;30-12-2007&quot;,&quot;DD-MM-YYYY&quot;);&lt;br /&gt;&lt;br /&gt;or &lt;br /&gt;&lt;br /&gt;var d:Date = DateField.stringToDate(&quot;30/12/2007&quot;,&quot;DD/MM/YYYY&quot;);&lt;br /&gt;&lt;br /&gt;the first parameter is the date string you want to convert. the second parameter is the&lt;br /&gt;date pattern in which the string is formatted.</content><link rel='replies' type='application/atom+xml' href='http://amthekkel.blogspot.com/feeds/5235305673293654170/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3428280531116353301/5235305673293654170' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3428280531116353301/posts/default/5235305673293654170'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3428280531116353301/posts/default/5235305673293654170'/><link rel='alternate' type='text/html' href='http://amthekkel.blogspot.com/2009/01/flex-converting-date-string-to-date.html' title='FLEX- converting date string to date'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3428280531116353301.post-8073675625063717872</id><published>2009-01-16T17:47:00.002+00:00</published><updated>2009-01-16T17:52:29.403+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Alert"/><category scheme="http://www.blogger.com/atom/ns#" term="FLEX"/><title type='text'>FLEX - Using Alert box for confirmation</title><content type='html'>&lt;meta equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot;&gt;&lt;meta name=&quot;ProgId&quot; content=&quot;Word.Document&quot;&gt;&lt;meta name=&quot;Generator&quot; content=&quot;Microsoft Word 11&quot;&gt;&lt;meta name=&quot;Originator&quot; content=&quot;Microsoft Word 11&quot;&gt;&lt;link rel=&quot;File-List&quot; href=&quot;file:///C:%5CDOCUME%7E1%5CABHILA%7E1.MAT%5CLOCALS%7E1%5CTemp%5C20%5Cmsohtml1%5C01%5Cclip_filelist.xml&quot;&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:worddocument&gt;   &lt;w:view&gt;Normal&lt;/w:View&gt;   &lt;w:zoom&gt;0&lt;/w:Zoom&gt;   &lt;w:punctuationkerning/&gt;   &lt;w:validateagainstschemas/&gt;   &lt;w:saveifxmlinvalid&gt;false&lt;/w:SaveIfXMLInvalid&gt;   &lt;w:ignoremixedcontent&gt;false&lt;/w:IgnoreMixedContent&gt;   &lt;w:alwaysshowplaceholdertext&gt;false&lt;/w:AlwaysShowPlaceholderText&gt;   &lt;w:compatibility&gt;    &lt;w:breakwrappedtables/&gt;    &lt;w:snaptogridincell/&gt;    &lt;w:wraptextwithpunct/&gt;    &lt;w:useasianbreakrules/&gt;    &lt;w:dontgrowautofit/&gt;   &lt;/w:Compatibility&gt;   &lt;w:browserlevel&gt;MicrosoftInternetExplorer4&lt;/w:BrowserLevel&gt;  &lt;/w:WordDocument&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:latentstyles deflockedstate=&quot;false&quot; latentstylecount=&quot;156&quot;&gt;  &lt;/w:LatentStyles&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;style&gt; &lt;!--  /* Font Definitions */  @font-face 	{font-family:Verdana; 	panose-1:2 11 6 4 3 5 4 4 2 4; 	mso-font-charset:0; 	mso-generic-font-family:swiss; 	mso-font-pitch:variable; 	mso-font-signature:536871559 0 0 0 415 0;}  /* Style Definitions */  p.MsoNormal, li.MsoNormal, div.MsoNormal 	{mso-style-parent:&quot;&quot;; 	margin:0cm; 	margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:12.0pt; 	font-family:&quot;Times New Roman&quot;; 	mso-fareast-font-family:&quot;Times New Roman&quot;;} @page Section1 	{size:612.0pt 792.0pt; 	margin:72.0pt 90.0pt 72.0pt 90.0pt; 	mso-header-margin:36.0pt; 	mso-footer-margin:36.0pt; 	mso-paper-source:0;} div.Section1 	{page:Section1;} --&gt; &lt;/style&gt;&lt;!--[if gte mso 10]&gt; &lt;style&gt;  /* Style Definitions */  table.MsoNormalTable 	{mso-style-name:&quot;Table Normal&quot;; 	mso-tstyle-rowband-size:0; 	mso-tstyle-colband-size:0; 	mso-style-noshow:yes; 	mso-style-parent:&quot;&quot;; 	mso-padding-alt:0cm 5.4pt 0cm 5.4pt; 	mso-para-margin:0cm; 	mso-para-margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:10.0pt; 	font-family:&quot;Times New Roman&quot;; 	mso-ansi-language:#0400; 	mso-fareast-language:#0400; 	mso-bidi-language:#0400;} &lt;/style&gt; &lt;![endif]--&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;font-family:Verdana;&quot;&gt;The following code shows how to use the Alert box as confirmation dialog rather than just as a notification tool .The following code allows the user to press OK to confirm or Cancel to cancel the operation. You can also specify Alert.YES and Alert.NO.&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;br /&gt;&lt;span style=&quot;font-family:Verdana;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;font-family:Verdana;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;font-family:Verdana;&quot;&gt;First create a button component which the user presses to launch the update function. The click event launches the dialog box seeking confirmation and giving the user the option to confirm or cancel the update operation. The code specifies that update_function() should be used to process the user choice.&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;/p&gt;&lt;pre&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&amp;lt;mx:Button id=&quot;updateButton&quot; label=&quot;Update&quot;  height=&quot;30&quot; click=&#39;Alert.show(&quot;Confirm update&quot;,&quot;Warning&quot;,Alert.OK|Alert.CANCEL,this,update_function,null,Alert.OK);&#39;/&amp;gt;&lt;br /&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;/p&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Next, create the update_function in ActionScript&lt;p&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;/p&gt;&lt;pre&gt;&lt;br /&gt;public function update_CarePlanShift(eventObj:CloseEvent):void&lt;br /&gt;{&lt;br /&gt;    //if&lt;br /&gt;   if(eventObj.detail==Alert.OK)&lt;br /&gt;   {&lt;br /&gt;       //code for updating whatever needs to be update&lt;br /&gt;   }&lt;br /&gt;   else if(eventObj.detail==Alert.CANCEL)&lt;br /&gt;   {&lt;br /&gt;       //no code required here unless you want to notify the user that they have cancelled the operation&lt;br /&gt;   }&lt;br /&gt;}&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;/p&gt;&lt;/pre&gt;&lt;br /&gt;&lt;span style=&quot;font-family:Verdana;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;color:blue;&quot;  &gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  </content><link rel='replies' type='application/atom+xml' href='http://amthekkel.blogspot.com/feeds/8073675625063717872/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3428280531116353301/8073675625063717872' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3428280531116353301/posts/default/8073675625063717872'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3428280531116353301/posts/default/8073675625063717872'/><link rel='alternate' type='text/html' href='http://amthekkel.blogspot.com/2009/01/flex-using-alert-box-for-confirmation.html' title='FLEX - Using Alert box for confirmation'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3428280531116353301.post-5947543884086347797</id><published>2009-01-16T17:06:00.004+00:00</published><updated>2009-01-16T17:30:56.861+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Checkbox"/><category scheme="http://www.blogger.com/atom/ns#" term="FLEX"/><category scheme="http://www.blogger.com/atom/ns#" term="Recurrence Pattern"/><category scheme="http://www.blogger.com/atom/ns#" term="Repeaters"/><title type='text'>FLEX - Recurrence functionality using Repeaters</title><content type='html'>I had previously written a post on recurrence patterns (&lt;a href=&quot;http://amthekkel.blogspot.com/search/label/Recurrence%20Pattern&quot;&gt;link&lt;/a&gt;). The following code can be used to store recurrence information in FLEX.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Create an array that stores the days of the week.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;mx:Array id=&quot;dayOfWeek&quot;&amp;gt;&lt;br /&gt;    &amp;lt;mx:Object label=&quot;Sun&quot; data=&quot;true&quot; /&amp;gt;&lt;br /&gt;      &amp;lt;mx:Object label=&quot;Mon&quot; data=&quot;false&quot; /&amp;gt;&lt;br /&gt;      &amp;lt;mx:Object label=&quot;Tue&quot; data=&quot;fasle&quot; /&amp;gt;&lt;br /&gt;      &amp;lt;mx:Object label=&quot;Wed&quot; data=&quot;false&quot; /&amp;gt;&lt;br /&gt;      &amp;lt;mx:Object label=&quot;Thur&quot; data=&quot;false&quot; /&amp;gt;&lt;br /&gt;      &amp;lt;mx:Object label=&quot;Fri&quot; data=&quot;false&quot; /&amp;gt;&lt;br /&gt;      &amp;lt;mx:Object label=&quot;Sat&quot; data=&quot;true&quot; /&amp;gt;&lt;br /&gt;  &amp;lt;/mx:Array&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Create a repeater component that repeats a checkbox. The dataprovider for the repeater component is the array we created above. So FLEX creates one checkbox for each element in the array i.e 7 checkboxes. The label for each checkbox is also obtained from the array. To keep the checkboxes together we have wrapped the components in a HBox.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;mx:HBox width=&quot;100%&quot;&amp;gt;&lt;br /&gt;  &amp;lt;mx:Repeater id=&quot;recurrenceRP&quot; dataProvider=&quot;{dayOfWeek}&quot;&amp;gt;&lt;br /&gt;      &amp;lt;mx:CheckBox id=&quot;recurrenceCB&quot; label=&quot;{recurrenceRP.currentItem.label}&quot;  fontSize=&quot;12&quot; textAlign=&quot;left&quot;/&amp;gt;&lt;br /&gt;  &amp;lt;/mx:Repeater&amp;gt;     &lt;br /&gt;  &amp;lt;/mx:HBox&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;In action script write a function that verifies if any of the checkbox is checked or not. For each checkbox that% is selected &lt;span style=&quot;font-weight: bold;&quot;&gt;1&lt;/span&gt; is added to the string otherwise &lt;span style=&quot;font-weight: bold;&quot;&gt;0&lt;/span&gt; is added. So a string &lt;span style=&quot;font-weight: bold;&quot;&gt;1100011 &lt;/span&gt;represents Sun,Mon,Fri and Sat checkboxes being checked.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;br /&gt;public function recurrPatternToString():String&lt;br /&gt;{&lt;br /&gt;  var i:int;&lt;br /&gt;  var s:String;&lt;br /&gt;  s=&quot;&quot;;&lt;br /&gt;  for(i=0;i&amp;lt;7;i  )&lt;br /&gt;  { &lt;br /&gt;      if(recurrenceCB[i].selected)&lt;br /&gt;      {&lt;br /&gt;          s= s  &quot;1&quot;;&lt;br /&gt;      }&lt;br /&gt;      else if(!recurrenceCB[i].selected)&lt;br /&gt;      {&lt;br /&gt;          s= s  &quot;0&quot;;&lt;br /&gt;      }&lt;br /&gt;  }&lt;br /&gt;  return s;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;To display a recurrence string value using the checkboxes, do the following:&lt;br /&gt;Lets say rp contains the string &lt;span style=&quot;font-weight: bold;&quot;&gt;1100011&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;var i:int;&lt;br /&gt;  for(i=0; i&amp;lt;rp.length;i  )&lt;br /&gt;  { &lt;br /&gt;      if(rp.charCodeAt(i)==49)  //check if the character is 1&lt;br /&gt;      {&lt;br /&gt;          recurrenceCB[i].selected=true;         &lt;br /&gt;      }&lt;br /&gt;      else if(rp.charCodeAt(i)==48) //check if the character is 0&lt;br /&gt;      {&lt;br /&gt;        recurrenceCB[i].selected=false;&lt;br /&gt;      }     &lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://amthekkel.blogspot.com/feeds/5947543884086347797/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3428280531116353301/5947543884086347797' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3428280531116353301/posts/default/5947543884086347797'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3428280531116353301/posts/default/5947543884086347797'/><link rel='alternate' type='text/html' href='http://amthekkel.blogspot.com/2009/01/flex-recurrence-functionality-using.html' title='FLEX - Recurrence functionality using Repeaters'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3428280531116353301.post-572774120884250857</id><published>2009-01-16T12:03:00.002+00:00</published><updated>2009-01-16T12:07:48.203+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Date"/><category scheme="http://www.blogger.com/atom/ns#" term="DateField"/><category scheme="http://www.blogger.com/atom/ns#" term="FLEX"/><title type='text'>Flex - setting selected date for DateField</title><content type='html'>The following shows how to assign the selected date property of a DateField component in FLEX. &lt;br /&gt;&lt;br /&gt;var d:Date=new Date();&lt;br /&gt;&lt;br /&gt;//the following line of code will not work&lt;br /&gt;dateField1.selectedDate= d;&lt;br /&gt;&lt;br /&gt;To set the Datefield  with a date you need to do the following&lt;br /&gt;&lt;br /&gt;dateField1.selectedDate=new Date(d.fullYear,d.month, d.date);&lt;br /&gt;&lt;br /&gt;This is also applicable when you try and copy a date to a different date object.&lt;br /&gt;&lt;br /&gt;I had problems doing the following&lt;br /&gt;&lt;br /&gt;var d1:date= d;&lt;br /&gt;&lt;br /&gt;//this is how it was possible to achieve the above functionality&lt;br /&gt;&lt;br /&gt;var d1:date =new Date(d.fullYear,d.month,d.date);</content><link rel='replies' type='application/atom+xml' href='http://amthekkel.blogspot.com/feeds/572774120884250857/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3428280531116353301/572774120884250857' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3428280531116353301/posts/default/572774120884250857'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3428280531116353301/posts/default/572774120884250857'/><link rel='alternate' type='text/html' href='http://amthekkel.blogspot.com/2009/01/flex-setting-selected-date-for.html' title='Flex - setting selected date for DateField'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3428280531116353301.post-8100161007324735059</id><published>2009-01-16T11:48:00.002+00:00</published><updated>2009-01-16T12:37:01.829+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term=".NET"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL"/><title type='text'>.NET - SqlCommand and executiion types</title><content type='html'>Command&lt;br /&gt;&lt;br /&gt;Command allows database interaction using the SqlCommand class and uses the SqlCommand.CommandType and SqlCommand.CommandText properties for control. &lt;br /&gt;&lt;br /&gt;• CommandText property which contains a string value contains the sql statement that needs to be executed.&lt;br /&gt;• CommandType property can take one of three values explained below&lt;br /&gt;o CommandType.Text  : This is the default. It contains sql statement that needs to be executed. The CommandText property contains the sql statement&lt;br /&gt;&lt;br /&gt;o CommandType.Table : this is used to return a complete table from the database.The CommandText contains the name of the table&lt;br /&gt;&lt;br /&gt;o CommandType.StoredProcedure :  used to call a stored procedure. CommandText should contain the name of the stored procedure.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;There are four ways of executing an ADO.NET command&lt;br /&gt;&lt;br /&gt;1. ExecuteNonQuery: This is used for executing queries that do not return a result set. This includes carrying out operations such as INSERT, UPDATE or DELETING records. The system on execution returns an integer that represents the number of rows(records) that were affected.&lt;br /&gt;&lt;br /&gt;SqlCommand cmd=new SqlCommand(“INSERT INTO people (id,name) VALUES (‘1&#39;,&#39;test&#39;),con);&lt;br /&gt;&lt;br /&gt;cmd.ExecuteNonQuery();&lt;br /&gt;&lt;br /&gt;2. ExecuteScalar:  Is used when a single value is required from the database. This can be a count, sum, average etc. The return type of ExecuteScalar is an object and therefore must be cast to a suitable data type.&lt;br /&gt;&lt;br /&gt;       SqlCommand cmd=new SqlCommand(“SELECT count(*) FROM people”,con);&lt;br /&gt;&lt;br /&gt;      int count= (int) cmd.ExecuteScalar();  //casting return value to int&lt;br /&gt;&lt;br /&gt;3. ExecuteReader : Using ExecuteReader returns a SqlDataReader object which provides forward-only read access to the data. This is usually used with the SELECT statement&lt;br /&gt;&lt;br /&gt;         SqlCommand cmd=new SqlCommand(“SELECT * FROM people”,con);&lt;br /&gt;         SqlDataReader dr=cmd.ExecuteReader();&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Using the Read() method you can navigate forward-only, each Read() operation moves forward by one record. The Read() returns a true value if it is able to read a record otherwise it returns false. Generally,some loop is used to retrieve all the information.&lt;br /&gt;&lt;br /&gt;e.g  While(dr.Read()) //if there is another record to read&lt;br /&gt;   {&lt;br /&gt;        listbox1.items.add(dr[&quot;id&quot;]); // dr[&quot;id&quot;] retrieved info from the id column&lt;br /&gt;        listbox1.items.add(dr[&quot;name&quot;]); //add info from the name column&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;4. ExecuteXmlReader : similar to ExecuteReader except that you use a XMLReader to access the data.</content><link rel='replies' type='application/atom+xml' href='http://amthekkel.blogspot.com/feeds/8100161007324735059/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3428280531116353301/8100161007324735059' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3428280531116353301/posts/default/8100161007324735059'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3428280531116353301/posts/default/8100161007324735059'/><link rel='alternate' type='text/html' href='http://amthekkel.blogspot.com/2009/01/net-sqlcommand-and-executiion-types.html' title='.NET - SqlCommand and executiion types'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3428280531116353301.post-3412683133747079599</id><published>2009-01-15T16:34:00.004+00:00</published><updated>2009-01-17T10:16:11.296+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term=".NET"/><category scheme="http://www.blogger.com/atom/ns#" term="ASP"/><category scheme="http://www.blogger.com/atom/ns#" term="HTTP"/><category scheme="http://www.blogger.com/atom/ns#" term="Request"/><category scheme="http://www.blogger.com/atom/ns#" term="Response"/><title type='text'>ASP.NET- handling HTTP REQUEST and RESPONSE</title><content type='html'>&lt;meta equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot;&gt;&lt;meta name=&quot;ProgId&quot; content=&quot;Word.Document&quot;&gt;&lt;meta name=&quot;Generator&quot; content=&quot;Microsoft Word 11&quot;&gt;&lt;meta name=&quot;Originator&quot; content=&quot;Microsoft Word 11&quot;&gt;&lt;link rel=&quot;File-List&quot; href=&quot;file:///C:%5CDOCUME%7E1%5Camathews%5CLOCALS%7E1%5CTemp%5Cmsohtml1%5C01%5Cclip_filelist.xml&quot;&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:worddocument&gt;   &lt;w:view&gt;Normal&lt;/w:View&gt;   &lt;w:zoom&gt;0&lt;/w:Zoom&gt;   &lt;w:punctuationkerning/&gt;   &lt;w:validateagainstschemas/&gt;   &lt;w:saveifxmlinvalid&gt;false&lt;/w:SaveIfXMLInvalid&gt;   &lt;w:ignoremixedcontent&gt;false&lt;/w:IgnoreMixedContent&gt;   &lt;w:alwaysshowplaceholdertext&gt;false&lt;/w:AlwaysShowPlaceholderText&gt;   &lt;w:compatibility&gt;    &lt;w:breakwrappedtables/&gt;    &lt;w:snaptogridincell/&gt;    &lt;w:wraptextwithpunct/&gt;    &lt;w:useasianbreakrules/&gt;    &lt;w:dontgrowautofit/&gt;   &lt;/w:Compatibility&gt;   &lt;w:browserlevel&gt;MicrosoftInternetExplorer4&lt;/w:BrowserLevel&gt;  &lt;/w:WordDocument&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:latentstyles deflockedstate=&quot;false&quot; latentstylecount=&quot;156&quot;&gt;  &lt;/w:LatentStyles&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;style&gt; &lt;!--  /* Font Definitions */  @font-face 	{font-family:Verdana; 	panose-1:2 11 6 4 3 5 4 4 2 4; 	mso-font-charset:0; 	mso-generic-font-family:swiss; 	mso-font-pitch:variable; 	mso-font-signature:536871559 0 0 0 415 0;}  /* Style Definitions */  p.MsoNormal, li.MsoNormal, div.MsoNormal 	{mso-style-parent:&quot;&quot;; 	margin:0cm; 	margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:12.0pt; 	font-family:Verdana; 	mso-fareast-font-family:&quot;Times New Roman&quot;; 	mso-bidi-font-family:&quot;Times New Roman&quot;;} a:link, span.MsoHyperlink 	{color:blue; 	text-decoration:underline; 	text-underline:single;} a:visited, span.MsoHyperlinkFollowed 	{color:purple; 	text-decoration:underline; 	text-underline:single;} @page Section1 	{size:612.0pt 792.0pt; 	margin:72.0pt 90.0pt 72.0pt 90.0pt; 	mso-header-margin:36.0pt; 	mso-footer-margin:36.0pt; 	mso-paper-source:0;} div.Section1 	{page:Section1;} --&gt; &lt;/style&gt;&lt;!--[if gte mso 10]&gt; &lt;style&gt;  /* Style Definitions */  table.MsoNormalTable 	{mso-style-name:&quot;Table Normal&quot;; 	mso-tstyle-rowband-size:0; 	mso-tstyle-colband-size:0; 	mso-style-noshow:yes; 	mso-style-parent:&quot;&quot;; 	mso-padding-alt:0cm 5.4pt 0cm 5.4pt; 	mso-para-margin:0cm; 	mso-para-margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:10.0pt; 	font-family:&quot;Times New Roman&quot;; 	mso-ansi-language:#0400; 	mso-fareast-language:#0400; 	mso-bidi-language:#0400;} &lt;/style&gt; &lt;![endif]--&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;Parameters can be passed using the url as follows&lt;/p&gt;&lt;o:p&gt;&lt;br /&gt;&lt;/o:p&gt;&lt;a href=&quot;http://aspfile/&quot;&gt;http://aspfile url/page.aspx?variable1=value1&amp;amp;variable2=value2&lt;br /&gt;&lt;br /&gt;e.g.http://server/page.aspx?id=1&amp;amp;name=test&lt;br /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Request object stores information about the HTTP request made while invoking the page.&lt;br /&gt;Response object can be used to print stuff on the clients browser.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;if (String.IsNullOrEmpty(Request.Params[&amp;amp;quot;name&amp;amp;quot;]))&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;str = Request.Params[&amp;amp;quot;name&amp;amp;quot;];&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;//Displaying a message and value on clients browser&lt;br /&gt;&lt;br /&gt;Response.write(&quot; passed is &quot;);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;else&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;str = String.Empty;&lt;br /&gt;&lt;br /&gt;Response.write(&quot; value was passed&quot;);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;//Redirecting the user to a different url.&lt;br /&gt;&lt;br /&gt;Response.Redirect(http://www.google.com);&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://amthekkel.blogspot.com/feeds/3412683133747079599/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3428280531116353301/3412683133747079599' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3428280531116353301/posts/default/3412683133747079599'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3428280531116353301/posts/default/3412683133747079599'/><link rel='alternate' type='text/html' href='http://amthekkel.blogspot.com/2009/01/normal-0-false-false-false.html' title='ASP.NET- handling HTTP REQUEST and RESPONSE'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3428280531116353301.post-6653849382704210379</id><published>2009-01-14T14:42:00.002+00:00</published><updated>2009-01-14T14:50:57.093+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Passing Parameters using URL"/><category scheme="http://www.blogger.com/atom/ns#" term="Ruby On Rails"/><title type='text'>Ruby on Rails - passing parametrs through url</title><content type='html'>The following code shows how to pass parameters to your controller and then use it to retrieve values&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I have a controller called amtest. I want to retrieve all the records from the table that matches the PEOPLE_ID supplied by the user.&lt;br /&gt;&lt;br /&gt;def index&lt;br /&gt;    @ui=params[:uid]&lt;br /&gt;       &lt;br /&gt;    @f=Amtest.find(:first, :conditions =&gt; {&#39;PEOPLE_ID&#39;=&gt;@ui})&lt;br /&gt;&lt;br /&gt; respond_to do |format|&lt;br /&gt;      format.html # index.html.erb&lt;br /&gt;      format.xml  { render :xml =&gt;@test}&lt;br /&gt;      end&lt;br /&gt;  end&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Now to make this work, you need to pass the parameters as follows&lt;br /&gt;&lt;br /&gt;htt://localhost:3000/amtests.xml?uid=1234&lt;br /&gt;&lt;br /&gt;the uid value 1234 will be taken by the Amtest controller for the search.&lt;br /&gt;&lt;br /&gt;you can send multiple parameters using the &amp;amp; operator&lt;br /&gt;&lt;br /&gt;e.g.&lt;br /&gt;htt://localhost:3000/amtests.xml?uid=1234 &amp;amp; pid= abcd&lt;br /&gt;&lt;br /&gt;All you need to do is retrieve the pid value in the controller and use it as required.</content><link rel='replies' type='application/atom+xml' href='http://amthekkel.blogspot.com/feeds/6653849382704210379/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3428280531116353301/6653849382704210379' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3428280531116353301/posts/default/6653849382704210379'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3428280531116353301/posts/default/6653849382704210379'/><link rel='alternate' type='text/html' href='http://amthekkel.blogspot.com/2009/01/ruby-on-rails-passing-parametrs-through.html' title='Ruby on Rails - passing parametrs through url'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3428280531116353301.post-6996852519560615662</id><published>2009-01-14T09:54:00.003+00:00</published><updated>2009-01-14T10:05:52.782+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Date"/><category scheme="http://www.blogger.com/atom/ns#" term="DateFormatters"/><category scheme="http://www.blogger.com/atom/ns#" term="FLEX"/><title type='text'>Flex-  Date Formatters</title><content type='html'>The following section shows how to use date formatters.&lt;br /&gt;&lt;br /&gt;first create a date formatter component. Below i have listed three different date formatters. To view the entire list of date formats that can be used visit http://livedocs.adobe.com/flex/3/langref/mx/formatters/DateFormatter.html&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt; &amp;lt;mx:DateFormatter id=&quot;df&quot; formatString=&quot;HH:MM&quot;/&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; &amp;lt;mx:DateFormatter id=&quot;df1&quot; formatString=&quot;DD/MM/YYYY   EEEE&quot;/&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; &amp;lt;mx:DateFormatter id=&quot;df2&quot; formatString=&quot;DD/MM/YYYY&quot;/&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;To use this formatter. use the dateformatter.format(dateobject); to format the required date&lt;br /&gt;&lt;br /&gt;lets say you have a date object d.&lt;br /&gt;&lt;br /&gt;var d:Date=new Date(); //Create a new date object&lt;br /&gt;&lt;br /&gt;df.format(d);  //returns 10:15 , 22:10 etc displays hour and minute&lt;br /&gt;&lt;br /&gt;df1.format(d);   //returns  14/01/2009 Wednesday&lt;br /&gt;&lt;br /&gt;df2.format(d);   //returns 14/01/2009&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://amthekkel.blogspot.com/feeds/6996852519560615662/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3428280531116353301/6996852519560615662' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3428280531116353301/posts/default/6996852519560615662'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3428280531116353301/posts/default/6996852519560615662'/><link rel='alternate' type='text/html' href='http://amthekkel.blogspot.com/2009/01/flex-date-formatters.html' title='Flex-  Date Formatters'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3428280531116353301.post-6785416069920002805</id><published>2009-01-14T09:17:00.003+00:00</published><updated>2009-01-14T09:54:10.654+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ArrayCollection"/><category scheme="http://www.blogger.com/atom/ns#" term="filterFunction"/><category scheme="http://www.blogger.com/atom/ns#" term="FLEX"/><title type='text'>FLEX - Filtering Collections</title><content type='html'>Filtering data collections such as ArrayList, XMLList, XmlListCollection etc is easy.&lt;br /&gt;&lt;br /&gt;to achieve this follow the general steps outlined below&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Use the filterFunction property of the data collection and specify the name of the filter function&lt;/li&gt;&lt;li&gt;refresh the collection to update the values&lt;/li&gt;&lt;li&gt;write the filter function&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;e.g&lt;br /&gt;&lt;br /&gt;public function FilterList():void&lt;br /&gt;{&lt;br /&gt;      //telling the compiler to use the function named processFilter to filter the data&lt;br /&gt;   ListXLC.filterFunction=processFilter;&lt;br /&gt;&lt;br /&gt;     //refresh the list to display the filtered data&lt;br /&gt;   ListXLC.refresh();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;//this is the actual function that filters the data collection. Each element in the&lt;br /&gt;//list is sent to this function through the item parameter. This item object is&lt;br /&gt;//then checked with the conditions. If the item object satisfies the condition&lt;br /&gt;//then a boolean group of true should be returned else a false group is returned.&lt;br /&gt;//Only the items in the list for which true value is returned, the value is&lt;br /&gt;//retained in the filtered list, the rest are ommitted&lt;br /&gt;&lt;br /&gt;public function processFilter(item:Object):Boolean&lt;br /&gt;{&lt;br /&gt;   // we are trying to filter the array to display items that belong to group 1.&lt;br /&gt;&lt;br /&gt;  //create a temporary boolean varaiable&lt;br /&gt; var match:boolean=true;&lt;br /&gt;&lt;br /&gt; if(item.group==&quot;1!)&lt;br /&gt; {&lt;br /&gt;  // if the individual item has a group value of 1, match is set to true.&lt;br /&gt;   match=true;&lt;br /&gt; }&lt;br /&gt; else&lt;br /&gt; {// if the individual item belongs to any other group other than group 1&lt;br /&gt;  match=false;&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; //return the value&lt;br /&gt; return match;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;{NOTE: the filterfunction does not need to be run inside a for loop or while loop. The system&lt;br /&gt;automatically passes each element to the filter function]&lt;br /&gt;&lt;br /&gt;the above e.g. should now result in the ArrayCollection having four elements&lt;br /&gt;&lt;br /&gt;       &amp;lt;mx:Object label=&quot;item1&quot; group=&quot;1&quot; /&amp;gt;&lt;br /&gt;       &amp;lt;mx:Object label=&quot;item3&quot; group=&quot;1&quot; /&amp;gt;&lt;br /&gt;       &amp;lt;mx:Object label=&quot;item5&quot; group=&quot;1&quot; /&amp;gt;&lt;br /&gt;               &amp;lt;mx:Object label=&quot;item6&quot; group=&quot;1&quot; /&amp;gt;&lt;br /&gt;&lt;br /&gt;Similary you could have used item.label instead of item.group</content><link rel='replies' type='application/atom+xml' href='http://amthekkel.blogspot.com/feeds/6785416069920002805/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3428280531116353301/6785416069920002805' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3428280531116353301/posts/default/6785416069920002805'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3428280531116353301/posts/default/6785416069920002805'/><link rel='alternate' type='text/html' href='http://amthekkel.blogspot.com/2009/01/flex-filtering-collections.html' title='FLEX - Filtering Collections'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3428280531116353301.post-7094026382232332665</id><published>2009-01-13T16:31:00.002+00:00</published><updated>2009-01-13T16:37:38.881+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="FLEX"/><category scheme="http://www.blogger.com/atom/ns#" term="URL"/><title type='text'>launching url from FLEX</title><content type='html'>The following code shows how to launch a url from within flex.&lt;br /&gt;&lt;br /&gt;in actionscript&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;http://www.netdoctor.co.uk/system/s.gif&quot; border=&quot;0&quot; width=&quot;5&quot; height=&quot;1&quot; /&gt;var newLink:URLRequest= new URLRequest(&quot;http://www.gmail.com&quot;);&lt;br /&gt;&lt;br /&gt;navigateToURL(newLink,&quot;to_blank&quot;);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The above code launches http://www.gmail.com in a new window</content><link rel='replies' type='application/atom+xml' href='http://amthekkel.blogspot.com/feeds/7094026382232332665/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3428280531116353301/7094026382232332665' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3428280531116353301/posts/default/7094026382232332665'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3428280531116353301/posts/default/7094026382232332665'/><link rel='alternate' type='text/html' href='http://amthekkel.blogspot.com/2009/01/launching-url-from-flex.html' title='launching url from FLEX'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3428280531116353301.post-4646036712750885828</id><published>2009-01-13T14:42:00.005+00:00</published><updated>2009-01-13T15:05:09.249+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="accordion"/><category scheme="http://www.blogger.com/atom/ns#" term="FLEX"/><title type='text'>FLEX - usign an accordion</title><content type='html'>Accordions is a navigator container that allows you to organise components&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://4.bp.blogspot.com/_kQn_nER4ia0/SWyqtknjZ1I/AAAAAAAAAHI/eMoqxpNB9OU/s1600-h/snap1.jpg&quot;&gt;&lt;img style=&quot;cursor: pointer; width: 320px; height: 255px;&quot; src=&quot;http://4.bp.blogspot.com/_kQn_nER4ia0/SWyqtknjZ1I/AAAAAAAAAHI/eMoqxpNB9OU/s320/snap1.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5290791362153899858&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;Fig 1: Login form                                                 &lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://1.bp.blogspot.com/_kQn_nER4ia0/SWyqwynDzEI/AAAAAAAAAHQ/FJmi0PnkeAc/s1600-h/snap2.jpg&quot;&gt;&lt;img style=&quot;cursor: pointer; width: 320px; height: 257px;&quot; src=&quot;http://1.bp.blogspot.com/_kQn_nER4ia0/SWyqwynDzEI/AAAAAAAAAHQ/FJmi0PnkeAc/s320/snap2.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5290791417449532482&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Fig 2: Account Creation form&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The above screenshots show an accordion in use for a login application. The default form is the login form, which consists of a username and a password field (Fig 1). If the user clicks on the &lt;span style=&quot;font-weight: bold;&quot;&gt;Create Account &lt;/span&gt;tab (fig 1) at the bottom of the login screen, the login screen is wrapped up and replaced by the Account creation form (fig 2). To go back to login screen, just click on the Login Tab at the top (Fig 2)&lt;br /&gt;&lt;br /&gt;Here is the code for the above application&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&amp;gt;&lt;br /&gt;&amp;lt;mx:VBox xmlns:mx=&quot;http://www.adobe.com/2006/mxml&quot;&lt;br /&gt;xmlns:pom=&quot;com.app.components.*&quot;&lt;br /&gt;horizontalAlign=&quot;center&quot; verticalAlign=&quot;top&quot;&lt;br /&gt;width=&quot;100%&quot; height=&quot;100%&quot;&amp;gt;&lt;br /&gt;&lt;br /&gt;//note the use of xmlns:pom=&quot;com.app.components&quot;, this creates a namespace that refers to all&lt;br /&gt;//the components in my application including the login screen and the account creation screen&lt;br /&gt;&lt;br /&gt;&amp;lt;mx:Script&amp;gt;&lt;br /&gt;   &amp;lt;![CDATA[import com.hrnet.model.hrnetModelLocator;&lt;br /&gt;   [Bindable]&lt;br /&gt;   private var _model:hrnetModelLocator =hrnetModelLocator.getInstance();&lt;br /&gt;   ]]&amp;gt;&lt;br /&gt;&amp;lt;/mx:Script&amp;gt;&lt;br /&gt;&amp;lt;mx:VBox width=&quot;500&quot; horizontalAlign=&quot;center&quot; &amp;gt;&lt;br /&gt;&amp;lt;mx:Image source=&quot;com/hrnet/assets/image1.png&quot; /&amp;gt;&lt;br /&gt;&amp;lt;mx:Spacer height=&quot;10&quot;/&amp;gt;&lt;br /&gt;&amp;lt;mx:Spacer height=&quot;10&quot;/&amp;gt;&lt;br /&gt;&amp;lt;mx:Accordion width=&quot;400&quot; height=&quot;321&quot;&amp;gt;&lt;br /&gt;&lt;br /&gt;//here i am using the pom namespace to all my  component mxml files for login creation and&lt;br /&gt;//acccount creation&lt;br /&gt;&lt;br /&gt;&amp;lt;pom:LoginBox/&amp;gt;&lt;br /&gt;&amp;lt;pom:AccountCreateBox/&amp;gt;&lt;br /&gt;&amp;lt;/mx:Accordion&amp;gt;&lt;br /&gt;&amp;lt;/mx:VBox&amp;gt;&lt;br /&gt;&amp;lt;/mx:VBox&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://amthekkel.blogspot.com/feeds/4646036712750885828/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3428280531116353301/4646036712750885828' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3428280531116353301/posts/default/4646036712750885828'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3428280531116353301/posts/default/4646036712750885828'/><link rel='alternate' type='text/html' href='http://amthekkel.blogspot.com/2009/01/flex-usign-accordion.html' title='FLEX - usign an accordion'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/_kQn_nER4ia0/SWyqtknjZ1I/AAAAAAAAAHI/eMoqxpNB9OU/s72-c/snap1.jpg" height="72" width="72"/><thr:total>0</thr:total></entry></feed>