This is a brainstorming page about the configuration possibilities of the toolbar. We (Thomas Bayen and Dirk Niemeyer and... hopefully YOU) want to extend it and use this page to collect our thoughts. See http://jira.idempiere.com/browse/IDEMPIERE-234
What do we want?
- standard toolbar with most windows should work as before
- omit standard buttons for specific windows and/or tabs (embedded tabs have their own toolbar!)
- Window Toolbar is used with more than one Tab (but every tab may have its own de-/activate configuration)
- deactivate (e.g. standard) buttons for specific windows and tabs
- activation/deactivation with every tab-switch?!?
- Plan A) Whether a single button is active or not (greyed-out) is either set by a boolean field entry in the configuration or set by a callout (referenced in the configuration) that is called after each field change in the record (like e.g. for the "Save" button).
- Plan B) Whether a single button is active or not (greyed-out) is set by a formula-field. It may contain "true", "false" or a formula with a "@field@". If you want to do more complicated things you may set this field via a callout.
- There are buutons that are activated based on state of the record and others that are not related to the record. We need a way to get the activation status for the latter
- special buttons for specific Windows
- Is a special button bound to a table's column (old behaviour) or to a window or to a tab?!?
- up to now special buttons are bound to table columns (and in ADempiere Multiple Record Action Field too). There have to be columns without a reason. This seems stupid to me.
- How do we get Icons? (from database or from classpath - both should be possible)
- restrictions per user/group
- Buttons may belong to a single record (like the old behaviour buttons inside the form) or to the whole list of buttons
- Some buttons may be de-/activated dynamically (e.g. dependent from an active record's field)
- More than one Toolbar to sort buttons for different purposes and different scopes (functions for one record, for the whole list or global functions) and to add them on different places (top of Window, top of Tab, bottom of Tab, left or right, etc.)
Which questions are open?
- Where are buttons created?
- we should look at
APanel, jbInit(), updateToolBarAndMenuWithRestriction() (called from stateChanged())
- we should look at
- How do we configure it? A new table structure?
- Which buttons do we have?
- Is this button active?
- We need the possibility to call a java function here
- We need a possibility to update this when a field changes (call the function for every change?!?) (It is like the well-known "Save" button)
- What happens if you press the button?
- Calls a java process?
- What is the Environment of this process?
- A Process has no information about the GUI state. We may need this (which records are shown, which are selected?)
- What parts of toolbars are hardcoded? What is the table AD_ToolbarButton for?
- Should we avoid to have redundant entries in our new AD table for every new window and tab?
- We could work with "standard entries" with 0 as the tab/window-ID. Then we need a possibility to deactivate this entry by a kind of overloading.
- How does this connect to http://jira.idempiere.com/browse/IDEMPIERE-129 (Restrictions on Toolbar and Menu)?
- Which hero wants to implement this for the web interface?