<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:clearspace="http://www.jivesoftware.com/xmlns/clearspace/rss" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>General Interface Blog</title>
    <link>http://www.tibcommunity.com/blogs/gi</link>
    <description>General Interface Blog</description>
    <pubDate>Tue, 12 Jan 2010 19:38:05 GMT</pubDate>
    <generator>Clearspace 2.0.13 (http://jivesoftware.com/products/clearspace/)</generator>
    <dc:date>2010-01-12T19:38:05Z</dc:date>
    <item>
      <title>GI Forums and Blogs Have Moved to www.generalinterface.org</title>
      <link>http://www.tibcommunity.com/blogs/gi/2010/01/12/gi-forums-and-blogs-have-moved-to-wwwgeneralinterfaceorg</link>
      <description>&lt;div class='jive-rendered-content'&gt;&lt;h1&gt;&lt;span&gt;General Interface Forums and Blogs have Moved&lt;/span&gt;&lt;/h1&gt;&lt;p&gt;If you didn't already know, as part of the GI Open Source contribution to Dojo Foundation, General Interface forums and blogs are now hosted on &lt;strong&gt;&lt;a class="jive-link-external-small" dynsrc="#" href="http://www.generalinterface.org/" lowsrc="#" src="#"&gt;www.generalinterface.org&lt;/a&gt;.&lt;/strong&gt;&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;GI developers and contributors will continue the blogs and forums post on the new site.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;You can access the new forums at &lt;a class="jive-link-external-small" dynsrc="#" href="http://www.generalinterface.org/forums/" lowsrc="#" src="#"&gt;General Interface Forums&lt;/a&gt;&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;The new blogs are at &lt;a class="jive-link-external-small" dynsrc="#" href="http://www.generalinterface.org/docs/display/DEVBLOG" lowsrc="#" src="#"&gt;GI contributor blogs&lt;/a&gt;&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Here's an &lt;a class="jive-link-external-small" dynsrc="#" href="http://www.generalinterface.org/docs/createrssfeed.action?types=page&amp;amp;types=blogpost&amp;amp;types=mail&amp;amp;types=comment&amp;amp;types=attachment&amp;amp;sort=modified&amp;amp;showContent=true&amp;amp;showDiff=true&amp;amp;spaces=conf_all&amp;amp;labelString%3D&amp;amp;rssType=rss2&amp;amp;maxResults=30&amp;amp;timeSpan=30&amp;amp;publicFeed=true&amp;amp;title=General+Interface+RSS+Feed" lowsrc="#" src="#"&gt;RSS URL&lt;/a&gt;&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Look for news on GI 3.8 releases, GI 3.9 features and latest on GI 4.0 on &lt;a class="jive-link-external-small" dynsrc="#" href="http://www.generalinterface.org/" lowsrc="#" src="#"&gt;www.generalinterface.org&lt;/a&gt;.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;This will be my last blog on TIBCommunity, but not the last blog for GI. So we look forward to seeing all developers on the new &lt;a class="jive-link-external-small" dynsrc="#" href="http://www.generalinterface.org/forums/" lowsrc="#" src="#"&gt;General Interface Forums&lt;/a&gt;&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;/div&gt;</description>
      <category domain="http://www.tibcommunity.com/blogs/gi/tags">general_interface</category>
      <category domain="http://www.tibcommunity.com/blogs/gi/tags">gi</category>
      <category domain="http://www.tibcommunity.com/blogs/gi/tags">source</category>
      <category domain="http://www.tibcommunity.com/blogs/gi/tags">dojo</category>
      <category domain="http://www.tibcommunity.com/blogs/gi/tags">foundation</category>
      <category domain="http://www.tibcommunity.com/blogs/gi/tags">open</category>
      <pubDate>Tue, 12 Jan 2010 19:59:50 GMT</pubDate>
      <author>dhwang</author>
      <guid>http://www.tibcommunity.com/blogs/gi/2010/01/12/gi-forums-and-blogs-have-moved-to-wwwgeneralinterfaceorg</guid>
      <dc:date>2010-01-12T19:59:50Z</dc:date>
      <clearspace:dateToText>1 month, 3 weeks ago</clearspace:dateToText>
      <wfw:comment>http://www.tibcommunity.com/blogs/gi/comment/gi-forums-and-blogs-have-moved-to-wwwgeneralinterfaceorg</wfw:comment>
      <wfw:commentRss>http://www.tibcommunity.com/blogs/gi/feeds/comments?blogPost=1103</wfw:commentRss>
    </item>
    <item>
      <title>Creating  a Firebug Log Handler</title>
      <link>http://www.tibcommunity.com/blogs/gi/2009/07/21/creating-a-firebug-log-handler</link>
      <description>&lt;div class='jive-rendered-content'&gt;&lt;p&gt;I had this in the draft for a while.. It is actually no longer relavant in 3.7.1. However, I think it may be relavant in a different context of how to create your own custom log handler. So I'm post this now..&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;While GI always had its own log monitor, it is still useful to be able to log to Firebug which is the single most useful development tool for web devlopers.  This is a new log handle introduced in GI 3.7.1, however, what if you're not using 3.7.1? Well the code will still work previous version of GI &lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;It is important that this class be loaded at the very beginning, so  you want to add this to the  JSX/js/fx/jsx.js file&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;pre class="jive-pre"&gt;&lt;code class="jive-code jive-java"&gt;&lt;font color="darkgreen"&gt;/**
 * Handles a logging record by sending it to the Firebug console.
 */&lt;/font&gt;
jsx3.Class.defineClass(&lt;font color="navy"&gt;'jsx3.util.ConsoleHandler'&lt;/font&gt;, jsx3.util.Logger.FormatHandler,  nul l,
    function(ConsoleHandler, ConsoleHandler_prototype) &lt;font color="navy"&gt;{&lt;/font&gt;
&amp;nbsp;
  &lt;font color="darkgreen"&gt;// maps logger levels to console method names&lt;/font&gt;
  var methods = [nul l, &lt;font color="red"&gt;"error"&lt;/font&gt;, &lt;font color="red"&gt;"error"&lt;/font&gt;, &lt;font color="red"&gt;"warn"&lt;/font&gt;, &lt;font color="red"&gt;"info"&lt;/font&gt;, &lt;font color="red"&gt;"debug"&lt;/font&gt;, &lt;font color="red"&gt;"debug"&lt;/font&gt;];
&amp;nbsp;
  ConsoleHandler_prototype.handle = function(objRecord) &lt;font color="navy"&gt;{&lt;/font&gt;
    &lt;font color="navy"&gt;&lt;b&gt;if&lt;/b&gt;&lt;/font&gt; (window.console) &lt;font color="navy"&gt;{&lt;/font&gt;
      var method = methods[objRecord.getLevel()];
      &lt;font color="navy"&gt;&lt;b&gt;if&lt;/b&gt;&lt;/font&gt; (method) &lt;font color="navy"&gt;{&lt;/font&gt;
        &lt;font color="navy"&gt;&lt;b&gt;try&lt;/b&gt;&lt;/font&gt; &lt;font color="navy"&gt;{&lt;/font&gt;
          console[method](this.format(objRecord));
        &lt;font color="navy"&gt;}&lt;/font&gt; &lt;font color="navy"&gt;&lt;b&gt;catch&lt;/b&gt;&lt;/font&gt; (e) &lt;font color="navy"&gt;{&lt;/font&gt;&lt;font color="navy"&gt;}&lt;/font&gt;
      &lt;font color="navy"&gt;}&lt;/font&gt;
    &lt;font color="navy"&gt;}&lt;/font&gt;
  &lt;font color="navy"&gt;}&lt;/font&gt;;
&amp;nbsp;
&lt;font color="navy"&gt;}&lt;/font&gt;);
&lt;/code&gt;&lt;/pre&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Logger.xml&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;pre class="jive-pre"&gt;&lt;code class="jive-code"&gt;
  &amp;lt;!-- Logs messages to the Firebug console, when available. --&amp;gt;
  &amp;lt;handler name="console" class="jsx3.util.ConsoleHandler"/&amp;gt;

 &amp;lt;!-- The global logger. --&amp;gt;
  &amp;lt;logger name="global" level="INFO"&amp;gt;
    &amp;lt;handler-ref name="memory"/&amp;gt;
    &amp;lt;handler-ref name="console"/&amp;gt;
    &amp;lt;handler-ref name="ide"/&amp;gt;
    &amp;lt;handler-ref name="fatal"/&amp;gt;
    &amp;lt;!--&amp;lt;handler-ref name="appMonitor1"/&amp;gt;--&amp;gt;
  &amp;lt;/logger&amp;gt;

&lt;/code&gt;&lt;/pre&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;/div&gt;</description>
      <category domain="http://www.tibcommunity.com/blogs/gi/tags">general_interface</category>
      <category domain="http://www.tibcommunity.com/blogs/gi/tags">gi</category>
      <category domain="http://www.tibcommunity.com/blogs/gi/tags">log</category>
      <category domain="http://www.tibcommunity.com/blogs/gi/tags">loggin</category>
      <category domain="http://www.tibcommunity.com/blogs/gi/tags">firebug</category>
      <pubDate>Tue, 21 Jul 2009 19:49:51 GMT</pubDate>
      <author>dhwang</author>
      <guid>http://www.tibcommunity.com/blogs/gi/2009/07/21/creating-a-firebug-log-handler</guid>
      <dc:date>2009-07-21T19:49:51Z</dc:date>
      <clearspace:dateToText>11 months, 1 week ago</clearspace:dateToText>
      <wfw:comment>http://www.tibcommunity.com/blogs/gi/comment/creating-a-firebug-log-handler</wfw:comment>
      <wfw:commentRss>http://www.tibcommunity.com/blogs/gi/feeds/comments?blogPost=1049</wfw:commentRss>
    </item>
    <item>
      <title>How to disable rows, columns or cells edit masks in a Grid matrix.</title>
      <link>http://www.tibcommunity.com/blogs/gi/2009/07/10/how-to-disable-rows-columns-or-cells-edit-masks-in-a-grid-matrix</link>
      <description>&lt;div class='jive-rendered-content'&gt;&lt;p&gt;To disable edit masks for the entire row in a Matrix - Grid, set event property "Before Edit" with following code fragment (follwing sample disables the non-always on edit mask ,such as menu and select/combo.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Always on edit mask&lt;/strong&gt;, such as checkbox and button, are disabled by the jsxdisabled="1" in the record row. E.g. &lt;/p&gt;&lt;pre __default_attr="html" __jive_macro_name="code"&gt;&lt;![CDATA[&lt;record jsxid="1" jsxtext="Alabama" jsxdisabled="1" /&gt;]]&gt;&lt;/pre&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;pre class="jive-pre"&gt;&lt;code class="jive-code"&gt;
if (this.getRecord(strRECORDID).jsxdisabled == 1) false;
&lt;/code&gt;&lt;/pre&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;To disable &lt;strong&gt;Non-always-on&lt;/strong&gt; edit mask of an entire column in a Matrix - Grid, set event property "Before Edit" (Following code disables the "comboColumn" by evaluating to false in "Before Edit" event handler).&lt;/p&gt;&lt;p&gt;&lt;strong&gt;NOTE&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;These sample code fragment goes into the event handler it self, but the code fragment is not part of a function, so should not use &lt;strong&gt;return&lt;/strong&gt; statement. It should simply evaluate to true or false.&lt;/p&gt;&lt;pre class="jive-pre"&gt;&lt;code class="jive-code"&gt;
if (objCOLUMN.getName() == "comboColumn") false; else {jsx3.log('EVENT: (jsxbeforeedit). Record: ' + strRECORDID); }
&lt;/code&gt;&lt;/pre&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Follow similar logic to disable edit mask of a cell based on different factors such as the value of the another column. In "Befor Edit" event property, this code &lt;/p&gt;&lt;pre class="jive-pre"&gt;&lt;code class="jive-code"&gt;
if (this.getRecord(strRECORDID).status == "Deployed" &amp;amp;&amp;amp; objCOLUMN.getName() == "selectMachine" ) false;
&lt;/code&gt;&lt;/pre&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;will disable the "selectMachine" cell (column) if status cell (column) has the value "Deployed".&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;I realized that this blog post was not clear enough regarding how different Edit Mask are disabled. First there are two types of edit masks in Matrix (editable grid Matrix control).&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;The first type is the "&lt;strong&gt;always-on&lt;/strong&gt;" edit mask such as : button, checkbox, radio button, etc. An &lt;strong&gt;always-on&lt;/strong&gt; edit mask is always displayed without user action.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;The second type is the "&lt;strong&gt;non-always-on&lt;/strong&gt;" edit mask such as : textbox, select, datepicker, etc. These editmask are display only when user focus on the cell.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;/div&gt;</description>
      <category domain="http://www.tibcommunity.com/blogs/gi/tags">events</category>
      <category domain="http://www.tibcommunity.com/blogs/gi/tags">general_interface</category>
      <category domain="http://www.tibcommunity.com/blogs/gi/tags">gi</category>
      <category domain="http://www.tibcommunity.com/blogs/gi/tags">edit</category>
      <category domain="http://www.tibcommunity.com/blogs/gi/tags">masks</category>
      <category domain="http://www.tibcommunity.com/blogs/gi/tags">matrix</category>
      <category domain="http://www.tibcommunity.com/blogs/gi/tags">disable</category>
      <category domain="http://www.tibcommunity.com/blogs/gi/tags">cell</category>
      <pubDate>Fri, 10 Jul 2009 23:47:27 GMT</pubDate>
      <author>dhwang</author>
      <guid>http://www.tibcommunity.com/blogs/gi/2009/07/10/how-to-disable-rows-columns-or-cells-edit-masks-in-a-grid-matrix</guid>
      <dc:date>2009-07-10T23:47:27Z</dc:date>
      <clearspace:dateToText>1 year, 4 months ago</clearspace:dateToText>
      <wfw:comment>http://www.tibcommunity.com/blogs/gi/comment/how-to-disable-rows-columns-or-cells-edit-masks-in-a-grid-matrix</wfw:comment>
      <wfw:commentRss>http://www.tibcommunity.com/blogs/gi/feeds/comments?blogPost=1040</wfw:commentRss>
    </item>
    <item>
      <title>How to do asynchronous XML resource loading.</title>
      <link>http://www.tibcommunity.com/blogs/gi/2009/06/11/how-to-do-asynchronous-xml-resource-loading</link>
      <description>&lt;div class='jive-rendered-content'&gt;&lt;p&gt;Some of the FAQ that user have on XML resource are: &lt;em&gt;&lt;strong&gt;Is there a build in way of doing asynchronous loading and caching of XML document? , How do I fetch xml document into the application cache asynchronously ?&lt;/strong&gt;&lt;/em&gt; and &lt;strong&gt;How can I make sure that what I load myself will be used by GI instead loading again from the web server?&lt;/strong&gt;&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Well, quick answer is : Yes, use &lt;/p&gt;&lt;pre class="jive-pre"&gt;&lt;code class="jive-code"&gt;jsx3.app.Cache.getOrOpenAsync(strURL) &lt;/code&gt;&lt;/pre&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;h5&gt;&lt;span&gt;Asynchronous Loading&lt;/span&gt;&lt;/h5&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;Cache documents can be loaded asychronously with the &lt;em&gt;getOrOpenAsync()&lt;/em&gt; method. This method returns the corresponding document synchronously if it already exists in the cache. If the document does not exist in the cache, then it is loaded asynchronously and the method returns a placeholder document. The namespace URI of this placeholder document is &lt;em&gt;Cache.XSDNS&lt;/em&gt; and its root node name is &lt;em&gt;"loading"&lt;/em&gt;.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;h5&gt;&lt;span&gt;Method getOrOpenAsync(strURL, strId, objClass) Asynchronously loads an xml document and stores it in this cache.&lt;/span&gt;&lt;/h5&gt;&lt;h5&gt;&lt;span&gt;Parameters:&lt;/span&gt;&lt;/h5&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;&lt;span&gt;strURL {String | jsx3.net.URI} – url (relative or absolute) the URI of the document to open.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;span&gt;strId &lt;/span&gt;&lt;span __jive_macro_name="String"/&gt;&lt;span&gt; – the id under which to store the document. If this parameter is not provided, thestrURL parameter is used as the id.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;span&gt;objClass {jsx3.lang.Class} – jsx3.xml.Document (default value) or one of its subclasses. The class with which to instantiate the new document instance.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h5&gt;&lt;span&gt;Returns:&lt;/span&gt;&lt;/h5&gt;&lt;p&gt;&lt;span&gt;{jsx3.xml.Document} – the document retrieved from the cache or a placeholder document if the document is in the process of loading asynchronously.&lt;/span&gt;&lt;/p&gt;&lt;h5&gt;&lt;span&gt;Since:&lt;/span&gt;&lt;/h5&gt;&lt;p&gt;3.5&lt;/p&gt;&lt;/div&gt;</description>
      <category domain="http://www.tibcommunity.com/blogs/gi/tags">ajax</category>
      <category domain="http://www.tibcommunity.com/blogs/gi/tags">gi</category>
      <category domain="http://www.tibcommunity.com/blogs/gi/tags">asynchronous</category>
      <category domain="http://www.tibcommunity.com/blogs/gi/tags">xml</category>
      <pubDate>Thu, 11 Jun 2009 21:16:02 GMT</pubDate>
      <author>dhwang</author>
      <guid>http://www.tibcommunity.com/blogs/gi/2009/06/11/how-to-do-asynchronous-xml-resource-loading</guid>
      <dc:date>2009-06-11T21:16:02Z</dc:date>
      <clearspace:dateToText>9 months, 1 day ago</clearspace:dateToText>
      <wfw:comment>http://www.tibcommunity.com/blogs/gi/comment/how-to-do-asynchronous-xml-resource-loading</wfw:comment>
      <wfw:commentRss>http://www.tibcommunity.com/blogs/gi/feeds/comments?blogPost=1070</wfw:commentRss>
    </item>
    <item>
      <title>GI Performance Tuning</title>
      <link>http://www.tibcommunity.com/blogs/gi/2009/06/01/gi-performance-tuning</link>
      <description>&lt;div class='jive-rendered-content'&gt;&lt;h3&gt;&lt;span&gt;On GI Performance Tuning&lt;/span&gt;&lt;br/&gt;&lt;/h3&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Performance is a big topic. A while ago I saw a blog on GI performance turning,  see &lt;a class="jive-link-external-small" dynsrc="#" href="http://soalobby.org/node/19" lowsrc="#" src="#"&gt;Sunil's blog,&lt;/a&gt; , which hits on some basic point of AJAX application optimization.  The GI documentation also devotes two entire Chapters on this topic (&lt;a class="jive-link-external-small" dynsrc="#" href="http://www.tibco.com/devnet/gi/goto.html?page=tib_gi_developer_guide/developer_guide.5.50.htm" lowsrc="#" src="#"&gt;Optimizing Application Performance&lt;/a&gt; and &lt;a class="jive-link-external-small" dynsrc="#" href="http://www.tibco.com/devnet/gi/goto.html?page=tib_gi_developer_guide/developer_guide.5.105.htm" lowsrc="#" src="#"&gt;Optimizing Load Performance &lt;/a&gt;). There's also a video tutorial on this &lt;a class="jive-link-external-small" dynsrc="#" href="http://media.tibco.com/gi/tutorials/6_optimize/6_optimize.html" lowsrc="#" src="#"&gt;Video 6: Optimize Performance. &lt;/a&gt; &lt;a href="http://www.tibco.com/devnet/images/content/icons/play_video.gif"&gt;&lt;img alt="" dynsrc="#" height="12" href="#" lowsrc="#" src="http://www.tibco.com/devnet/images/content/icons/play_video.gif" width="19"/&gt;&lt;/a&gt;  So, as you can see this is an important topic and a frequently asked question.  &lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Basically there are 3 major type of performance issues that concerns GI application &lt;/p&gt;&lt;ol&gt;&lt;li&gt;&lt;p&gt;1 Resource loading performance&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;2 HTML rendering time performance&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;3 Data parsing and handling &lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;For the first type of issue, the answer in a nut shell is "asynchronous, asynchronous, asynchronous". However this very AJAX answer is not the whole picture.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;div class="jive-quote"&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt; &lt;a class="jive-link-external-small" dynsrc="#" href="http://developer.yahoo.com/performance/rules.html#cacheajax" lowsrc="#" src="#"&gt;Make AJAX Cacheable.&lt;/a&gt; &lt;/p&gt;&lt;p&gt;One of the cited benefits of Ajax is that it provides instantaneous feedback to the user because it requests information asynchronously from the backend web server. However, using Ajax is no guarantee that the user won't be twiddling his thumbs waiting for those asynchronous JavaScript and XML responses to return. In many applications, whether or not the user is kept waiting depends on how Ajax is used. For example, in a web-based email client the user will be kept waiting for the results of an Ajax request to find all the email messages that match their search criteria. It's important to remember that "asynchronous" does not imply "instantaneous".&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;/div&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Before GI 3.6, XML resources on Internet Explorer are loaded by GI using native MSXML3 Document ActiveX object's load method, which is not same as XMLHTTPRequest  object. From version GI 3.3 to 3.5, GI forces the use of cache XML when a cache copy is present and regardless of the HTTP cache control metadata( &lt;a class="jive-link-external-small" dynsrc="#" href="http://developer.tibco.com/resources/gi/3_3/UnderstandingIECaching.pdf" lowsrc="#" src="#"&gt;Understanding IE Caching and GI 3.3-3.5&lt;/a&gt;. ) This was done as a workaround for an IE6 defect.  From GI 3.6 and later, GI uses the XMLHTTPRequest to load XML resource and thus subject to the same caching rules.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;What is not known to some developer is that resouces loaded over HTTP are not cached by the browser if it is not properly configured, expiration time and HTTP cache control are key to the use of browser cache. &lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;What is often forgotten is that regarless of whether your application is AJAX enabled or not, it is in the end still a web-based application. This means that the standard HTML page optimization techniques still applies. These are things like (as found by Yahoo performance team, these are my top 4): &lt;/p&gt;&lt;ol&gt;&lt;li&gt;&lt;p&gt;1 Add Expires header (and or HTTP Cache control header)&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;2 Gzip components&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;3 Minify Javascript &lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;4 Configure ETags&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;See the full list at &lt;a class="jive-link-external-small" dynsrc="#" href="http://developer.yahoo.com/performance/rules.html" lowsrc="#" src="#"&gt;Yahoo performance rules,&lt;/a&gt; and the Special Rule for AJAX &lt;a class="jive-link-external-small" dynsrc="#" href="http://developer.yahoo.com/performance/rules.html#cacheajax" lowsrc="#" src="#"&gt;Make AJAX Cacheable.&lt;/a&gt; &lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;As for the last type of issue on Data handling, what is often forgotten by AJAX developers is that the browser (especially older browser like IE6) was never designed to run a full fledge application or handle hundreds of megs of data. So developer should remember to keep the heavy lifting on the server and allow the the client GI application to fetch only the neccessary data when it's needed. &lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;h6&gt;&lt;span&gt;Using hide / show, (setting "visibility") &lt;/span&gt;&lt;br/&gt;&lt;/h6&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;One of the optimization technique I've seen for HTML rendering is to use the "Visibility" property.  What the developer should know about this technique is that GI has a dual DOM architecture.  This means that GI is architected to use a secondary abstraction DOM used to model and keep track of GI objects. So making the object "hidden" does not remove it from the GI DOM model. On top of that, while the HTML is not visibly rendered, they are still present in the HTML DOM, which means that any DOM operation on the element will still be affected. In short, this technique should not be applied blindly everywhere.  A good example is the the Tab UI control which employs this technique to hide/show the tab panes. A bad example is where the application load every canvas in an application and hides them, regardless of whether the compnents/canvas will ever be shown. &lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;h6&gt;&lt;span&gt;TBD : how application layout and flow design can affect performance, good and bad.  &lt;/span&gt;&lt;/h6&gt;&lt;/div&gt;</description>
      <category domain="http://www.tibcommunity.com/blogs/gi/tags">performance</category>
      <category domain="http://www.tibcommunity.com/blogs/gi/tags">general_interface</category>
      <category domain="http://www.tibcommunity.com/blogs/gi/tags">gi</category>
      <category domain="http://www.tibcommunity.com/blogs/gi/tags">load</category>
      <category domain="http://www.tibcommunity.com/blogs/gi/tags">gi_matrix</category>
      <category domain="http://www.tibcommunity.com/blogs/gi/tags">tuning</category>
      <category domain="http://www.tibcommunity.com/blogs/gi/tags">time</category>
      <pubDate>Tue, 02 Jun 2009 00:18:37 GMT</pubDate>
      <author>dhwang</author>
      <guid>http://www.tibcommunity.com/blogs/gi/2009/06/01/gi-performance-tuning</guid>
      <dc:date>2009-06-02T00:18:37Z</dc:date>
      <clearspace:dateToText>11 months, 3 weeks ago</clearspace:dateToText>
      <wfw:comment>http://www.tibcommunity.com/blogs/gi/comment/gi-performance-tuning</wfw:comment>
      <wfw:commentRss>http://www.tibcommunity.com/blogs/gi/feeds/comments?blogPost=1047</wfw:commentRss>
    </item>
    <item>
      <title>Doubts about using AMP as oppose to just using plain simple jsx3.lang classes and packages</title>
      <link>http://www.tibcommunity.com/blogs/gi/2009/05/26/doubts-about-using-amp-as-oppose-to-just-using-plain-simple-jsx3lang-classes-and-packages</link>
      <description>&lt;div class='jive-rendered-content'&gt;&lt;p&gt;&lt;span style="font-size: 18pt"&gt;Does AMP make application harder to maintain? Is it worth re-implementing an existing application using AMP? When do you decide you need AMP as oppose to simple classes and packages?&lt;/span&gt;&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Thiese were some of the questions and doubts that comes up during discussions on AMP. However, using AMP is really not an either or choice. You can keep using classes and packages. What you need to be aware of are the new programming facilities, the jsx3.$ functions. Especially the &lt;a class="jive-link-external-small" dynsrc="#" href="http://developer.tibco.com/resources/gi/3_7/doc/html/tib_gi_developer_guide/developer_guide.5.119.htm#1065068" lowsrc="#" src="#"&gt;Asynchronous Programming Utilities &lt;/a&gt;&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;In Short, &lt;strong&gt;Why use AMP&lt;/strong&gt;? Well ..&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;&lt;strong&gt;&amp;gt;&lt;/strong&gt; An application's main definition XML in an AMP application can be made up of several source code files that are developped separately and then assembled together. Saving time since it is not necessary to recompose the complete application, when making a single change, but only the file that contains the change.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;&lt;strong&gt;&amp;gt;&lt;/strong&gt; There is a difference between complexity and maintainability. Making the assumption that the complexity of the underlying framework will lead to higher cost in maintenance is too simplistic. &lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;&lt;strong&gt;&amp;gt;&lt;/strong&gt; In the old way, coordinating the integration of a large complex application becomes a major task when everything you do may affect someone else.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;Builder and AMP integration : &lt;/p&gt;&lt;/li&gt;&lt;ol&gt;&lt;li&gt;&lt;p&gt;1. Creating AMP based application is a distributed process by nature. AMP based application are best suited for a large scale development with large number of team members. The fact that you cannot see the overall application when you work on one module should not affect the developer since he will be focused only on his module. &lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;2. When developing using AMP, you can continue to develop GUI prototypes with Builder, which is essentially what the visual environment is good at. &lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/ul&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;&lt;strong&gt;&amp;gt;&lt;/strong&gt; An investment in time and resource must be made to convert an application to AMP based design. There is definitely effort needed to design the proper extension point abstractions. &lt;/p&gt;&lt;/li&gt;&lt;ol&gt;&lt;li&gt;&lt;p&gt;1. However, when the conversion work is done, the application becomes much easier to add functionality to and maintain than it would ever be using a different architectural design&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;2. In the case of GI builder, we're now able to disable or add new functionality into Builder without fear of inadvertently breaking the other functionalities within GI Builder. &lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;3. The performance improvement for GI Builder over HTTP is probably at least double of what it was before. &lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/ul&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;&lt;strong&gt;&amp;gt;&lt;/strong&gt; The architectural constraints that AMP imposes actually makes code easier to maintain and less brittle. For example, interactions between plug-ins are well defined and limited in AMP, which encourages loosely coupled application components. When using AMP correctly, spaghetti code is must less likely to occur and would never span plug-ins, greatly reducing developer burden in maintaining not just their own code but also those of others.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;&lt;strong&gt;&amp;gt;&lt;/strong&gt; Performance improvement using AMP architecture comes from &lt;/p&gt;&lt;/li&gt;&lt;ol&gt;&lt;li&gt;&lt;p&gt;1. Forcing good design and coding practice in a asychronous environment.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;2. Defining publish / subscribe interface that allow one to many communications and fully loosely coupled module&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;3. Allowing feature/extension based load (plug-in)  and play, which can lead to smaller run-time application size.&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/ul&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;&lt;strong&gt;&amp;gt;&lt;/strong&gt; The well defined modular interface in AMP means that what was not possible before can now be done, such as : integrating the application without some of it parts, adding or removing parts   and running a partially complete application.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;</description>
      <category domain="http://www.tibcommunity.com/blogs/gi/tags">ajax</category>
      <category domain="http://www.tibcommunity.com/blogs/gi/tags">general_interface</category>
      <category domain="http://www.tibcommunity.com/blogs/gi/tags">gi</category>
      <category domain="http://www.tibcommunity.com/blogs/gi/tags">asynchronous</category>
      <category domain="http://www.tibcommunity.com/blogs/gi/tags">amp</category>
      <category domain="http://www.tibcommunity.com/blogs/gi/tags">modular</category>
      <category domain="http://www.tibcommunity.com/blogs/gi/tags">platform</category>
      <pubDate>Wed, 27 May 2009 03:03:56 GMT</pubDate>
      <author>dhwang</author>
      <guid>http://www.tibcommunity.com/blogs/gi/2009/05/26/doubts-about-using-amp-as-oppose-to-just-using-plain-simple-jsx3lang-classes-and-packages</guid>
      <dc:date>2009-05-27T03:03:56Z</dc:date>
      <clearspace:dateToText>9 months, 2 weeks ago</clearspace:dateToText>
      <wfw:comment>http://www.tibcommunity.com/blogs/gi/comment/doubts-about-using-amp-as-oppose-to-just-using-plain-simple-jsx3lang-classes-and-packages</wfw:comment>
      <wfw:commentRss>http://www.tibcommunity.com/blogs/gi/feeds/comments?blogPost=1067</wfw:commentRss>
    </item>
    <item>
      <title>Running multiple instance of same application on the same page</title>
      <link>http://www.tibcommunity.com/blogs/gi/2009/04/17/running-multiple-instance-of-same-application-on-the-same-page</link>
      <description>&lt;div class='jive-rendered-content'&gt;&lt;p&gt;This is a situaion that comes up often in portal deployment where multiple GI application could be loaded at the same time. GI provides a deployment configuration that allows you to run multiple instance of the same application. &lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;table&gt;&lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;&lt;strong&gt;jsxappns&lt;/strong&gt;  Application namespace. For example, jsxappns="myAPP". Since every application deployed on a single page must have a unique namespace, overriding the namespace can be useful when an application is multi-instantiated on the same page. However, the application must be written to never reference its namespace directly.&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;This configuration is set at the launch script tag for GI. you can find more information here &lt;a class="jive-link-external-small" dynsrc="#" href="http://www.tibco.com/devnet/resources/gi/3_6/doc/html/tib_gi_developer_guide/wwhelp/wwhimpl/common/html/wwhelp.htm?context=tib_gi_developer_guide&amp;amp;file=developer_guide.5.104.htm" lowsrc="#" src="#"&gt;Deployment Parameters&lt;/a&gt;&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;However, the developer often times build into their application code direct reference to the server name, since that is the easy way.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;So, for an application to be runnable in a multi-instance deployment, the developer must take care not to use a static application server reference.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;For example, you should design the code to be flexible by specifying the app server as a parameter to methods that requires it. &lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Here's a theme loader method &lt;/p&gt;&lt;pre class="jive-pre"&gt;&lt;code class="jive-code jive-java"&gt; Service.loadTheme = function(objGUI, server)  &lt;font color="navy"&gt;{&lt;/font&gt;
    server.loadInclude(server.resolveURI(&lt;font color="red"&gt;"jss/mydyna.xml?"&lt;/font&gt;+&lt;font color="navy"&gt;&lt;b&gt;new&lt;/b&gt;&lt;/font&gt; Date().getTime()),  &lt;font color="red"&gt;"mydyna_xml"&lt;/font&gt;, &lt;font color="red"&gt;"jss"&lt;/font&gt;); 
    server.getBodyBlock().repaint()
 &lt;font color="navy"&gt;}&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Now how do you get the server instance without refering to a static name? If the method is invoked thought a GUI object interaction the answer is there. Each GUI object are initialized in the application server context it was started from, so it can invoke &lt;strong&gt;&lt;em&gt;objGUI.getServer()&lt;/em&gt;&lt;/strong&gt; instead of doing a static name reference.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;pre class="jive-pre"&gt;&lt;code class="jive-code jive-java"&gt;Service.loadTheme2 = function(objButton) &lt;font color="navy"&gt;{&lt;/font&gt;
   var server =   objButton.getServer(); 
   server.loadInclude(server.resolveURI(&lt;font color="red"&gt;"jss/mydyna2.xml?"&lt;/font&gt;+&lt;font color="navy"&gt;&lt;b&gt;new&lt;/b&gt;&lt;/font&gt; Date().getTime()), mydyna_xml&lt;font color="red"&gt;", "&lt;/font&gt;jss&lt;font color="red"&gt;"); &lt;/font&gt;
   server.getBodyBlock().repaint();
 &lt;font color="navy"&gt;}&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt; &lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;What if the method is not invoked through GUI interaction? The server instance can be obtained during execution of&lt;/p&gt;&lt;ul&gt;&lt;li level="1" type="ul"&gt;&lt;p&gt;- Project "onload" execution and accessible through &lt;strong&gt;this&lt;/strong&gt; pointer (e.g. &lt;em&gt;myOnLoadFunction(this);&lt;/em&gt;&lt;/p&gt;&lt;/li&gt;&lt;li level="1" type="ul"&gt;&lt;p&gt;- During deserialization of the app canvas, the onAfterDeserialized is passed the top GUI object as &lt;strong&gt;objJSX&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;So you can use either place to initialize &lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;pre class="jive-pre"&gt;&lt;code class="jive-code jive-xml"&gt;
&lt;span class="jive-xml-tag"&gt;&amp;lt;serialization xmlns="urn:tibco.com/v3.0" jsxversion="3.7"&amp;gt;&lt;/span&gt;
  &lt;span class="jive-xml-tag"&gt;&amp;lt;name/&amp;gt;&lt;/span&gt;
  &lt;span class="jive-xml-tag"&gt;&amp;lt;icon/&amp;gt;&lt;/span&gt;
  &lt;span class="jive-xml-tag"&gt;&amp;lt;description/&amp;gt;&lt;/span&gt;
  &lt;span class="jive-xml-tag"&gt;&amp;lt;onBeforeDeserialize/&amp;gt;&lt;/span&gt;
  &lt;span class="jive-xml-tag"&gt;&amp;lt;onAfterDeserialize&amp;gt;&lt;/span&gt;eg.service.setServer( objJSX.getNS(), objJSX.getServer();&lt;span class="jive-xml-tag"&gt;&amp;lt;/onAfterDeserialize&amp;gt;&lt;/span&gt;
&lt;span class="jive-xml-tag"&gt;&amp;lt;/serialization&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;pre class="jive-pre"&gt;&lt;code class="jive-code jive-java"&gt;jsx3.lang.Package.definePackage(
  &lt;font color="red"&gt;"eg.service"&lt;/font&gt;,                &lt;font color="darkgreen"&gt;//the full name of the package to create&lt;/font&gt;
  function(service) &lt;font color="navy"&gt;{&lt;/font&gt;          &lt;font color="darkgreen"&gt;//name the argument of this function&lt;/font&gt;
    service.APP = &lt;font color="navy"&gt;{&lt;/font&gt;&lt;font color="navy"&gt;}&lt;/font&gt;; &lt;font color="darkgreen"&gt;// application server instance&lt;/font&gt;
    
    service.setServer = function(name, server) &lt;font color="navy"&gt;{&lt;/font&gt;
     service.APP[name] = server;    
    &lt;font color="navy"&gt;}&lt;/font&gt;
&amp;nbsp;
    service.getServer = function(name) &lt;font color="navy"&gt;{&lt;/font&gt;
      &lt;font color="navy"&gt;&lt;b&gt;return&lt;/b&gt;&lt;/font&gt; service.APP[name];
    &lt;font color="navy"&gt;}&lt;/font&gt;
 
 Service.loadTheme1 = function(objButton) &lt;font color="navy"&gt;{&lt;/font&gt;
   var server =   service.getServer(objButton.getNS());
   server.loadInclude(server.resolveURI(&lt;font color="red"&gt;"jss/mydyna.xml?"&lt;/font&gt;+&lt;font color="navy"&gt;&lt;b&gt;new&lt;/b&gt;&lt;/font&gt; Date().getTime()), &lt;font color="red"&gt;"mydyna_xml"&lt;/font&gt;, &lt;font color="red"&gt;"jss"&lt;/font&gt;); 
   server.getBodyBlock().repaint();
 &lt;font color="navy"&gt;}&lt;/font&gt;
&amp;nbsp;
Service.loadTheme2 = function(objButton) &lt;font color="navy"&gt;{&lt;/font&gt;
   var server =   objButton.getServer(); 
   server.loadInclude(server.resolveURI(&lt;font color="red"&gt;"jss/mydyna2.xml?"&lt;/font&gt;+&lt;font color="navy"&gt;&lt;b&gt;new&lt;/b&gt;&lt;/font&gt; Date().getTime()), mydyna_xml&lt;font color="red"&gt;", "&lt;/font&gt;jss&lt;font color="red"&gt;"); &lt;/font&gt;
   server.getBodyBlock().repaint();
 &lt;font color="navy"&gt;}&lt;/font&gt;
&lt;font color="navy"&gt;}&lt;/font&gt;);
&lt;/code&gt;&lt;/pre&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;/div&gt;</description>
      <category domain="http://www.tibcommunity.com/blogs/gi/tags">general_interface</category>
      <category domain="http://www.tibcommunity.com/blogs/gi/tags">gi</category>
      <category domain="http://www.tibcommunity.com/blogs/gi/tags">namespace</category>
      <category domain="http://www.tibcommunity.com/blogs/gi/tags">multiple</category>
      <category domain="http://www.tibcommunity.com/blogs/gi/tags">instance</category>
      <pubDate>Fri, 17 Apr 2009 18:52:31 GMT</pubDate>
      <author>dhwang</author>
      <guid>http://www.tibcommunity.com/blogs/gi/2009/04/17/running-multiple-instance-of-same-application-on-the-same-page</guid>
      <dc:date>2009-04-17T18:52:31Z</dc:date>
      <clearspace:dateToText>10 months, 3 weeks ago</clearspace:dateToText>
      <clearspace:replyCount>3</clearspace:replyCount>
      <wfw:comment>http://www.tibcommunity.com/blogs/gi/comment/running-multiple-instance-of-same-application-on-the-same-page</wfw:comment>
      <wfw:commentRss>http://www.tibcommunity.com/blogs/gi/feeds/comments?blogPost=1052</wfw:commentRss>
    </item>
    <item>
      <title>Object-Oriented Programming in JavaScript: Packages in TIBCO General Interface</title>
      <link>http://www.tibcommunity.com/blogs/gi/2009/03/10/objectoriented-programming-in-javascript-packages-in-tibco-general-interface</link>
      <description>&lt;div class='jive-rendered-content'&gt;&lt;h1&gt;&lt;span&gt;Object-Oriented Programming in JavaScript: Packages in TIBCO General Interface&lt;/span&gt;&lt;/h1&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;The article, “ &lt;a class="jive-link-wiki-small" dynsrc="#" href="http://www.tibcommunity.com/docs/DOC-1550" lowsrc="#" src="#"&gt;Object-Oriented Programming in JavaScript with TIBCO General Interface&lt;/a&gt;,” is an overview of the primary object-oriented constructs provided in TIBCO® General Interface™.  In this blog post and several others to follow, a more detailed examination of other object-oriented constructs that TIBCO offers. The first object-oriented concept addressed is one sorely lacking in the JavaScript language but provided in TIBCO General Interface: packages.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;A package, or namespace, is the construct that object-oriented languages use to organize related classes into a common group. Packages promote good code organization and prevent accidental name collisions by providing uniqueness to class names. &lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;TIBCO General Interface goes one step further than other object-oriented frameworks in providing the ability to declare the package with code-defining methods and attributes relating to it. &lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;In TIBCO General Interface, a package can be identified using the dot-separated reverse domain name convention; Unlike Java, it does not however need to be associated with a directory in the file system with the same name. GI framework does make use of package and defines them in a file named Package.js (like &lt;em&gt;jsx3/lang/Package.js&lt;/em&gt; and &lt;em&gt;jsx3/util/package.js&lt;/em&gt;), however this is an abitrary code organization choice and not a requirement.&lt;/p&gt;&lt;p&gt;The WSDL Mapping 2 sample shows code in a package named eg.WSDL2, which holds all static methods for the sample. &lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;The Package class provides an introspectable API for JavaScript/JSX packages. It also provides a way of defining  new packages.&lt;/p&gt;&lt;p&gt;An instance of this class may be obtained in one of the following ways (&lt;strong&gt;this class may not be instantiated  directly&lt;/strong&gt;):&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;ul&gt;&lt;li level="1" type="ul"&gt;&lt;p&gt;&lt;strong&gt;&amp;gt;&amp;gt;&lt;/strong&gt; jsx3.lang.jsxpackage&lt;/p&gt;&lt;/li&gt;&lt;li level="1" type="ul"&gt;&lt;p&gt;&lt;strong&gt;&amp;gt;&amp;gt;&lt;/strong&gt; jsx3.Package.forName('jsx3.lang')&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;In this example, the JavaScript object jsx3.lang is known as the package "namespace," which is a plain JavaScript object and is analogous to the constructor property of a jsx3.Class.&lt;/p&gt;&lt;p&gt;The following is an example of how to define a new package called eg.tests:&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;pre class="jive-pre"&gt;&lt;code class="jive-code jive-java"&gt;jsx3.lang.Package.definePackage(  &lt;font color="red"&gt;"eg.tests"&lt;/font&gt;,   &lt;font color="darkgreen"&gt;// the full name of the package to create  &lt;/font&gt;
function(tests) &lt;font color="navy"&gt;{&lt;/font&gt;                  &lt;font color="darkgreen"&gt;// name the argument of this function "eg"&lt;/font&gt;
    &lt;font color="darkgreen"&gt;// define a static method like this:&lt;/font&gt;
    tests.staticMethod = function() &lt;font color="navy"&gt;{&lt;/font&gt;      ...    &lt;font color="navy"&gt;}&lt;/font&gt;;
    &lt;font color="darkgreen"&gt;// define a static field like this:&lt;/font&gt;
    tests.STATIC_FIELD = &lt;font color="red"&gt;"..."&lt;/font&gt;;  &lt;font color="navy"&gt;}&lt;/font&gt;
&amp;nbsp;
);
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;In line 1 of the above example, the static method definePackage() on the jsx3.lang.Package class is called with two arguments: the name of the package and an initialization function for defining the package’s members. &lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Unlike classes, the package and its members can only be static in nature. Although you cannot instantiate a package, you can still reference it using the &lt;strong&gt;this&lt;/strong&gt;keyword from within its methods. If any intermediary packages have not yet been defined when calling the definePackage() method, they are automatically defined in the creation of the new package. Furthermore, the definePackage() method can be called many times for the same package. Each call adds to the existing package rather than replacing the package’s existing members. The declaration of the package is optional, except where you desire introspection, which itself is subject for another in depth discussion.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;TIBCO General Interface recommends that applications refrain from creating global methods and attributes in JavaScript, which in effect modify the window object. Doing so can cause name collisions and confusion when multiple projects are brought within the same JavaScript server. Rather, if global methods are necessary, add them to packages, instead.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;For a fuller example of Package, consider the WSDL Mapping 2 sample. &lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;pre class="jive-pre"&gt;&lt;code class="jive-code jive-java"&gt;jsx3.lang.Package.definePackage(
  &lt;font color="red"&gt;"eg.wsdl2"&lt;/font&gt;,                &lt;font color="darkgreen"&gt;//the full name of the package to create&lt;/font&gt;
  function(wsdl2) &lt;font color="navy"&gt;{&lt;/font&gt;          &lt;font color="darkgreen"&gt;//name the argument of this function&lt;/font&gt;
&amp;nbsp;
   &lt;font color="darkgreen"&gt;/**
    * Executes the service mapping and subscribes functions to events.
    * call this method to begin the service call (eg.wsdl2.callGetHistoricalQuotes();)
    */&lt;/font&gt;
    wsdl2.callGetHistoricalQuotes = function() &lt;font color="navy"&gt;{&lt;/font&gt;
      &lt;font color="darkgreen"&gt;//executes the service mapping&lt;/font&gt;
      var objService = wsdl2.APP.loadResource(&lt;font color="red"&gt;"sampleGetHistoricalQuotes_xml"&lt;/font&gt;);
      objService.setOperationName(&lt;font color="red"&gt;"GetHistoricalQuotes"&lt;/font&gt;);
&amp;nbsp;
      &lt;font color="darkgreen"&gt;//since the server's response (a SOAP document) will be converted to CDF,&lt;/font&gt;
      &lt;font color="darkgreen"&gt;//compile the mapping rules into XSLT for faster conversion&lt;/font&gt;
      objService.compile();
      
      &lt;font color="darkgreen"&gt;//subscribe and call&lt;/font&gt;
      objService.subscribe(jsx3.net.Service.ON_SUCCESS, wsdl2.onGetHistoricalQuotesSuccess);
      objService.subscribe(jsx3.net.Service.ON_ERROR, wsdl2.onGetHistoricalQuotesError);
      objService.subscribe(jsx3.net.Service.ON_INVALID, wsdl2.onGetHistoricalQuotesInvalid);
      objService.doCall();
    &lt;font color="navy"&gt;}&lt;/font&gt;;
&amp;nbsp;
   &lt;font color="darkgreen"&gt;/**
    * {String} stores the feedback from the web service.
    */&lt;/font&gt;
    wsdl2.wsOutcome = &lt;font color="red"&gt;"Success"&lt;/font&gt;;
&amp;nbsp;
   &lt;font color="darkgreen"&gt;/**
    * {String} stores the message sent from the web service if an error occurs.
    */&lt;/font&gt;
    wsdl2.wsMessage = &lt;font color="red"&gt;"Error"&lt;/font&gt;;
&amp;nbsp;
   &lt;font color="darkgreen"&gt;/**
    * Repaints the grid control after successful web service call.
    *
    * @param objEvent {String} static field event type for successful response.
    */&lt;/font&gt;
    wsdl2.onGetHistoricalQuotesSuccess = function(objEvent) &lt;font color="navy"&gt;{&lt;/font&gt;
       &lt;font color="navy"&gt;&lt;b&gt;if&lt;/b&gt;&lt;/font&gt; ( wsdl2.wsOutcome == &lt;font color="red"&gt;"Success"&lt;/font&gt;) &lt;font color="navy"&gt;{&lt;/font&gt;
         wsdl2.APP.getJSXByName(&lt;font color="red"&gt;"gridResults"&lt;/font&gt;).repaintData();
         wsdl2.APP.alert(&lt;font color="red"&gt;"Success"&lt;/font&gt;,&lt;font color="red"&gt;"The service call was successful."&lt;/font&gt;);
       &lt;font color="navy"&gt;}&lt;/font&gt;
       &lt;font color="navy"&gt;&lt;b&gt;else&lt;/b&gt;&lt;/font&gt; &lt;font color="navy"&gt;{&lt;/font&gt;
         &lt;font color="darkgreen"&gt;// An error was sent from the web service.&lt;/font&gt;
         wsdl2.APP.alert(&lt;font color="red"&gt;"Web Service Error: "&lt;/font&gt; + wsdl2.wsOutcome, &lt;font color="red"&gt;"The web service sent the following error message: &amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;"&lt;/font&gt; + wsdl2.wsMessage, null, &lt;font color="red"&gt;"Close"&lt;/font&gt;, &lt;font color="navy"&gt;{&lt;/font&gt;width:350, height:200&lt;font color="navy"&gt;}&lt;/font&gt;);
       &lt;font color="navy"&gt;}&lt;/font&gt;
    &lt;font color="navy"&gt;}&lt;/font&gt;;
&amp;nbsp;
   &lt;font color="darkgreen"&gt;/**
    * Creates an alert box with HTTP status code on failed service call attempt.
    *
    * @param objEvent {String} static field event type for unsuccessful response.
    */&lt;/font&gt;
    wsdl2.onGetHistoricalQuotesError = function(objEvent) &lt;font color="navy"&gt;{&lt;/font&gt;
      var myStatus = objEvent.target.getRequest().getStatus();
      wsdl2.APP.alert(&lt;font color="red"&gt;"Error"&lt;/font&gt;,&lt;font color="red"&gt;"The service call failed. The HTTP Status code is: "&lt;/font&gt; + myStatus);
    &lt;font color="navy"&gt;}&lt;/font&gt;;
&amp;nbsp;
   &lt;font color="darkgreen"&gt;/**
    * Creates an alert box if one or more restrictions fails during message generation.
    *
    * @param objEvent {String} static field event type for message generation.
    */&lt;/font&gt;
    wsdl2.onGetHistoricalQuotesInvalid = function(objEvent) &lt;font color="navy"&gt;{&lt;/font&gt;
      wsdl2.APP.alert(&lt;font color="red"&gt;"Invalid"&lt;/font&gt;,&lt;font color="red"&gt;"The following message node just failed validation:\n\n"&lt;/font&gt; + objEvent.message);
    &lt;font color="navy"&gt;}&lt;/font&gt;;
&amp;nbsp;
  &lt;font color="navy"&gt;}&lt;/font&gt;
);
&lt;/code&gt;&lt;/pre&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Two items of  NOTE that is not in the code&lt;/p&gt;&lt;ol&gt;&lt;li level="1" type="ol"&gt;&lt;p&gt;&lt;strong&gt;1.&lt;/strong&gt; The sample project uses a package Static member(property) that is not explicitly declared "eg.wsdl2.APP" &lt;/p&gt;&lt;/li&gt;&lt;li level="1" type="ol"&gt;&lt;p&gt;&lt;strong&gt;2.&lt;/strong&gt; This package code can be made more portable / reusable by adding a function parameter of &lt;em&gt;objJSX&lt;/em&gt; to &lt;br/&gt; &lt;em&gt;callGetHistoricalQuotes&lt;/em&gt; &lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;e.g.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;pre class="jive-pre"&gt;&lt;code class="jive-code jive-java"&gt;&lt;font color="darkgreen"&gt;// Add a new parmeter objJSX, which will be the button instance clicked that trigger this action &lt;/font&gt;
wsdl2.callGetHistoricalQuotes = function(objJSX) &lt;font color="navy"&gt;{&lt;/font&gt;
var server = objJSX.getServer(); &lt;font color="darkgreen"&gt;// app server instane of the GUI object.&lt;/font&gt;
&lt;font color="darkgreen"&gt;// ...&lt;/font&gt;
&amp;nbsp;
objService.setNamespace(server); &lt;font color="darkgreen"&gt;//Sets the namespace for the server/project to run the service instance within.&lt;/font&gt;
&amp;nbsp;
&amp;nbsp;
&lt;font color="navy"&gt;}&lt;/font&gt; 
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt; &lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;/div&gt;</description>
      <category domain="http://www.tibcommunity.com/blogs/gi/tags">oriented</category>
      <category domain="http://www.tibcommunity.com/blogs/gi/tags">general_interface</category>
      <category domain="http://www.tibcommunity.com/blogs/gi/tags">gi</category>
      <category domain="http://www.tibcommunity.com/blogs/gi/tags">object</category>
      <category domain="http://www.tibcommunity.com/blogs/gi/tags">programming</category>
      <category domain="http://www.tibcommunity.com/blogs/gi/tags">package</category>
      <pubDate>Tue, 10 Mar 2009 23:46:28 GMT</pubDate>
      <author>dhwang</author>
      <guid>http://www.tibcommunity.com/blogs/gi/2009/03/10/objectoriented-programming-in-javascript-packages-in-tibco-general-interface</guid>
      <dc:date>2009-03-10T23:46:28Z</dc:date>
      <clearspace:dateToText>1 year, 1 week ago</clearspace:dateToText>
      <wfw:comment>http://www.tibcommunity.com/blogs/gi/comment/objectoriented-programming-in-javascript-packages-in-tibco-general-interface</wfw:comment>
      <wfw:commentRss>http://www.tibcommunity.com/blogs/gi/feeds/comments?blogPost=1046</wfw:commentRss>
    </item>
    <item>
      <title>Sending elements selected in a Matrix grid with XML Mapping Utility</title>
      <link>http://www.tibcommunity.com/blogs/gi/2009/02/05/sending-elements-selected-in-a-matrix-grid-with-xml-mapping-utility</link>
      <description>&lt;div class='jive-rendered-content'&gt;&lt;p&gt;&lt;strong&gt;&lt;a class="jive-link-message-small" dynsrc="#" href="http://www.tibcommunity.com/message/13374#13374" lowsrc="#" src="#"&gt;Author: Luke Birdeau&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;The XML Mapping utility does allow you to specify which records in your CDF document actually get mapped. There is a API call exposed by the jsx3.net.Service class called &lt;strong&gt;setCDFRecords&lt;/strong&gt; that can be called from a mapping rule.  For example, assume you have a CDF document in the XML Cache called &lt;em&gt;myXML&lt;/em&gt;:&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;pre class="jive-pre"&gt;&lt;code class="jive-code jive-xml"&gt;
&lt;span class="jive-xml-tag"&gt;&amp;lt;data jsxid="jsxroot"&amp;gt;&lt;/span&gt;
&lt;span class="jive-xml-tag"&gt;&amp;lt;record jsxid="a" checked="1" jsxtext="a"/&amp;gt;&lt;/span&gt;
&lt;span class="jive-xml-tag"&gt;&amp;lt;record jsxid="b" checked="0" jsxtext="b"/&amp;gt;&lt;/span&gt;
&lt;span class="jive-xml-tag"&gt;&amp;lt;record jsxid="c" checked="1" jsxtext="c"/&amp;gt;&lt;/span&gt;
&lt;span class="jive-xml-tag"&gt;&amp;lt;record jsxid="d" checked="1" jsxtext="d"/&amp;gt;&lt;/span&gt;
&lt;span class="jive-xml-tag"&gt;&amp;lt;/data&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Next, Create a &lt;em&gt;CDF Document&lt;/em&gt; mapping rule using the XML Mapping Utility for the outbound message you are creating. Set its path/value field to: myXML. Add an additional mapping rule (a &lt;em&gt;Script&lt;/em&gt; type this time) and set the following as its path/value:&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;pre class="jive-pre"&gt;&lt;code class="jive-code jive-java"&gt;setCDFRecords(&lt;font color="red"&gt;"record[@checked='1']"&lt;/font&gt;);
&lt;/code&gt;&lt;/pre&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Here is what happened:&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Any time a &lt;em&gt;CDF Document&lt;/em&gt; mapping is encountered, all record nodes that are immediate children of the root node (data) are placed in a collection (jsx3.util.Collection). Then when a &lt;em&gt;CDF Record&lt;/em&gt; mapping is encountered, the first record in the collection is assigned as the &lt;em&gt;CDF Context&lt;/em&gt; and the ensuing rules are run.  When a CDF &lt;em&gt;Attribute&lt;/em&gt; mapping is encountered, the record referenced by the CDF Context is used. The mapper then repeats this as long as there are more records in the collection. By calling setCDFRecords, you effectively tell the system to not use its default query:&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;pre class="jive-pre"&gt;&lt;code class="jive-code jive-java"&gt;currentRecordContext.selectNodes(&lt;font color="red"&gt;"record"&lt;/font&gt;);
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;rather, use a custom query.  In your case:&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;pre class="jive-pre"&gt;&lt;code class="jive-code jive-java"&gt;currentRecordContext.selectNodes(&lt;font color="red"&gt;"record[@checked='1']"&lt;/font&gt;);
&lt;/code&gt;&lt;/pre&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;div class="jive-quote"&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;NOTE&lt;/strong&gt; &lt;em&gt;setCDFRecords() goes with your CDF Document mapping as an additional script mapping rule.&lt;/em&gt;&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;/div&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Example&lt;/strong&gt; We want to map the &lt;em&gt;jsxtext&lt;/em&gt; attribute from record &lt;strong&gt;with&lt;/strong&gt; &lt;em&gt;jsxselected&lt;/em&gt; checked to WSDL Schema structure&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;pre class="jive-pre"&gt;&lt;code class="jive-code jive-xml"&gt;
&lt;span class="jive-xml-tag"&gt;&amp;lt;element name = "PersonSearch"&amp;gt;&lt;/span&gt;
&lt;span class="jive-xml-tag"&gt;&amp;lt;complexType&amp;gt;&lt;/span&gt;
&lt;span class="jive-xml-tag"&gt;&amp;lt;sequence&amp;gt;&lt;/span&gt;
&lt;span class="jive-xml-tag"&gt;&amp;lt;element name = "QueryTarget" type = "xsd:string" maxOccurs = "unbounded"/&amp;gt;&lt;/span&gt;
&lt;span class="jive-xml-tag"&gt;&amp;lt;/sequence&amp;gt;&lt;/span&gt;
&lt;span class="jive-xml-tag"&gt;&amp;lt;/complexType&amp;gt;&lt;/span&gt;
&lt;span class="jive-xml-tag"&gt;&amp;lt;/element&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;In the Mapping utility, select the rule tree node &lt;em&gt;PersonSearch&lt;/em&gt;. &lt;/p&gt;&lt;ol&gt;&lt;li level="1" type="ol"&gt;&lt;p&gt;1. Add a CDF Document mapping and enter the name of the CDF Document you wish to map to (its cache id). &lt;/p&gt;&lt;/li&gt;&lt;li level="1" type="ol"&gt;&lt;p&gt;2. Next add a Script mapping to the PersonSearch node and set its value to:&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;pre class="jive-pre"&gt;&lt;code class="jive-code jive-java"&gt;setCDFRecords(&lt;font color="red"&gt;"record[@jsxselected='1']"&lt;/font&gt;);
&lt;/code&gt;&lt;/pre&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Next, select the rule named, QueryTarget. &lt;/p&gt;&lt;ol&gt;&lt;li level="1" type="ol"&gt;&lt;p&gt;1. Add a CDF Record Mapping (records don't need a value). &lt;/p&gt;&lt;/li&gt;&lt;li level="1" type="ol"&gt;&lt;p&gt;2. Next, add a CDF Attribute mapping and enter jsxtext as the named CDF attribute on that record that you want to map to.&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;So to recap, you should have two mappings on the PersonSearch rule and two mappings on the QueryTarget rule.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;/div&gt;</description>
      <category domain="http://www.tibcommunity.com/blogs/gi/tags">grid</category>
      <category domain="http://www.tibcommunity.com/blogs/gi/tags">general_interface</category>
      <category domain="http://www.tibcommunity.com/blogs/gi/tags">gi</category>
      <category domain="http://www.tibcommunity.com/blogs/gi/tags">mapping</category>
      <category domain="http://www.tibcommunity.com/blogs/gi/tags">matrix</category>
      <category domain="http://www.tibcommunity.com/blogs/gi/tags">bulder</category>
      <pubDate>Thu, 05 Feb 2009 22:23:09 GMT</pubDate>
      <author>dhwang</author>
      <guid>http://www.tibcommunity.com/blogs/gi/2009/02/05/sending-elements-selected-in-a-matrix-grid-with-xml-mapping-utility</guid>
      <dc:date>2009-02-05T22:23:09Z</dc:date>
      <clearspace:dateToText>1 year, 1 month ago</clearspace:dateToText>
      <clearspace:replyCount>3</clearspace:replyCount>
      <wfw:comment>http://www.tibcommunity.com/blogs/gi/comment/sending-elements-selected-in-a-matrix-grid-with-xml-mapping-utility</wfw:comment>
      <wfw:commentRss>http://www.tibcommunity.com/blogs/gi/feeds/comments?blogPost=1044</wfw:commentRss>
    </item>
    <item>
      <title>Top / header Checkbox on Matrix Column</title>
      <link>http://www.tibcommunity.com/blogs/gi/2008/10/28/top-header-checkbox-on-matrix-column</link>
      <description>&lt;div class='jive-rendered-content'&gt;&lt;p&gt;Simply adding HTML for a checkbox to a matrix Column header results in a checkbox that doesn;t get checked or unchecked in response to mouse clicks.&lt;br/&gt; &lt;br/&gt; The challenge in the implementation is that the Matrix headers are designed to use the mousedown event to reorder columns and trigger sort behaviors. This means that the click event on the checkbox gets intercepted and canceled by the header and clicking on the checkbox never causes the checkbox to get checked.&lt;br/&gt; &lt;br/&gt; To address, use the mousedown event on the checkbox to toggle the checked state (see code below). It is also critical to cancel event bubbling to stop the Matrix from sorting and reordering when the user's intention is to check or uncheck the box.&lt;br/&gt; &lt;br/&gt; Lastly, note that the checkbox described below is XHTML compliant. This is important if you intend your app to ever run on an XHTML Web page (and it's simply good practice these days to author well-formed HTML).&lt;br/&gt; &lt;br/&gt; &lt;br/&gt; &lt;/p&gt;&lt;pre class="jive-pre"&gt;&lt;code class="jive-code"&gt; &amp;lt;input type="checkbox" 
onmousedown="this.checked = !this.checked; jsx3.gui.Event.wrap(event).cancelBubble();" 
onclick="jsx3.gui.Event.wrap(event).cancelBubble();return false;" 
onmouseup="jsx3.gui.Event.wrap(event).cancelBubble();" /&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;br/&gt; &lt;br/&gt; Darren Hwang (channeling Luke Birdeau)&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;/div&gt;</description>
      <category domain="http://www.tibcommunity.com/blogs/gi/tags">grid</category>
      <category domain="http://www.tibcommunity.com/blogs/gi/tags">general_interface</category>
      <category domain="http://www.tibcommunity.com/blogs/gi/tags">gi</category>
      <category domain="http://www.tibcommunity.com/blogs/gi/tags">column</category>
      <category domain="http://www.tibcommunity.com/blogs/gi/tags">checkbox</category>
      <pubDate>Tue, 28 Oct 2008 19:22:05 GMT</pubDate>
      <author>dhwang</author>
      <guid>http://www.tibcommunity.com/blogs/gi/2008/10/28/top-header-checkbox-on-matrix-column</guid>
      <dc:date>2008-10-28T19:22:05Z</dc:date>
      <clearspace:dateToText>1 year, 4 months ago</clearspace:dateToText>
      <clearspace:replyCount>2</clearspace:replyCount>
      <wfw:comment>http://www.tibcommunity.com/blogs/gi/comment/top-header-checkbox-on-matrix-column</wfw:comment>
      <wfw:commentRss>http://www.tibcommunity.com/blogs/gi/feeds/comments?blogPost=1041</wfw:commentRss>
    </item>
    <item>
      <title>Some useful Builder usage tips</title>
      <link>http://www.tibcommunity.com/blogs/gi/2008/10/21/some-useful-builder-usage-tips</link>
      <description>&lt;div class='jive-rendered-content'&gt;&lt;p&gt;&lt;strong&gt;Reassign the "ctrl+s" hot key to "Save &amp;amp; Reload"&lt;/strong&gt;.(Goto Builder Menu "Tools" &amp;gt; "IDE Settings" &amp;gt; "IDE Hot Keys" , locate "Save &amp;amp; Reload" , double click and press CTRL  S keys)&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Quickly locate a component using "ctrl+&lt;/strong&gt;&lt;em&gt;&lt;strong&gt;click"&lt;/strong&gt; on a GUI control in the canvas to select the component on the  "Component Hiearchy" palette. (&lt;strong&gt;NOTE&lt;/strong&gt; : the matrix component swallows the "ctrl&lt;/em&gt;+click". So in order to click select a matrix control, you must do the clik on the little grey patch under the vertical scrollbar where the events bubbling is not cancel)&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Float the "Component Libraries" palette&lt;/strong&gt; to give more display area for the "Properties Editor" and "Event Editor" palettes. (This is really just a preference, but I find it useful since you can see more of the properties at a glance). &lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;u&gt;&lt;strong&gt;Update&lt;/strong&gt;&lt;/u&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Context sensitive help&lt;/strong&gt; press keys "alt+F1" while focusing on the component you like get help on (For example, component hiearchy tree) to open the HTML Doc page on the component.&lt;/p&gt;&lt;/div&gt;</description>
      <category domain="http://www.tibcommunity.com/blogs/gi/tags">ajax</category>
      <category domain="http://www.tibcommunity.com/blogs/gi/tags">gi</category>
      <category domain="http://www.tibcommunity.com/blogs/gi/tags">general</category>
      <category domain="http://www.tibcommunity.com/blogs/gi/tags">interface</category>
      <category domain="http://www.tibcommunity.com/blogs/gi/tags">builder</category>
      <pubDate>Tue, 21 Oct 2008 19:46:14 GMT</pubDate>
      <author>dhwang</author>
      <guid>http://www.tibcommunity.com/blogs/gi/2008/10/21/some-useful-builder-usage-tips</guid>
      <dc:date>2008-10-21T19:46:14Z</dc:date>
      <clearspace:dateToText>1 year, 5 months ago</clearspace:dateToText>
      <wfw:comment>http://www.tibcommunity.com/blogs/gi/comment/some-useful-builder-usage-tips</wfw:comment>
      <wfw:commentRss>http://www.tibcommunity.com/blogs/gi/feeds/comments?blogPost=1038</wfw:commentRss>
    </item>
    <item>
      <title>Useful tools for AJAX application development</title>
      <link>http://www.tibcommunity.com/blogs/gi/2008/10/13/useful-tools-for-ajax-application-development</link>
      <description>&lt;div class='jive-rendered-content'&gt;&lt;p&gt;These software tools provide additional assistance in developing tests:&lt;br/&gt; 1. For Internet Explorer, download and install the Developer Toolbar. This tool&lt;br/&gt; provides a very useful DOM Explorer function that allows you to inspect the&lt;br/&gt; generated HTML markup at runtime.&lt;br/&gt; &lt;a class="jive-link-external-small" dynsrc="#" href="http://www.microsoft.com/downloads/details.aspx?FamilyID=e59c3964-67%202d-4511-bb3e-2d5e1db91038&amp;amp;displaylang=en" lowsrc="#" src="#"&gt;Microsoft Internet Explorer Developer toolbar&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;br/&gt; 2. Download and install Visual Web Developer 2005 Express Edition. This web&lt;br/&gt; IDE provides syntax highlighted editing for HTML, XML and JavaScript.&lt;br/&gt; &lt;a class="jive-link-external-small" dynsrc="#" href="http://msdn.microsoft.com/vstudio/express/default.aspx" lowsrc="#" src="#"&gt;Visual Studio Express&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;br/&gt; 3. For Firefox, the best debugging tool is&lt;/p&gt;&lt;p&gt;&lt;a class="jive-link-external-small" dynsrc="#" href="https://addons.mozilla.org/en-US/firefox/addon/1843" lowsrc="#" src="#"&gt;Firebug Addon&lt;/a&gt;&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;4. For Firefox, you can alternatively  download and install the Web Developer toolbar.&lt;br/&gt; &lt;a class="jive-link-external-small" dynsrc="#" href="https://addons.mozilla.org/firefox/60/" lowsrc="#" src="#"&gt;Firefox Developer Toolbar add-on&lt;/a&gt;&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;br/&gt; 5. Best IDE editor for Javascript is IntelliJ IDEA, but you need to pay license for this&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;6. If you use the Eclipse IDE, install the JSEclipse plug-in for JavaScript editing.&lt;br/&gt; &lt;a class="jive-link-external-small" dynsrc="#" href="http://www.interaktonline.com/Products/Eclipse/JSEclipse/Overview" lowsrc="#" src="#"&gt;JSEclipse Editor plugin&lt;/a&gt;&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;7. Alternative free editor, try Notepad++ which supports more than two dozen different programming language editing. Also download the FunctionList plugin which will show you list of methods and class in an easy to access side pane.&lt;/p&gt;&lt;p&gt;&lt;a class="jive-link-external-small" dynsrc="#" href="http://notepad-plus.sourceforge.net/uk/site.htm" lowsrc="#" src="#"&gt;Notepad++&lt;/a&gt; &lt;/p&gt;&lt;/div&gt;</description>
      <category domain="http://www.tibcommunity.com/blogs/gi/tags">ajax</category>
      <category domain="http://www.tibcommunity.com/blogs/gi/tags">general_interface</category>
      <category domain="http://www.tibcommunity.com/blogs/gi/tags">ria</category>
      <category domain="http://www.tibcommunity.com/blogs/gi/tags">gi</category>
      <category domain="http://www.tibcommunity.com/blogs/gi/tags">general</category>
      <category domain="http://www.tibcommunity.com/blogs/gi/tags">interface</category>
      <pubDate>Tue, 14 Oct 2008 00:21:03 GMT</pubDate>
      <author>dhwang</author>
      <guid>http://www.tibcommunity.com/blogs/gi/2008/10/13/useful-tools-for-ajax-application-development</guid>
      <dc:date>2008-10-14T00:21:03Z</dc:date>
      <clearspace:dateToText>1 year, 4 months ago</clearspace:dateToText>
      <wfw:comment>http://www.tibcommunity.com/blogs/gi/comment/useful-tools-for-ajax-application-development</wfw:comment>
      <wfw:commentRss>http://www.tibcommunity.com/blogs/gi/feeds/comments?blogPost=1039</wfw:commentRss>
    </item>
    <item>
      <title>How to do row highlight of Table row on mouse over</title>
      <link>http://www.tibcommunity.com/blogs/gi/2008/10/09/how-to-do-row-highlight-of-table-row-on-mouse-over</link>
      <description>&lt;div class='jive-rendered-content'&gt;&lt;p&gt;Table Spyglass Event property enter this code.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;pre class="jive-pre"&gt;&lt;code class="jive-code"&gt;
var id = this.getId() + "_" + strRECORDID; 
if (id) document.getElementById(id).style.backgroundColor="yellow";
if (document.getElementById(this.lastid)) document.getElementById(this.lastid).style.backgroundColor=''; 
this.lastid = id; 
&lt;/code&gt;&lt;/pre&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;/div&gt;</description>
      <category domain="http://www.tibcommunity.com/blogs/gi/tags">gi</category>
      <category domain="http://www.tibcommunity.com/blogs/gi/tags">general</category>
      <category domain="http://www.tibcommunity.com/blogs/gi/tags">interface</category>
      <category domain="http://www.tibcommunity.com/blogs/gi/tags">table</category>
      <pubDate>Fri, 10 Oct 2008 00:45:24 GMT</pubDate>
      <author>dhwang</author>
      <guid>http://www.tibcommunity.com/blogs/gi/2008/10/09/how-to-do-row-highlight-of-table-row-on-mouse-over</guid>
      <dc:date>2008-10-10T00:45:24Z</dc:date>
      <clearspace:dateToText>1 year, 5 months ago</clearspace:dateToText>
      <clearspace:replyCount>2</clearspace:replyCount>
      <wfw:comment>http://www.tibcommunity.com/blogs/gi/comment/how-to-do-row-highlight-of-table-row-on-mouse-over</wfw:comment>
      <wfw:commentRss>http://www.tibcommunity.com/blogs/gi/feeds/comments?blogPost=1037</wfw:commentRss>
    </item>
    <item>
      <title>Cooking with GI Properties (part 1)</title>
      <link>http://www.tibcommunity.com/blogs/gi/2008/08/13/cooking-with-gi-properties-part-1</link>
      <description>&lt;div class='jive-rendered-content'&gt;&lt;p&gt;I'm a big fan of the various food network presentations that provide people new to cooking with simple recipes that introduce important concepts. And I also enjoy the way the presenters make elegant meals evolve from basic ingredients found in most kitchens. That got me to thinking about General Interface as the professional kitchen for cooking up tasty web applications and about how the GI Properties Editor is a way to display a collection of available ingredients for each of the on-screen components. I told you that I'm addicted to GI; even a cooking show can't keep me from thinking about it. In this segment, I'll review the various properties that relate to a core component of any GI application: the Block. &lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;The official name of the Block component is the "jsx3.gui.Block" and I've picked it as our starter course because many of the other GI components base their characteristics on it through a scheme called inheritance. But inheritance is a topic better covered in another segment. The Properties Editor will change the list of available settings based on what is currently selected in the Builder Component Hierarchy and because I've added a Block to my new page, the Properties Editor starts right off with showing us that the "Object Type" is in fact the "jsx3.gui.Block". Having the object type prominently displayed is really helpful if you are looking at an application created by someone else and you are unfamiliar with how things are organized.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Gazing down the Properties Editor rows, the next item is the "ID". This is assigned by the system and is unique for all the items in your project. If you've done any web design &lt;em&gt;without&lt;/em&gt; a tool like GI, you might have named one of your html tagged items in a similar fashion. Such as:&lt;/p&gt;&lt;p&gt;&lt;em&gt;&amp;lt;span id="span_1"&amp;gt;The Text&amp;lt;/span&amp;gt;&lt;/em&gt;&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;GI's Integrated Development Environment, GI Builder, is doing the same thing under the hood. It is giving the newly created element an individual identification property so that it can be located without ambiguity.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;The next property in the list is the new block instance's "Name". This is under your control and can be anything within reason. It can contain spaces and dashes and other characters, but I wouldn't get too wild with the names; just try to name it something that makes sense and follow a theme. My theme is making the first part a lower-case word and then make all the words after it with an initial capital letter and then lower-case, but without spaces. I think this is called Hungarian notation or Camel Case. My names look like "folderBlock" or "upperRightBlock" and are much more informative to me than names like "block" or "label".&lt;/p&gt;&lt;h5&gt;&lt;u&gt;Positioning&lt;/u&gt;&lt;/h5&gt;&lt;p&gt;"Relative XY" is the next item in the property list. It isn't referring to a family member's chromosomes; it is a way to layout items contained within a block. If you choose "Relative", and there are multiple items contained within the block, they get adjusted from the left or top depending on how much space is allotted. Simply, if you have a block that is 300 pixel units by 300 pixel units (300px) as the container block, a.k.a. the parent, and you have 3 blocks within it that are all 100px wide and 100px high and each one's layout is set to "Relative", then you will see all three side-by-side. But should the parent block width be reset to 250px, you will instead see two blocks side-by-side and one all by itself on the next row down.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;In contrast, if you change the property of each child block to "Absolute" then you'll notice that all three children are right on top of each other and all crowded into the top left of the parent block. To correct this pileup, set the "Left" and "Top" property values to make each one respect its sibling's personal space. The values can either be a percentage of the parent's width, as in 15%, or the value can be a number written in pixel units, such as 100. By setting the first Block with a "top" property of 100 and the "left" property to 100, you'll notice it move to that exact coordinate. The "Z-Index" property will adjust the other two components above or below the other one like a stack of pancakes. The higher the z-index, the higher the component will be positioned in the stack.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;I find it easier to design forms by using the relative property setting and let the layout flow naturally rather than absolutely positioning the elements. I usually nest the form fields inside a 100% wide parent block that has a 30px height and then position a label with a 30% width and a textbox with a 70% width. I then copy that structure within the same parent and the rows fall below each other nicely. If I move one of the rows to another position in the group, I won't need to recalculate the top and left properties of every component group affected by the change as I would need to do if I used "absolute" positioning.&lt;/p&gt;&lt;h5&gt;&lt;u&gt;Block&lt;/u&gt;&lt;/h5&gt;&lt;p&gt;The next grouping of properties is under the heading of "Block" and contains a frequently used setting called "Text/HTML". This setting allows you to type text into the field for on-screen display. Because displaying text is the bread and butter of most applications, this property field has a few other features worth noting. First, not only can you just display simple text, you can use HTML in the entry and it will be used exactly as you enter it. This enables you to use specialized tags in the application such as java applets or Vector Markup Language (VML) for graphics.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Second, GI Builder provides a way to associate a name with text and can store it in a separate file. When you enter the identifying name in the field and touch the TAB key, the Block displays the text from the lookup.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;The lookup file is called a "Properties Bundle" and is much like a spreadsheet table where the left hand column is for the lookup name and has one or more adjacent columns to resolve the text associated with the name. The first adjacent column, named "Default", holds the text that you want to use if no other columns are present. You can then add other columns based on the short-cut name for browser supported languages; English is "en_EN" and Spanish is "es_ES" to name a few. To create the "Properties Bundle", use the File/New/Properties Bundle menu commands in GI Builder. Make sure to save it and set it to load when the project starts by selecting it in the Project Files palette with a right mouse and picking the "Auto Load" menu option.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;By using the Properties Bundle file you've now separated the text from residing directly within the Block "Text/HTML" property, but it will still show up just as if you typed it right into the property field. One advantage of using this name/value lookup technique is that if you decide to make changes to the text, you only need to modify the Properties Bundle file rather than visiting each of the "Text/HTML" fields individually; it's a real time saver. &lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Finally, if you want your application to work in Montreal and you need to have all the text in French, just create another resolution field associated with the lookup name and have someone translate the values into the French language. When your application runs, the browser's language setting is inspected and if it matches the resolution column type, &lt;em&gt;voila, Bob est votre Oncle!&lt;/em&gt;&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;The other property in this section is the "Tag" field and it sets the HTML tag name when rendering the on-screen markup. I've used this in the past to force a Block to render as a SPAN tag instead of a DIV by just typing the word "span" into the property field.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;There are more properties to discuss, but I'll leave that for the next segment because I hear my oven timer buzzing in the kitchen. Or is that the smoke detector?&lt;/p&gt;&lt;/div&gt;</description>
      <category domain="http://www.tibcommunity.com/blogs/gi/tags">general_interface</category>
      <category domain="http://www.tibcommunity.com/blogs/gi/tags">gi_properties</category>
      <category domain="http://www.tibcommunity.com/blogs/gi/tags">gi_properties_bundle</category>
      <category domain="http://www.tibcommunity.com/blogs/gi/tags">gi</category>
      <pubDate>Wed, 13 Aug 2008 19:06:29 GMT</pubDate>
      <author>vic</author>
      <guid>http://www.tibcommunity.com/blogs/gi/2008/08/13/cooking-with-gi-properties-part-1</guid>
      <dc:date>2008-08-13T19:06:29Z</dc:date>
      <clearspace:dateToText>1 year, 6 months ago</clearspace:dateToText>
      <wfw:comment>http://www.tibcommunity.com/blogs/gi/comment/cooking-with-gi-properties-part-1</wfw:comment>
      <wfw:commentRss>http://www.tibcommunity.com/blogs/gi/feeds/comments?blogPost=1029</wfw:commentRss>
    </item>
    <item>
      <title>At the Water's Edge</title>
      <link>http://www.tibcommunity.com/blogs/gi/2008/07/31/at-the-waters-edge</link>
      <description>&lt;div class='jive-rendered-content'&gt;&lt;p&gt;I was sitting on an empty beach last weekend watching the surf roll in, when all of a sudden five guys came to the water's edge right in front of me with skim boards. The youngest was about 10 years old and the oldest was his father. One by one they ran down the beach at full speed and dropped their boards onto the skinny water retreating back to sea and then jumped aboard, sliding along precariously until they flopped into the water. They were really having fun. I thought it looked easy and wanted to give it a try but I didn't know the first thing about how to get started. No sooner had that thought run through my mind, I saw another guy walk up to one of the surfers and ask if he could give it a try.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;"So I just jump on it, right?" he asked. "Well, yeah, that's pretty much it" the skim board owner replied. I then watched the new guy run three steps, drop his borrowed board onto a thin layer of water, jump on it and then immediately fly over the front of the fully stopped board and tumble over the sand and into the water. He looked up from the frothing surf and said "I guess it's a little harder than it looks...I better quit before I bruise more than my ego." He gave the board back, thanked the guy and then continued his walk on down the beach. I started thinking that if he would have had a better understanding of the basic principles of skim boarding before he got started, it would have helped him tremendously.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;In order to help you understand how to build Rich Internet Applications with General Interface, I want to open this segment with a few of the basic principles of web page construction and how they apply to GI.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;The first thing to remember is that our goal is to put marks on the browser display. To do that without GI, we will need to create a page with a few lines of text written with formatting rules used by the browser to interpret our text and display it properly. The screen layout is described to the browser by following the Hypertext Markup Language (HTML) definition. The language is made up of symbols recognized by the browser and enclosed in angled brackets. The combination of angled brackets and keywords is called a "tag" and surrounds the text that we want to format. For instance, to make text bold, just add the "&amp;lt;b&amp;gt;" tag in front of the text element and "&amp;lt;/b&amp;gt;" behind it to turn it off.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;We start the formatting process with the &amp;lt;HTML&amp;gt; tag and close it with the &amp;lt;/HTML&amp;gt; tag. We can organize the page by enclosing the content into sections. The main section is the "BODY" and is tagged with that same name.&lt;/p&gt;&lt;p&gt;&amp;lt;HTML&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;lt;BODY&amp;gt;&amp;lt;/BODY&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;lt;/HTML&amp;gt;&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;We can create as many sections as we need inside the BODY and can use a variety of tags to denote the start and end of each section. The &amp;lt;div&amp;gt; tag will divide a logical group in the same way that you would use a paragraph to logically divide text. The &amp;lt;div&amp;gt; and &amp;lt;span&amp;gt; tags have no pre-defined formatting and are strictly there as a parent container for your other elements.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;The formatting definitions also allow us to group characteristics into a property collection called a "style". By including the style property inside a tag we are instructing the browser to follow a standard definition called the Cascading Style Sheet (CSS). The CSS definition also allows us to position elements on the screen in an "absolute" placement from the top and left sides of the current container. For instance, if we want to place a "block" of text to start 10 pixel units from the top and 12 pixel units from the left we can define it in the style property in the tag that goes with the text.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Example:&lt;/p&gt;&lt;p&gt;&amp;lt;div style="position:absolute;top:10px;left:12px;"&amp;gt;Hello&amp;lt;/div&amp;gt;&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;By using a style "position" property value set to "absolute", the element can be placed anywhere on a page. The tag style can be further enhanced with the size of text, the font weight (bold, italics), color and many other choices. Storing these style properties gives you the ability to call them when needed and can help to unify multiple pages with the same type of formatting.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;When you use General Interface Builder to create your page you are provided a pre-defined set of styles to format the components that you insert into the page. The style choices are exposed as a list of properties in a panel editor that changes according to the GI component you've selected. Most of the property fields have drop-down choices for you to pick from a set of values. For example, the "text-align" style property has "left", "center" and "right" alignment choices.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Builder saves your property choices and then converts them to the HTML tags for the browser to display. To demonstrate, I'll create a simple GI page with the "Block -Absolute" component picked from the Component Libraries palette and drop it into a blank page. A square grey box is displayed on the screen. At the bottom of the design area, a row of icons allows me to see the HTML that will be created at run-time. It shows as:&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;lt;span id="_jsx_1_5d" label="block" class="jsx30block" style="position:absolute;width:100px;height:100px;left:0px;top:0px;background-c olor:#e8e8f5;overflow:auto;"/&amp;gt;&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;The process of converting the saved property values to HTML tags is just one of the functions GI Builder provides. Builder will also store your favorite property settings by a name that you give it and will lookup values assigned to that name when the page is displayed. This feature is called the "Dynamic Properties File" and has a nickname of JSS in homage to the CSS property idea. So instead of typing "Tahoma" as the font family name in the property editor field, you can use "appFont" as the name you assign to "Tahoma" in the dynamic properties file. When the page is displayed, GI will lookup the "appFont" name in the dynamic properties file and exchange it with the value you've assigned it.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Furthermore, each property editor field has a type associated with it and can be part of the dynamic property information. In the "appFont" example, the type of "jsxfontname" can also be assigned to the entry so that a right-mouse context menu can be called from the "Font Name" property editor field to filter all the dynamic property records that are of the same type. The resulting drop-down menu will display them for use along with system defined styles that usually have a "@" symbol as part of the name.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;The benefit to using dynamic property values becomes clear if you change your mind often. For example, you might have created a text field for data entry and you want to put a label next to it. To make sure that it has a little breathing room between the components, you use the dynamic lookup for the margin property that uses "2px" but later change your mind to make it "4px" instead. All you need to do is change the single JSS entry and all the fields rebuild when they are repainted on the screen.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;We now know that GI can help insulate us from having to write HTML tags with elaborate style properties to create a Rich Internet Application. And we know that by using the Properties Editor we can make the formatting changes we want use in our application, yet we don't know too much about those properties. In our next discussion, each one of the property elements will be covered so that we will have a better understanding of how to combine them for the exact look we want to achieve.&lt;/p&gt;&lt;/div&gt;</description>
      <category domain="http://www.tibcommunity.com/blogs/gi/tags">dynamic_properties</category>
      <pubDate>Thu, 31 Jul 2008 20:24:05 GMT</pubDate>
      <author>vic</author>
      <guid>http://www.tibcommunity.com/blogs/gi/2008/07/31/at-the-waters-edge</guid>
      <dc:date>2008-07-31T20:24:05Z</dc:date>
      <clearspace:dateToText>1 year, 7 months ago</clearspace:dateToText>
      <wfw:comment>http://www.tibcommunity.com/blogs/gi/comment/at-the-waters-edge</wfw:comment>
      <wfw:commentRss>http://www.tibcommunity.com/blogs/gi/feeds/comments?blogPost=1025</wfw:commentRss>
    </item>
  </channel>
</rss>

