Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0018632Openbravo ERPA. Platformpublic2011-09-28 00:032011-10-12 01:59
alostale 
alostale 
normaltrivialN/A
closedfixed 
5
 
3.0MP4 
Core
No
0018632: Allow module customizations in TabAttachments
A way of customizing TabAttachments java file is creating a class extending it, overwriting doPost method, implement in the subclass the required commands and call super.doPost for the rest.

The problem is the request is multipart. The way parameters are read for multipart request differ of the way standard request paramenters are read, making not possible to read the instantiate var twice.
Try this code in TabAttachemnts:

   final VariablesSecureApp vars = new VariablesSecureApp(request);
   final VariablesSecureApp vars1 = new VariablesSecureApp(request);
 
   vars.getCommand(); //-> SAVE_NEW_OB3
   vars1.getCommand(); //-> DEFUALT

Note getCommand in vars and vars1 returns different values for the same request whereas it should be the same.

This seems to be a core servlet restriction.
Refactor TabAttachments so doPost method instantiates vars and there's another public method accepting this vars where all logic is performed. In this way it is possible to reuse the vars instantiated in the subclass.
No tags attached.
Issue History
2011-09-28 00:03alostaleNew Issue
2011-09-28 00:03alostaleAssigned To => alostale
2011-09-28 00:03alostaleModules => Core
2011-09-28 00:06hgbotCheckin
2011-09-28 00:06hgbotNote Added: 0041331
2011-09-28 00:06hgbotStatusnew => resolved
2011-09-28 00:06hgbotResolutionopen => fixed
2011-09-28 00:06hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/42c1ec2c8b72c86434a5b0e59c3f2cda94ea7d23 [^]
2011-09-30 12:50marvintmStatusresolved => closed
2011-10-12 01:59hudsonbotCheckin
2011-10-12 01:59hudsonbotNote Added: 0041717

Notes
(0041331)
hgbot   
2011-09-28 00:06   
Repository: erp/devel/pi
Changeset: 42c1ec2c8b72c86434a5b0e59c3f2cda94ea7d23
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Tue Sep 27 18:05:41 2011 -0400
URL: http://code.openbravo.com/erp/devel/pi/rev/42c1ec2c8b72c86434a5b0e59c3f2cda94ea7d23 [^]

fixed issue 18632: Allow module customizations in TabAttachments

---
M src/org/openbravo/erpCommon/businessUtility/TabAttachments.java
---
(0041717)
hudsonbot   
2011-10-12 01:59   
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/9bd2b5c2d982 [^]

Maturity status: Test