Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0029782
TypeCategorySeverityReproducibilityDate SubmittedLast Update
feature request[Openbravo ERP] A. PlatformminorN/A2015-05-05 16:522015-05-15 09:22
ReportergorkaionView Statuspublic 
Assigned Togorkaion 
PrioritynormalResolutionfixedFixed in Version3.0PR15Q3
StatusclosedFix in branchFixed in SCM revisiond3e797b23239
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product Version3.0PR14Q2.6SCM revision 
Review Assigned Toalostale
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0029782: Hooks needed on some processes to be used by modules

DescriptionThere are some application flows that should have hooks so modules can extend them to add new functionality. These flows are:

* WindowsSettingsActionHandler: This action handler is in charge of computing different window settings that are calculated based on the user and role. Among these settings there are the "Read Only Logic" based on role, the autosave preference or the window personalization. A hook is needed to be able to implement other module specific settings. This hook should have a Java part to be run in the server and a JavaScript part to be executed in the client.

* DefaultJsonDataService: The datasource in charge on load, update, delete or insert the records edited in the client already have some "pre" and "post" actions that are executed on each call. It should be possible for modules to add additional actions to validate or modify the data that it is being processed.

* FormInitializationComponent: This class initializes the form used to edit a record in the application. It computes all the callouts, auxiliary inputs, session attributes... and returns all the needed information to display the form data in the client. It should be possible for modules to modify the data that it is send to the client.
Steps To ReproduceN/A
Proposed SolutionAdd a hook on each flow:

WindowsSettingsActionHandler:
* hook to perform validations and to add extra settings to the return object
* hook in the callback function to be able to call additional module's JavaScript functions.
DefaultJsonDataService:
* hook to be executed after the preActions. Currently the preactions are not centralized on a single method. It needs a small refactor to create a generic preAction where it is included the hook.
* hook to be executed after the postActions.
FormInitializationComponent:
* hook at the end of the main method just before the response JSONObject is computed.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to feature request 00310073.0PR16Q1 closedalostale Openbravo ERP FICExtension can't display messages on EDIT 
related to defect 00313713.0PR15Q3 closedalostale Openbravo ERP API change: DefaultJsonDataService can't be instantiated with new 
causes defect 0031358 closedalostale Modules Resource Reservation widget is not working in 3.0PR15Q3, it blocks the application 

-  Notes
(0077083)
gorkaion (developer)
2015-05-07 11:10

Documentation:

http://wiki.openbravo.com/wiki/How_To_Implement_ExtraWindowSettingsInjector_Hook [^]
http://wiki.openbravo.com/wiki/How_To_Implement_JsonDataServiceExtraActions_Hook [^]
http://wiki.openbravo.com/wiki/How_To_Implement_FICExtension_Hook [^]
(0077084)
hgbot (developer)
2015-05-07 11:21

Repository: erp/devel/pi
Changeset: d3e797b23239b892edc7b2140f69b7557632936f
Author: Gorka Ion Damián <gorkaion.damian <at> openbravo.com>
Date: Tue May 05 17:10:17 2015 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/d3e797b23239b892edc7b2140f69b7557632936f [^]

Fixed issue 29782. Added needed hooks.

WindowSettingsActionHandler:
- Add a java hook and the possibility to include javascript functions to be
  executed by the callback.
FormInitializationComponent:
- Add a java hook just before the creation of the response JSONObject.
DefaultJsonDataService:
- Add 2 java hook to be executed after the pre actions and the post actions.

---
M modules/org.openbravo.client.application/src/org/openbravo/client/application/WindowSettingsActionHandler.java
M modules/org.openbravo.client.application/src/org/openbravo/client/application/window/FormInitializationComponent.java
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-window.js
M modules/org.openbravo.service.json/src/org/openbravo/service/json/DefaultJsonDataService.java
A modules/org.openbravo.client.application/src/org/openbravo/client/application/ExtraSettingsInjector.java
A modules/org.openbravo.client.application/src/org/openbravo/client/application/window/FICExtension.java
A modules/org.openbravo.service.json/src/org/openbravo/service/json/JsonDataServiceExtraActions.java
---
(0077246)
hudsonbot (developer)
2015-05-08 15:39

A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/d5cb256a6a8a [^]
Maturity status: Test
(0077476)
alostale (manager)
2015-05-15 09:22

code reviewed + tested

- Issue History
Date Modified Username Field Change
2015-05-05 16:52 gorkaion New Issue
2015-05-05 16:52 gorkaion Assigned To => gorkaion
2015-05-05 16:52 gorkaion Modules => Core
2015-05-05 16:52 gorkaion Triggers an Emergency Pack => No
2015-05-07 11:10 gorkaion Note Added: 0077083
2015-05-07 11:11 gorkaion Status new => scheduled
2015-05-07 11:12 gorkaion Status scheduled => resolved
2015-05-07 11:12 gorkaion Fixed in SCM revision => https://code.openbravo.com/erp/devel/pi/rev/fd2ea337257b [^]
2015-05-07 11:12 gorkaion Resolution open => fixed
2015-05-07 11:13 gorkaion Review Assigned To => alostale
2015-05-07 11:21 hgbot Checkin
2015-05-07 11:21 hgbot Note Added: 0077084
2015-05-07 11:21 hgbot Fixed in SCM revision https://code.openbravo.com/erp/devel/pi/rev/fd2ea337257b [^] => http://code.openbravo.com/erp/devel/pi/rev/d3e797b23239b892edc7b2140f69b7557632936f [^]
2015-05-08 15:39 hudsonbot Checkin
2015-05-08 15:39 hudsonbot Note Added: 0077246
2015-05-15 09:22 alostale Note Added: 0077476
2015-05-15 09:22 alostale Status resolved => closed
2015-05-15 09:22 alostale Fixed in Version => 3.0PR15Q3
2015-10-01 14:43 alostale Relationship added related to 0031007
2015-11-05 09:08 alostale Relationship added causes 0031358
2015-11-05 12:08 alostale Relationship added related to 0031371


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker