RE: RE: BSelect and <input> elements of type radio and checkbox?
"Christian Cryder" <[email protected]>
| Newsgroups | gmane.comp.java.enhydra.barracuda.general |
|---|---|
| Message-ID | <[email protected]> |
Hi Diez, Your approach uses a naming convention on the directive, right? ie. rather than directives like: Get_Data.FooModel.SomeOption.1 Get_Data.FooModel.SomeOption.2 Get_Data.FooModel.SomeOption.3 ... you'd have something like: Get_Data.FooModel.SomeOption1 Get_Data.FooModel.SomeOption2 Get_Data.FooModel.SomeOption3 ... Is that correct? I didn't mention this approach in my email, but it works just as well, although it does require some manual interpretation of the directive name (to extract the 1, 2, 3, etc). We ended up not going this route only because we felt it was a bit cleaner to use the data value portion of the directive, but they are really fundamentally the same approaches. Unless I completely misrepresented your form-repopulateion stuff (which is possible ;-) Christian ---------------------------------------------- Christian Cryder Internet Architect, ATMReports.com Project Chair, BarracudaMVC - http://barracudamvc.org ---------------------------------------------- "Coffee? I could quit anytime, just not today" > -----Original Message----- > From: [email protected] > [mailto:[email protected]]On Behalf Of Diez B. Roggisch > Sent: Wednesday, June 18, 2003 2:51 PM > To: [email protected] > Subject: Re: [Barracuda] RE: BSelect and <input> elements of type radio > and checkbox? > > > Hi, > > maybe I'm missing something here - but actually everything you > need is already > there. Look at my form-repopulation-example. It should even be > possible to > either render a select or checkbox/radiobutton group, putting the > decision to > the designer. > > The only inconvenience is that for every list-driven component, > you have to > manually add the resulting child model to the BTemplate. > > I once thought of introducing an interface called > ChildModelContainer (anybody > a better name?). > > public interface ChildModelContainer { > > public List getChildModels(); > } > > If a BTemplate.addModel() encounters a ChildModelContainer > implementing model, > it recursively adds the child-models to itself. > > Then things should work perfecly. > > Diez > > _______________________________________________ > Barracuda mailing list > [email protected] > http://barracudamvc.org/lists/listinfo/barracuda