Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0029006Openbravo ERPA. Platformpublic2015-02-20 09:162017-05-29 17:43
guilleaer 
caristu 
normalminoralways
closedfixed 
5
 
3.0PR17Q3 
alostale
Core
No
0029006: Process Definition: Client side validation does not receive info about the pressed button
If you define several buttons in a process definition and a client side validation is defined, the developer will not be able to identify which button have been pressed inside the client side validation function.
1. Define a process definition
2. Add several buttons to the process definition following this guide [http://wiki.openbravo.com/wiki/How_to_create_a_Standard_Process_Definition#Adding_new_buttons [^]]
3. Define a client side validation function and put a breakpoint there
4. You will see that the information about pressed button is not received
Add the object _allProperties to this.

    allProperties._buttonValue = btnValue || 'DONE';

    allProperties._params = this.getContextInfo();

+ this.allProperties = allProperties;

    actionHandlerCall = function (me) {
      me.showProcessing(true);
      OB.RemoteCallManager.call(me.actionHandler, allProperties, {
        processId: me.processId,
        windowId: me.windowId
      }, function (rpcResponse, data, rpcRequest) {
        view.handleResponse(true, (data && data.message), (data && data.responseActions), (data && data.retryExecution), data);
      });
    };

    if (this.clientSideValidation) {
      this.clientSideValidation(this, actionHandlerCall);
    } else {
      actionHandlerCall(this);
    }
No tags attached.
Issue History
2015-02-20 09:16guilleaerNew Issue
2015-02-20 09:16guilleaerAssigned To => AugustoMauch
2015-02-20 09:16guilleaerModules => Core
2015-02-20 09:16guilleaerTriggers an Emergency Pack => No
2015-03-11 09:47alostalePrioritynormal => high
2015-03-11 09:47alostaleStatusnew => acknowledged
2015-03-17 14:37alostaleAssigned ToAugustoMauch => platform
2015-11-11 11:37alostalePriorityhigh => normal
2017-04-24 09:10caristuAssigned Toplatform => caristu
2017-04-24 09:10caristuStatusacknowledged => scheduled
2017-04-24 10:27hgbotCheckin
2017-04-24 10:27hgbotNote Added: 0096112
2017-04-24 10:27hgbotStatusscheduled => resolved
2017-04-24 10:27hgbotResolutionopen => fixed
2017-04-24 10:27hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/b4e2c3368a10644ad3a386bf5599a9c510aedbb4 [^]
2017-04-24 10:49caristuNote Added: 0096117
2017-04-24 10:55caristuReview Assigned To => alostale
2017-04-24 12:27alostaleNote Added: 0096128
2017-04-24 12:27alostaleStatusresolved => closed
2017-04-24 12:27alostaleFixed in Version => 3.0PR17Q3
2017-05-29 17:43hudsonbotCheckin
2017-05-29 17:43hudsonbotNote Added: 0096901

Notes
(0096112)
hgbot   
2017-04-24 10:27   
Repository: erp/devel/pi
Changeset: b4e2c3368a10644ad3a386bf5599a9c510aedbb4
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Mon Apr 24 10:25:52 2017 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/b4e2c3368a10644ad3a386bf5599a9c510aedbb4 [^]

fixes bug 29006: provide info of the pressed button in client side validations

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/process/ob-parameter-window-view.js
---
(0096117)
caristu   
2017-04-24 10:49   
Updated wiki page: http://wiki.openbravo.com/wiki/How_to_create_a_Standard_Process_Definition#Invoking_a_client_side_validation_before_calling_the_action_handler [^]
(0096128)
alostale   
2017-04-24 12:27   
code reviewed + tested
(0096901)
hudsonbot   
2017-05-29 17:43   
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/1ee70113bdc4 [^]
Maturity status: Test