<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-2286795973865934975</id><updated>2011-07-07T20:28:40.050-07:00</updated><category term='metaui'/><category term='oil'/><category term='aribaweb'/><category term='java'/><title type='text'>Bespoke Code</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://bespokecode.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2286795973865934975/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://bespokecode.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>cameo</name><uri>http://www.blogger.com/profile/16658066881665066045</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>4</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-2286795973865934975.post-6315684346563714087</id><published>2009-07-31T05:35:00.001-07:00</published><updated>2009-07-31T05:35:37.826-07:00</updated><title type='text'>Microsoft, Yahoo! and Google Taking sides</title><content type='html'>USERS will probably not notice all that much. But the deal may be seen one day as a significant event in the internet industry. &lt;a href="http://www.microsoft.com/about/default.mspx" target="_blank" title=" (opens in a new window) "&gt;Microsoft&lt;/a&gt; and &lt;a href="http://uk.docs.yahoo.com/info/" target="_blank" title=" (opens in a new window) "&gt;Yahoo!&lt;/a&gt;, the world’s biggest software firm and its leading online portal respectively, have reached a deal for a ten-year web search and advertising partnership after years of speculation about a tie-up. The combination, which was announced on Wednesday July 29th, is not as far-reaching as originally envisaged. But it is likely to create a serious rival to &lt;a href="http://www.google.com/intl/en/about.html" target="_blank" title=" (opens in a new window) "&gt;Google&lt;/a&gt;, the online giant that dominates both of these markets.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.economist.com/businessfinance/displaystory.cfm?story_id=14119291&amp;amp;fsrc=rss"&gt;Read More&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2286795973865934975-6315684346563714087?l=bespokecode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bespokecode.blogspot.com/feeds/6315684346563714087/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://bespokecode.blogspot.com/2009/07/microsoft-yahoo-and-google-taking-sides.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2286795973865934975/posts/default/6315684346563714087'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2286795973865934975/posts/default/6315684346563714087'/><link rel='alternate' type='text/html' href='http://bespokecode.blogspot.com/2009/07/microsoft-yahoo-and-google-taking-sides.html' title='Microsoft, Yahoo! and Google Taking sides'/><author><name>cameo</name><uri>http://www.blogger.com/profile/16658066881665066045</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2286795973865934975.post-3992624243081169499</id><published>2009-07-31T05:33:00.000-07:00</published><updated>2009-07-31T05:33:58.713-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='oil'/><title type='text'>Shell Profit Falls 70% but Beats Forecasts</title><content type='html'>Royal Dutch Shell posted a 70 percent fall in net profit in the second quarter, as oil prices and refining margins tumbled, but foreign exchange gains helped the oil major beat forecasts.&lt;br /&gt;&lt;br /&gt;The world's second-largest non government-controlled oil company by market value said on Thursday second-quarter current cost of supply (CCS) net income, which strips out unrealized gains or losses related to changes in the value of fuel inventories, was $2.34 billion.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.cnbc.com//id/32214051"&gt;Read More&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2286795973865934975-3992624243081169499?l=bespokecode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bespokecode.blogspot.com/feeds/3992624243081169499/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://bespokecode.blogspot.com/2009/07/shell-profit-falls-70-but-beats.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2286795973865934975/posts/default/3992624243081169499'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2286795973865934975/posts/default/3992624243081169499'/><link rel='alternate' type='text/html' href='http://bespokecode.blogspot.com/2009/07/shell-profit-falls-70-but-beats.html' title='Shell Profit Falls 70% but Beats Forecasts'/><author><name>cameo</name><uri>http://www.blogger.com/profile/16658066881665066045</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2286795973865934975.post-8953351953205848697</id><published>2009-06-19T20:17:00.000-07:00</published><updated>2009-06-27T10:15:03.833-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='metaui'/><category scheme='http://www.blogger.com/atom/ns#' term='aribaweb'/><title type='text'>AribaWeb MetaUI Explained - Part 2(Rule Syntax. Time to Understand them)</title><content type='html'>In my previous post, &lt;a href="http://bespokecode.blogspot.com/2009/06/aribaweb-metaui-explained-part-1.html"&gt;AribaWeb MetaUI Explained - Part 1&lt;/a&gt;, we tried to get the basics of AribaWeb MetaUI going. Now its time to learn the syntax so we can write our own rules. As I said before, this is just my own exploration into MetaUI based on my understanding of this document &lt;a href="http://aribaweb.org/papers/MetaUI-InDepth.pdf"&gt;MetaIU-InDepth&lt;/a&gt; and the official &lt;a href="http://aribaweb.org/Documentation/3_MetaUI/MetaUI.htm"&gt;MetaUI Tutorial&lt;/a&gt;.You are free to correct me where my understanding is wrong or can be expanded on. Enjoy.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;RULE SYNTAX&lt;/b&gt;&lt;br /&gt;The rules syntax is inspired by W3C's Cascading Style Sheet syntax but it is extended to support nesting and chaining and also tweaked to deal with identifiers containing periods. This means as you read this tutorial/article/whatever you call it, think style sheets. These rules as we call them are written in OBJECT STYLE SHEETS files.(.oss). The concept is to style your &lt;b&gt;Domain&lt;/b&gt;&amp;nbsp; Object Model with OSS just as you style your &lt;b&gt;Document&lt;/b&gt; Object Model in HTML with CSS.&lt;br /&gt;&lt;br /&gt;Lets use a simple CSS Style for illustration. Lets say we have defined this very unintelligent style.&lt;br /&gt;&lt;br /&gt;&lt;pre class="html" name="code"&gt;.container input[type="text"] {&lt;br /&gt;&amp;nbsp; &amp;nbsp; /* Please never write this. You can loose ur business with this color combination!*/ &lt;br /&gt;&amp;nbsp; &amp;nbsp; color: green;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; background-color:pink;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;In CSS terms, the part before the '{' is known as the SELECTORS. These typically are html elements for which this declaration block affects. The selectors are used for &lt;b&gt;matching&lt;/b&gt;&amp;nbsp;(decision making) after which the&lt;br /&gt;various properties are &lt;b&gt;assigned&lt;/b&gt; their corresponding values.&lt;br /&gt;&lt;br /&gt;In OSS, the paradigm is the same. SELECTORS are used  for &lt;b&gt;matching&lt;/b&gt; (decision making)&amp;nbsp; after which the&lt;br /&gt;various properties are &lt;b&gt;assigned&lt;/b&gt; their corresponding values and its is done in a very similar fashion.&lt;br /&gt;Now let us take a typical OSS rule declaration and break it apart.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="html" name="code"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; class=busobj.User {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; field=(email, password) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; visibility:false;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Think of this just like you would in CSS.&lt;br /&gt;The meaning of the above code is 'for the Class busobj.User, never display the email and password.'&lt;br /&gt;The part before the first '{'&lt;br /&gt;&lt;br /&gt;&lt;pre class="html" name="code"&gt;class=busobj.User &lt;/pre&gt;&lt;br /&gt;is the top level Selector.&lt;b&gt; If that selector evaluates to TRUE&lt;/b&gt; then the code in the declaration block would apply. In CSS, this would typically be a combination of HTML elements with their associated attributes. In OSS, this is a CONTEXT KEY(See context key list in Part 1 of this tutorial). The context keys are what is used for decision making just as you use HTML elements for decision making in your CSS.&lt;br /&gt;&amp;nbsp;In the Code above, we also see a second level matching being done. The key used there ie field is also a Context Key.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Assignment &lt;/b&gt;&lt;br /&gt;After a decision has beed made, a property of the current context may be assigned a value or some more 'sub context keys' eg feild if top context is a class, may be used to make further selection before an assignment is made. Just like in CSS, assignment is made by the use of the the colon operator &lt;br /&gt;&lt;pre class="html" name="code"&gt;:&lt;/pre&gt;A typical assignment is like this&lt;br /&gt;&lt;br /&gt;&lt;pre class="html" name="code"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; label:"Get it now!";&lt;br /&gt;&lt;/pre&gt;The assignment must end with a semicolon(;).&lt;br /&gt;&lt;br /&gt;&lt;b&gt;DataTypes for Assignments&lt;/b&gt;&lt;br /&gt;The datatype for the value of an assignment depends on the property key in question. While most of the property keys take a String value, some are very strict with their datatype. Examples for some of the common property keys include the following:&lt;br /&gt;&lt;br /&gt;&lt;pre class="html" name="code"&gt;component: Must be an AribaWeb Component &lt;br /&gt;bindings: Map&amp;nbsp;&lt;br /&gt;trait: List of Strings&lt;br /&gt;visibility: boolean (true|false)&lt;br /&gt;edittable: boolean (true|false)&lt;br /&gt;&lt;/pre&gt;Also AW Expression language can be used. The AribaExpr interpreter is used to evaluate the expression and the returned value inserted. The returned value must conform to the datatype expected by the property key.&lt;br /&gt;Example:&lt;br /&gt;&lt;br /&gt;&lt;pre class="html" name="code"&gt;/* if they're linking off our site, target a different window */&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; linkTarget:${page.startsWith("http") ? "_blank" : null}; &lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Another feature of OSS is the ability to call methods from the OSS file allowing you to define your own formatters and extensions.&lt;br /&gt;Example:&lt;br /&gt;&lt;br /&gt;&lt;pre class="html" name="code"&gt;&amp;nbsp;&amp;nbsp; label:${ariba.ui.meta.core.UIMeta.beautifyFileName(properties.resourceName)}; &lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;As you can see, the OSS syntax is very much like CSS synrax. It is even more powerful because it allows you to dynamically affect the output by allowing expressions and method invocations.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Next Up&lt;/b&gt;&lt;br /&gt;As I keep reading the above mentioned documents, I will write down my notes just as you do if you have to study some subject on your own and periodically write them on this blog.&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;Coming up: Properties, Traits and Layouts&lt;/b&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2286795973865934975-8953351953205848697?l=bespokecode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bespokecode.blogspot.com/feeds/8953351953205848697/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://bespokecode.blogspot.com/2009/06/aribaweb-metaui-explained-part-2rule.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2286795973865934975/posts/default/8953351953205848697'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2286795973865934975/posts/default/8953351953205848697'/><link rel='alternate' type='text/html' href='http://bespokecode.blogspot.com/2009/06/aribaweb-metaui-explained-part-2rule.html' title='AribaWeb MetaUI Explained - Part 2(Rule Syntax. Time to Understand them)'/><author><name>cameo</name><uri>http://www.blogger.com/profile/16658066881665066045</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2286795973865934975.post-1153236684293330552</id><published>2009-06-08T12:51:00.001-07:00</published><updated>2009-06-12T00:06:39.454-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='metaui'/><category scheme='http://www.blogger.com/atom/ns#' term='aribaweb'/><title type='text'>AribaWeb MetaUI Explained - Part 1</title><content type='html'>&lt;b&gt;Introduction&lt;/b&gt;&lt;br /&gt;AribaWeb is a full stack Java Ajax framework for developing applications, mostly on the web. It comes with so many features and tools so the issues you would have to deal with in your day to day web development is already sorted out.&lt;br /&gt;Among its many features it the ability to generate your UI from metadata defined in stylesheet like OSS files and also from annotations defined on your classes.&lt;br /&gt;This is very beautiful because you can generate different UI based on the device or the context in use. One very practical application is for web applications that will have to run on mobile devices - and this is the area I want to explore most once I have full grasp on AribaWeb. You can read more about AribaWeb (AW) from &lt;a href="http://aribaweb.org/"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;For now we want to explore one of the stacks of AribaWeb that is very confusing but very very useful once you get a hang of it. I am also new to AW and this is part of my exploration into AW to understand and use it properly. This is therefore not a perfect explanation but my understanding of the technology from reading this document - &lt;a href="http://aribaweb.org/papers/MetaUI-InDepth.pdf"&gt;MetaUI-InDepth&lt;/a&gt;&lt;br /&gt;&amp;nbsp;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;Assertion and Concepts&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;Most of the UI code written in traditional frameworks is a mechanical application of (unstated) rules rooted in the domain object data model.&lt;br /&gt;With AW, the Objects , Business rules and Contexts can directly influence presentation without redesigning of the application.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;What is a Rule&lt;/b&gt;&lt;br /&gt;Rule defines a map of properties that should apply in the event that a set of conditions&amp;nbsp; evaluate to true. These Conditions are reffered to as Selectors. For example, Suppose we want to use MetaUI to affect the presentation of our firstname field in our com.farouk.alhassan.User object, we will write some conditions(Selectors) like this:&lt;br /&gt;class=com.farouk.alhassan.User{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; feild=firstname{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; visible:true;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Add More&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;}&lt;br /&gt;The above is what in AW terms we call a rule. AW evaluates the conditions('Equal to' sections of the code), from now on called Selectors, and nicely selects the firstname feild. From that, AW creates a Map which is just a key-value stack for this particular feild and applies those properties when generating the html. More on these when we get to rules syntax!&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Sources of Rules &lt;/b&gt;&lt;br /&gt;- Rules can come from various source including Introspection, Annotation, .OSS files and from plugged in External sources.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Rules form Introspection&lt;/b&gt;&lt;br /&gt;In AW, if you are using the MetaUI stack, then AW uses the datatypes of the feilds and other properties to generate&amp;nbsp; Rules for your feilds. Say you have this class:&lt;br /&gt;&lt;br /&gt;&lt;pre class="java" name="code"&gt;&amp;nbsp;&amp;nbsp; class DemoObject{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; BigDecimal price&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; String description&lt;br /&gt;&amp;nbsp; }&lt;br /&gt;&lt;/pre&gt;AW MetaUI uses introspection to know that price is a BigDecimal an so defines rules that apply the money formatter to it. By defining the datatype of your description feild as String, AW by default uses the AWTextFeild Component. So just by introspection, without you making any specific rules, you get a presentation UI generated on the fly for you. Now how cool is that!!!&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Rules from Annotations &lt;/b&gt;&lt;br /&gt;AW also generate rules based on annotations defined on the members of a class. Some accetable annotations that AW uses include&lt;br /&gt;@Traits&lt;br /&gt;@Trait&lt;br /&gt;@Properties&lt;br /&gt;@NavModuleClass&lt;br /&gt;&lt;br /&gt;and some more.&lt;br /&gt;check out tthis package for more annotations and how they affect your UI.&lt;br /&gt;&lt;pre class="java" name="code"&gt;&amp;nbsp; &amp;nbsp; ariba.ui.meta.annotations&lt;br /&gt;&lt;/pre&gt;&lt;b&gt;Rules from .OSS files&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;AW uses rules defined in files called OSS files to derive the view for the browser. Literally, it means AW uses these rules to generate the HTML presented to the browser. AW comes with Rules defined in WidgetsRules.oss file in the folder&lt;br /&gt;&lt;br /&gt;&lt;pre class="java:nocontrols:nogutter" name="code"&gt;src/metaui/ariba/ui/meta/layouts&lt;/pre&gt;&lt;br /&gt;and in PersistenceRules.oss&lt;br /&gt;&lt;br /&gt;&lt;pre class="java:nocontrols:nogutter" name="code"&gt;src/metaui/ariba/ui/meta/persistence&lt;/pre&gt;&lt;br /&gt;&amp;nbsp;Normally, to avoid conflicts with AW merges, you would normally not modify these unless its critical to your application.&lt;br /&gt;Application specific rules can only be defined in two files:&lt;br /&gt;&lt;br /&gt;1. &lt;b&gt;Application.oss&lt;/b&gt;: This file must live in the app folder . The filename is case sensitive. The rules in this file by practice defines global rules that affect the whole application.&lt;br /&gt;&lt;br /&gt;2. &lt;b&gt;rules.oss&lt;/b&gt;: This is per class/package based rules and is located in the package for which it affects. So if I have&lt;br /&gt;&lt;br /&gt;&lt;pre class="java:nocontrols:nogutter" name="code"&gt;com.farouk.alhassan&lt;/pre&gt;then the rules.oss go into&lt;br /&gt;&lt;pre class="java:nocontrols:nogutter" name="code"&gt;com/farouk/alhassan&lt;/pre&gt;&lt;br /&gt;&lt;b&gt;Some Data Type Rules&lt;/b&gt;&lt;br /&gt;These are the default rules that apply to some datatypes:&lt;br /&gt;Type&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Component Used&lt;br /&gt;Money(BigDecimal)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AWTextField with Money formatter&lt;br /&gt;Date&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DateField&lt;br /&gt;Entity&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AWChooser (Combo Box)&lt;br /&gt;List&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Chooser that allows Multiple selection.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Some Definitions&lt;/b&gt;&lt;br /&gt;1. &lt;i&gt;&lt;b&gt;Context&lt;/b&gt;:&amp;nbsp; &lt;/i&gt;Context&lt;i&gt; &lt;/i&gt;represents a stack of assignments (e.g. class=User, field=birthDay, operation=edit) that together form a PropertyMap for the presentation. An example is illustrated bellow. Think of the context as the current environment within which a class, field or component find itself. Within this environment, there can be values assigned to various properties of the environment. These together form a PropertyMap which is then applied to generated User Interface. Eg&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://www.bespokecode.co.uk/images/metaui.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://www.bespokecode.co.uk/images/metaui.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;2. &lt;b&gt;&lt;i&gt;Context Keys and Property Maps&lt;/i&gt;&lt;/b&gt;: Context keys are the keys used for the matching condition or selector to select the rules to apply. Property Map is the key value pair that is assigned after a match has been made base on the selector. Generally, Context keys are used to select and PropertyMap is then used to assign values to the Property keys. The PropertyMap come into play once the context keys have been used to make a selection or literally, a match has been made from the 'equal to' section. Just for emphasis, think of context keys as decision makers and PropertyMaps as the values to be assigned now that a decision has been made.&lt;br /&gt;&lt;b&gt;Some Context keys&lt;/b&gt;&lt;br /&gt;Here are some of the &lt;b&gt;common&lt;/b&gt; context keys :&lt;br /&gt;* module ------Global Nav Tab. When you define this, you get a Navigation tab&lt;br /&gt;*layout---------Defines a named layout.&lt;br /&gt;*operation-----Can be either “view”, “edit”, “create”, “search” NB: Maybe you can add more??&lt;br /&gt;*class----------Full class name (org.package.Class), Can be derived from object&lt;br /&gt;*object---------Object instance (e.g. a User object)&lt;br /&gt;*action---------Maps a named action on the page to an action defined on class&lt;br /&gt;*field-----------current field of class&lt;br /&gt;*type-----------(Java) type of current field&lt;br /&gt;*elementType--If type is collection(eg List), the type of its elements&lt;br /&gt;*editing--------Currently editing? Derived from operation&lt;br /&gt;*trait-----------Current traits in effect (like CSS classes)&lt;br /&gt;&lt;br /&gt;As you would expect or should know, every map is made of key and the keys should be known and defined before it's values can be retreived.&lt;br /&gt;With regards to our PropertyMap, here are &lt;b&gt;some&lt;/b&gt; of the common Property Keys&lt;br /&gt;&lt;br /&gt;These can be used on any entity ie the feild or member that was selected by the selector conditions&lt;br /&gt;*trait------------------List of traits to apply. Datatype: List of String&lt;br /&gt;*after-----------------Name of item (or zone) that this item should follow (for layout order). Datatype: String&lt;br /&gt;*visible---------------Should current item be shown. Datatype: boolean or reslove to boolean&lt;br /&gt;*component----------AW Component name to display. Datatype: AWComponent&lt;br /&gt;*bindings-------------Map of bindings to pass to component. Datatype: Map&lt;br /&gt;*wrapperComponent--Name of component to wrap around this component (also, wrapperBindings). Datatype: AWComponent&lt;br /&gt;&lt;br /&gt;This can only be used with Layout, Module, Field, Action entities&lt;br /&gt;*label---------------the Display Key ie what gets displayed. Datatype: String&lt;br /&gt;&lt;br /&gt;These can be used only if what was selected is a Field&lt;br /&gt;*editable------------Should the feild be editable. Datatype: boolean or reslove to boolean&lt;br /&gt;*valid---------------is the curent value valid. Datatype: boolean or reslove to boolean&lt;br /&gt;&lt;br /&gt;These can be used only if what was selected is a Layout&lt;br /&gt;*layoutsByZone-----List of sub-layout names grouped by zone(zTop, zLeft, …)&lt;br /&gt;&lt;br /&gt;These can be used only if what was selected is an Action&lt;br /&gt;actionResults--------AWResponseGenerating result: fires action&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Rules Chaining&lt;/b&gt;&lt;br /&gt;As you would expect, after an entity has been selected by the selectors defined, &lt;b&gt;some-not all-&lt;/b&gt;context keys can be used to define selectors that will select sub entities of the current entity.&lt;br /&gt;Example&lt;br /&gt;&lt;br /&gt;&lt;pre class="java" name="code"&gt;operation=edit{&lt;br /&gt;        class=model.User{&lt;br /&gt;          feild=password {&lt;br /&gt;           type=String{&lt;br /&gt;              trait=secret{&lt;br /&gt;                editing{&lt;br /&gt;                 component:AWPasswordFeild;}&lt;br /&gt;                }&lt;br /&gt;             } &lt;br /&gt;          } &lt;br /&gt;   }&lt;br /&gt; }&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;In the above example, even though component, is a context key, it is nested inside another another property making it behave as a property key. This results in a chaining effect called Rules Chaining or Nesting.&lt;br /&gt;The following are context keys that can work as property keys&lt;br /&gt;* class&lt;br /&gt;* type&lt;br /&gt;* elementType&lt;br /&gt;* trait&lt;br /&gt;* editable&lt;br /&gt;* editing&lt;br /&gt;* layout&lt;br /&gt;* component. &lt;br /&gt;&lt;br /&gt;3.&lt;b&gt;MetaContext &lt;/b&gt;&lt;br /&gt;MetaContext allows an AW component to overide the current values defined for some context keys. this is done by defining the &lt;m:context&gt; tag within the .awl file.&lt;/m:context&gt;&lt;br /&gt;Example:&lt;br /&gt;&lt;br /&gt;&lt;pre class="java" name="code"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;m:context layout="Inspect" object="$user" operation="edit"&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;m:includecomponent&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/m:includecomponent&amp;gt;&amp;lt;/m:context&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Here the object, layout and operation&amp;nbsp; context key for the current context are overridden for the current component.&lt;br /&gt;The Context API defines the following Bindings for that can be used with &lt;m:context&gt;&lt;/m:context&gt;&lt;br /&gt;&lt;b&gt;valueMap&lt;/b&gt;: &amp;nbsp; This is a map of actual context key/values.&amp;nbsp; It's an alternative way to pass in context key/values. Useful when the list of context key/value are generated dynamically.&lt;br /&gt;&lt;b&gt;scopeKey&lt;/b&gt;:&lt;b&gt; &lt;/b&gt;This is a context key, but it is usually not specified in any OSS files, and users don't need to worry it.&amp;nbsp; It is used to narrow down on rule matches.&lt;br /&gt;&lt;b&gt;pushNewContext&lt;/b&gt;:This is a boolean flag pass to MetaContext to determine if a new context object needs to be created.&lt;br /&gt;&lt;br /&gt;UPDATE 1: Corrections have been made to reflect feedback from Mailing list on&amp;nbsp; 12th June, 2009&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Coming Up! &lt;br /&gt;&lt;/b&gt;&lt;br /&gt;Rule Syntax. Time to Understand them.--Watch out for Part 2.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;NB: This document is not complete. It is based purely on how I understood the above referenced document from Craig Federighi. You are welcomed to challenge and/or correct any part of this via comments, the AW mailing list or by email to me. You will find me on the AW Google Groups forums.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2286795973865934975-1153236684293330552?l=bespokecode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bespokecode.blogspot.com/feeds/1153236684293330552/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://bespokecode.blogspot.com/2009/06/aribaweb-metaui-explained-part-1.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2286795973865934975/posts/default/1153236684293330552'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2286795973865934975/posts/default/1153236684293330552'/><link rel='alternate' type='text/html' href='http://bespokecode.blogspot.com/2009/06/aribaweb-metaui-explained-part-1.html' title='AribaWeb MetaUI Explained - Part 1'/><author><name>cameo</name><uri>http://www.blogger.com/profile/16658066881665066045</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
