Okay. I guess this is not the "OO world". That was my point. This is not OO. If you are happy with that, good. We agree!
On 11/24/05, Alexandre Poitras <[EMAIL PROTECTED]> wrote: > > I don't agree. In the OO world it is true but here using inheritance > allow you to specify some default values that you can override (think > about Tile). This is impossible in composition unless you have some > substitution mechanism. > > On 11/24/05, Dakota Jack <[EMAIL PROTECTED]> wrote: > > Composition and inhertitance are fundamentally incompatible. If they > are > > being used together conceptually, this is a design nightmare. > > > > On 11/22/05, Gary VanMatre <[EMAIL PROTECTED]> wrote: > > > > > > > > > > Hi > > > > > > > > So how would you implement composition, with inheritance, using Clay > > > instead of > > > > Tiles?. > > > I'm a big fan of Tiles and think that Clay and Tiles have their own > > > niches. I see tiles as a tool for assembling page fragments in a > reusable > > > way. Clay is at a more granular level. It's focus is on assembling a > page of > > > reusable widgets. > > > > > > > > > There are many ways to use Clay but I'll give the following example of > > > inheritance and composition. > > > > > > > > > <component jsfid="baseInputText" extends="inputText"> > > > <attributes> > > > <!-- Convention mapping "class" attribute to "styleClass" property --> > > > <set name="styleClass" value="@class"/> > > > > > > > > > </attributes> > > > <symbols> > > > <set name="class" value="generic" /> > > > </symbols> > > > </component> > > > > > > > > > > > > > > > <component jsfid="panel" extends="panelGrid"> > > > > > > > > > <element jsfid="baseInputText" renderid="0" > > > > <attributes> > > > <set name="value" value="[EMAIL PROTECTED]"/> > > > </attributes> > > > <symbols> > > > <set name="class" value="blue" /> > > > </symbols> > > > </element> > > > > > > > > > <element jsfid="baseInputText" renderid="1" > > > > <attributes> > > > <set name="value" value="[EMAIL PROTECTED]"/> > > > </attributes> > > > <symbols> > > > <set name="class" value="green" /> > > > </symbols> > > > </element> > > > </component> > > > > > > > > > Elements form composition but also add inheritance similar to a java > inner > > > class. The new symbol replacement is sort of a tiles like feature > where you > > > can customize by overriding a symbol value. > > > PS: I'm on vacation this week and have limited Internet access. > > > > > > > > > > > Hermod > > > > > > > > > > Gary > > > > > > > > > > > -- > > "You can lead a horse to water but you cannot make it float on its > back." > > ~Dakota Jack~ > > > > > > > -- > Alexandre Poitras > Québec, Canada > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~