Projects:Select Tab for Direct Link/Technical Specifications
Contents |
Select Tab for Direct Link - Technical Specifications
Implementation
org.openbravo.erpCommon.utility.ReferencedLink is the java class that handles direct link navigation. Here is where the logic to decide the tab to navigate to must be implemented.
Instead of the current definition that includes one window for purchase and another one to sales transactions, the tab where the navigation is done to must be decided taking into account the where clause in the tab.
Closed discussion items
Possible approaches
Those windows that shouldn't behave in the current way must be defined in other way, two possible approaches can be taken, so it is necessary to decide one or another before starting with any implementation.
No window definition
A possible approach is not to define any window for this kind of tables.
Pros
This is the easiest approach, it would require to implement the where clause logic regarding the current record to decide the window to navigate to in a similar manner that linked items does.
Cons
It is possible a record fits more than one where clause.
Multiple window definition
Another different approach is not to define only two windows for a table but a number of them, setting for each one the constraints the record must fulfill.
Pros
If it is correctly defined it there should not be more than one possible tab for a single record.
Cons
- It is more difficult to properly set: while the other approach does not require any configuration, this one requires to manually set the tabs and conditions.
- It is harder to maintain: where clause for tabs should be maintained in both places (tab itself and in this new element).
- It is more difficult to implement: this approach requires to add a new application table to maintain this information.
Resolution
First approach is the best one, anyway it would be nice in case this approach covers all the exception currently are treated so they can be managed all them in a standard manner.