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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0021688
TypeCategorySeverityReproducibilityDate SubmittedLast Update
design defect[Openbravo ERP] A. Platformminoralways2012-09-19 13:342012-09-19 15:20
ReporterdbazView Statuspublic 
Assigned ToAugustoMauch 
PriorityhighResolutionopenFixed in Version
StatusnewFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned To
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0021688: Access to backend ID from the frontend (javascript)

DescriptionHere:

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 ReproduceSee Description
Proposed SolutionCreate 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;
}

TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 00216573.0MP16 closedAugustoMauch The windows were the id field is checked as show in grid does not work 

-  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
Powered by Mantis Bugtracker