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~