Re: Static Skins in prototype
"Maksim Lin for technical support mailling lists" <[email protected]> Tue, 24 Jul 2007 14:44:57 +1000
| Newsgroups | gmane.comp.java.helma.general |
|---|---|
| Message-ID | <[email protected]> |
Hi Joshua, > Only problem I see is that if we have /myprotos/add, that > means that /myprotos/name_of_some_child/add will be defined > as well, where it doesn't make any sense. Unless add.hac opens with: yep - I've just been living with that side effect. > if(this._parent && this._parent.prototype==this.prototype) > res.redirect(this._parent.href(req.action)); > > But I sure do dislike boilerplate. Or did you already have a > solution in mind for this? Hah! that is good! I dislike work arounds too, but thats a pretty elegant soluation in just 2 lines of code, thanks! > Also, how does this help with scaffolding? You can define > these things generically on hopobject, but you'd still have > to make a skin with the form for each action of each prototype, right? Well as long as we can have a way of accessing the list of properties of a Prototype and their data types (ie. my last email requesting an api for just such a thing :-) then its pretty straight forward to write "scaffolding" skins for HopObject which can render a generic html form for any specific prototype. And then you can always override these skins in any Prototypes where you wanted something more customised. You could even have the situation of having a custom skin but still using the generic actions in HopObject or vice-versa. Maks.