Re: Static Skins in prototype

Joshua Paine <[email protected]> Tue, 24 Jul 2007 00:23:03 -0400
Newsgroups gmane.comp.java.helma.general
Message-ID <[email protected]>
Maksim Lin for technical support mailling lists wrote:
> The design pattern I have come up with is of always defining a _children
> for every prototype which is a collection of all the prototypes objects.
> 
> myProto/type.properties
> 
> _children = collection(myProto)
> ----
> 
> Root/type.properties
> 
> myprotos = mountPoint(myProto)

This is pretty good. *sigh* Looks like I can redo my user functionality 
*again*.

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:

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?

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?

-Joshua