Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||||||
ID | ||||||||||||
0021688 | ||||||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||||||
design defect | [Openbravo ERP] A. Platform | minor | always | 2012-09-19 13:34 | 2012-09-19 15:20 | |||||||
Reporter | dbaz | View Status | public | |||||||||
Assigned To | AugustoMauch | |||||||||||
Priority | high | Resolution | open | Fixed in Version | ||||||||
Status | new | Fix in branch | Fixed in SCM revision | |||||||||
Projection | none | ETA | none | Target Version | ||||||||
OS | Any | Database | Any | Java version | ||||||||
OS Version | Database version | Ant version | ||||||||||
Product Version | SCM revision | |||||||||||
Review Assigned To | ||||||||||||
Web browser | ||||||||||||
Modules | Core | |||||||||||
Regression level | ||||||||||||
Regression date | ||||||||||||
Regression introduced in release | ||||||||||||
Regression introduced by commit | ||||||||||||
Triggers an Emergency Pack | No | |||||||||||
Summary | 0021688: Access to backend ID from the frontend (javascript) | |||||||||||
Description | Here: https://code.openbravo.com/erp/devel/pi/file/35a4bff5296e/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form.js#l1890 [^] There is a reference to a SimpleType (_id_13) that is returned from the backend via: isc.SimpleType.create({inheritsFrom:'text',name:'_id_13',editorType:'OBTextItem',gridEditorType:'OBTextItem',filterEditorType:'OBTextItem',referenceName:'ID'} this is code generated in smartclient_types_js.ftl | |||||||||||
Steps To Reproduce | See Description | |||||||||||
Proposed Solution | Create something like: OB.Constants.References = { ID: { id: '13', name: '_id_13' } }; (This object could have all references inside, but I think just with the ID one is enough, at least for now) where this '_id_13' will be returned from the server in a ftl. Then in the code, change isID: function (item) { return item.type === '_id_13'; } by isID: function (item) { return item.type === OB.Constants.References.ID.name; } | |||||||||||
Tags | No tags attached. | |||||||||||
Attached Files | ||||||||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | ||||||||
|
Notes | |
(0052225) dbaz (developer) 2012-09-19 13:38 |
A second proposed solution is change the generated "isc.SimpleType.create" creation for each type, in just an array like OB.Constants.References = { ID: { inheritsFrom:'text', name:'_id_13', editorType:'OBTextItem', gridEditorType:'OBTextItem', filterEditorType:'OBTextItem', referenceName:'ID' }, .... }; and of course, include in "OB.Constants.References" all the references information. Then, in another place (out of the ftl), use this generated OB.Constants.References to build the isc.SimpleType |
Issue History | |||
Date Modified | Username | Field | Change |
2012-09-19 13:34 | dbaz | New Issue | |
2012-09-19 13:34 | dbaz | Assigned To | => AugustoMauch |
2012-09-19 13:34 | dbaz | Modules | => Core |
2012-09-19 13:38 | dbaz | Note Added: 0052225 | |
2012-09-19 15:20 | dbaz | Relationship added | related to 0021657 |
Copyright © 2000 - 2009 MantisBT Group |