Basic ScaffoldingWhile I prefer Helma over RubyOnRails, I have been influenced by reading about Rails and the convenience of their scaffolding system. The conventions are:
Create mountpoints for each Prototype you want to access directly
Ensure there is a skin named itemList available for each prototype in order to render each HopObject item in the list skin. and HopObject/skins/editDelete.skin has something like:
Then copy the action files (.hac file attachments at the bottom of this page), actions, HopObject.js and skins into your apps HopObject folder. You can now use the default create, list, etc. actions with urls like: http://localhost:8080/myapp/users/create While I have generic create.skin, edit.skin, etc. in HopObject, if you put a more customised one in any of your prototypes it will "override" my generic ones in the HopObject prototype. Likewise you can create your own edit function that will be called instead of the generic one in HopObject. 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:
Pages linking to this page: maks |
navigation
Download
Community
Weblog
Mailing Lists
IRC Channel
Documentation
Introductions
Tools
Reference
Project
Roadmap
Bug Reporting
Source
Wiki
Tags
Updates
Related Projects
Sites using Helma
Shop
search
all tags
Tagsapps (1) bugs (2) class (1) community (2) compatibility (1) concurrency (1) continuations (2) Documentation (4) Documentation ORM (1) dogfood (1) formatting (1) gobi (1) helma (6) helma 1.6 (13) helma 1.7 (8) helma 2 (13) helma ng (7) hopobject (1) html (1) inheritance (5) introspection (1) java (2) javascript (5) jetty (1) JSDoc (1) lazy (1) marius person (1) metaprogramming (2) modules (3) oop (1) organization (2) ORM (1) parsing (1) project (2) projects (1) prototype (1) Rabbit (2) REPL (1) rhino (4) roadmap (3) shell (1) shop (0) Skin Rendering (5) Snippets (1) source svn (1) sugar (3) templates (13) testing (4) Tobi (7) tobi repl shell introspection (0) xml (1) Pages linking to this page: Wiki Overview Text Draft pages linking here
|
Comments
#1 by tree at 2007/12/12 07:43where are the "provided" js files?
#2 by maks at 2008/01/25 00:35sorry, I was referring to the .hac files attached to this page. I've edited the text to hopefully make that clear now.