> Proposal: scaffold pages
There was a feature request issue exactly for this type of functionality
(but even better - the Django style way)
https://issues.apache.org/jira/browse/CLK-387
(but if was closed)
You could request it's reopening, and also vote for it.
If you still want/need the Rails style of scaffolding, and are using
Cayenne for persistence, than it's possible to make your own Cayenne
Modeler templates, that will e.g. generate for each Entity: the code you
desire. See in Cayenne Modeler -> Preferences -> Templates -> Add
Template (you can take a look at the actual velocity templates used by
Cayenne to generate the entity java code - and in the same manner to
generate your extra code).
Adrian.
Very often, especially in the admin/configuration area ( and on the
beginning of application development) , i use simple schema:
1. Defined page template
2. Simple view ( for form, table, or for streaming)
For form content is only : $form, table:: $table, streaming: empty page
My proposal is a creating a mechanism which allows the generation of
default view , wrapped in page template.
So that 'annotaded' page will correspond to the schema:
<package_name>.<PageName> -> page-name.htm
For example:
Streaming
@PageStream
public class FileShow extends PageTemplate { // when the page is empty
Form
@PageForm
public class EntryEdit extends PageTemplate { // for page with just $form tag
Table
@PageTable(path="custom-path.htm")
public class EntryList extends PageTemplate { // for $table tag
Unfortunately i have not followed the order of setup application and I
don't know if it is possible, but it should simplify solution
Best regards,
Tomasz