> That's pretty slick. I'll have to give shale a closer look sometime. >
That would be great! I'd like to hear your thoughts on it. Maybe you could give me a vote? <:-) > > On Fri, 04 Mar 2005 18:32:13 +0000, [EMAIL PROTECTED] > <[EMAIL PROTECTED]> wrote: > > > We're not actually using the MyFaces configurator to read the elements > > > from the file. I don't think the MyFaces configurator even reads > > > them. I wrote my own digester to parse just those files. I'm just > > > using the existing elements so I dont' have to write my own DTD. > > > > > .. > > .. > > > > > That way, you can just write <h:panelGrid />, but the HtmlPanelGrid > > > > > that is returned has its columns attribute set to 1. This way, you > > > > > don't explicitly have to define the columns attribute, and we quit > > > > > getting those warnings about it being undefined. > > > > > > > > > This sounds like a similar solution proposed in Shale. > > > > http://issues.apache.org/bugzilla/show_bug.cgi?id=33752 > > > > A single subview tag is used to add to the existing component tree. The > subview is defined in XML configuration files. These files hold reusable > compositions of view metadata used to construct the sub component tree. The > XML > structure provides a way to define a complex component, say an address, and > have > the ability to extend and override or add additional components. > > > > <sh:xsubview id="agentAddress" elementId="agentAddressForm" /> > > > > Another example is a data table that defines columns for first and last > > name. > This component definition is extended adding an ssn and a birthdate. > > > > <displayElement elementId="personsTable" extends="dataTable"> > > <attributes> > > <set name="value" useValueLateBinding="true" > value="#{managed-bean-name.persons}"/> > > <set name="var" value="e"/> > > <set name="rows" value="5"/> > > <set name="first" value="1"/> > > </attributes> > > > > <element renderId="1" elementId="firstNameColumn"/> > > <element renderId="2" elementId="lastNameColumn"/> > > > > </displayElement> > > > > <displayElement elementId="personsTableEx" extends="personsTable"> > > <element renderId="0" elementId="ssnColumn"/> > > <element renderId="0" elementId="birthDateColumn"/> > > </displayElement> > > > > <sh:xsubview id="personsTableEx" elementId="personsTableEx" /> > > > > Another feature is that there is a substitution of the expression language > when constructing the components. This allows a view fragment to be bound to > more than one logical managed bean. For example, in the dataTable defined > above, #{managed-bean-name.persons} might be substitued with > #{personsTableEx.persons}. The substitued name would be defined by the > suviews > id attribute. > > > > Gary > > > > > > > -- > -Heath Borders-Wing > [EMAIL PROTECTED]