From: <anj...@t-...> - 2003-09-02 03:24:13
|
All, Gee, I hope I didn't break too much stuff:) And Max, you probably want to bump the version number a bit... As the templates in ERDirectToWeb are not exactly recommended anyway (one should use ERNeutralLook or ones own look instead) I took them as my personal playground: - so I added a notion of a "Repetition", which breaks out the most complex part of all pages into separate components - and I also added "ActionButtons", which are stateless components that can live in such a repetition. - added a "ERDDeleteButton" and a "ERDSelectButton" to have consitent naming and functionality. - the list repetition now has a left and right side of arrays of action buttons. Those list pages look just like normal list pages but are *much* easier to handle for those who don't use the rather confusing "isDeletable, isEditable, readOnly, isReadOnly" keys. - the query all page is now a member of ERD2W, with the ability to be grouped into sections of entities. - the query all page can be called by the rules and the entity is now set correctly ("*all*") by default - the list and query page repetition now can also have sections. they appear above the normal display keys and group them together. - I renamed "headComponentName" to "headerComponentName", added "footerComponentName". Both default to "ERXEmptyComponent" Not all features are totally tested or even finished (the "footerComponent" is missing from all templates), but it should give you an idea of what I want. And I *will* test them in the course of the next weeks. ================================================================== HOWTO Repetition: As there is much duplication in the HTML "code" in all the *Inspect, *List and *Query pages, I broke out the repetition to another component so it can stay consistent across all templates. There is a "repetitionComponentName" in the rules now, which defaults to the corresponding "ERDXXXPageRepetition" components. Repetitions *should* be non-synching, so arbitrary values can be set from the pages...names of enclosing tables come into mind (fixing the Grouping pages anyone?). ================================================================== HOWTO ActionButtons: Add a rule like pageConfiguration = "ListFoo" => actions = (("editAction", "printAction"),("deleteAction")) There are default rules and an assignment that evaluate the previous isEntityDeletable, isEntityEditable, readOnly and isEntityPrintable keys. The "select" handling is currently a bit of a hack - I loop the parents until I reach a ERD2WListPage and then call selectObjectAction() on this component - but there are a few other solutions if this one should not suffice. To add your own button, subclass "ERDActionButton" and pull "object", "displayGroup" or "dataSource" and do something with it. Buttons *must* be non-synching and stateless, so arbitrary values can be set from the pages. ================================================================== HOWTO QueryAll page: Add a rule like pageConfiguration = "QueryAllStaffInfo" => displayPropertyKeys = ("(People)", Employee, Freelancer, "(Other)", Prospect, ... ) Every "key" should be an entity name, every "(Key)" a divider name. ================================================================== None of these changes should actually impact existing (well-behaving) apps beyond a recompile. If they do, please tell me about it. However, all of these changes remind me that we *need* tests! I don't see myself clicking through the app for the ump-tenth time... Have fun and comments are welcome - as always:) Cheers, Anjo PS: Am I missing something or is the ERNEUGroupingListPage doing nothing special? |