Helma Logo
main list history
previous version  overview  next version

Version 5 by maks on 25. January 2008, 05:32

While I prefer Helma over RubyOnRailRubyOnRails, I have been influenced by reading up about Rails and the convenience of their scaffolding system.
So I've created a basic work-alike system (but not a straight port!) using actions/skins for HopObject that depends on following some coding conventions.

The conventions are:
* ==== Ensure each Prototype defines a _children collection of its own type:type====

  _children = collection(User)

* ==== Create mountpoints for each Prototype you want to access directly: directly ====

  users = mountPoint(User)

* ==== copy the provided hop action files (.hac file attachement at the bottom of this page), actions and skins into your HopObject prototype folder

You can now use the default create, list list, etc actions with urls like:


While I have generic create.skin, edit.skin, etc etc. in HopObject, if you can just put a more customised one in any of your prototypesprototypes it will "override" my generic ones in the HopObject prototype.

Note: I expect that there is a skin named itemList available for each prototype in order to render each HopObject item in the list skin.

Likewise the generic processForm() in HopObject that is called by create.hac and edit.hac can be over-ridden by a custom one if you need to do special processing on form data for any particular prototype and finally you can of course create custom create,edit,list, delete actions in each prototype to completely change this default processing.

Note: make sure you add the jala.ListRender.js as one of your applications repositories, eg:

  myapp.repository.2 = modules/jala/code/ListRenderer.js

<% this.attachments %>