Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0014195Openbravo ERPZ. Otherspublic2010-08-16 10:592010-12-09 16:04
networkb 
mtaal 
urgentmajoralways
closedfixed 
5
2.50 
 
OBPS
User Interface Selector
No
0014195: If the selector is associated with a key column the behaviour is not properly
I.E. We select the column C_Bpartner_ID. Reference: OBUISEL_Selector Reference
Reference Search Key: Business Partner Selector.

'Used as Record Identifier' checked.

we select a BP in the new selector, when we save the record and go to lines. The field 'Sales order' is wrong it should be appear the name of te BP instead of the ID.
- AS System Administrator go to Application Dictionary || Tables and Columns
- Select c_order and c_bpartner_id
-Reference: OBUISEL_Selector Reference
-Reference Search Key: Business Partner Selector.

- Compile and restart tomcat.
- Go to Sales Management || Transactions || Sales Order
- Select a BP in the new selector and save the record
- Go to Lines
- Realize that the field 'Sales Order' is 70003 - 01-04-2006 - 1000009 - 43.85
No tags attached.
blocks feature request 0014151 closed mtaal UI Selector issues 
Issue History
2010-08-16 10:59networkbNew Issue
2010-08-16 10:59networkbAssigned To => mtaal
2010-08-16 10:59networkbOBNetwork customer => Yes
2010-08-16 11:01mtaalNote Added: 0029995
2010-08-16 11:01mtaalStatusnew => feedback
2010-08-16 14:03networkbNote Added: 0030018
2010-08-16 14:03networkbStatusfeedback => new
2010-08-16 14:03networkbDescription Updatedbug_revision_view_page.php?rev_id=686#r686
2010-08-16 14:03networkbSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=688#r688
2010-08-16 14:48mtaalNote Added: 0030021
2010-08-20 10:59mtaalNote Added: 0030175
2010-08-23 16:16mtaalRelationship addedblocks 0014151
2010-08-27 09:52mtaalStatusnew => scheduled
2010-08-27 09:52mtaalNote Added: 0030390
2010-08-27 09:52mtaalfix_in_branch => pi
2010-08-27 09:52mtaalNote Added: 0030391
2010-08-27 09:52mtaalStatusscheduled => resolved
2010-08-27 09:52mtaalResolutionopen => fixed
2010-08-27 09:53mtaalNote Added: 0030392
2010-09-01 12:00iperdomoStatusresolved => new
2010-09-01 12:00iperdomoResolutionfixed => open
2010-09-01 12:01iperdomoStatusnew => scheduled
2010-09-03 10:18mtaalNote Added: 0030588
2010-09-03 10:18mtaalStatusscheduled => resolved
2010-09-03 10:18mtaalResolutionopen => fixed
2010-09-03 10:18mtaalNote Added: 0030589
2010-09-03 10:18mtaalStatusresolved => closed
2010-12-09 16:04anonymoussf_bug_id0 => 3133364

Notes
(0029995)
mtaal   
2010-08-16 11:01   
To understand, for the c_order_id column you select the business partner selector?

If this is the case then this is incorrect, the business partner selector should be used for columns refering to the business partner table.

gr. Martin
(0030018)
networkb   
2010-08-16 14:03   
The summary, description and the steps to reproduce updated.

Sorry for the inconvenience.
(0030021)
mtaal   
2010-08-16 14:48   
Some additional info for the developer who will look at this:
- this seems to occur when the column (with the selector reference) is used as an identifier
- the code being called is in the SelectorUIReference.SelectorUIReference method
- to try to reproduce, install the selector example module and create a child table of the selector example, flag some of the selector columns (of the SelectorExample table) as being part of the identifier and check how the identifier is shown in the child window (which also needs to be created).
(0030175)
mtaal   
2010-08-20 10:59   
A related issue is that a NumberFormatException occurs when a combobox is created which refers to a table which has a selector reference as part of the identifier.

The following methods need to be checked:
ComboTableData.identifier
ComboTableData.setValidation
setReferenceType
setObjectReference
formatField

Basically every place in the ComboTableData class where Integer.valueOf(...) is done.

Integer.parseInt(String, int) line: 481
Integer.valueOf(String) line: 570
ComboTableData.identifier(String, FieldProvider) line: 988
ComboTableData.setTableDirQuery(String, String, String) line: 819
ComboTableData.identifier(String, FieldProvider) line: 998
ComboTableData.generateSQL() line: 645
ComboTableData.<init>(VariablesSecureApp, ConnectionProvider, String, String, String, String, String, String, int) line: 130
DefinedSelector10153E4B83EC4A5E8C558FCE74071FB0.printPageEdit(HttpServletResponse, HttpServletRequest, VariablesSecureApp, boolean, String, String, TableSQLData) line: 854
DefinedSelector10153E4B83EC4A5E8C558FCE74071FB0.doPost(HttpServletRequest, HttpServletResponse) line: 202
DefinedSelector10153E4B83EC4A5E8C558FCE74071FB0(HttpServlet).service(HttpServletRequest, HttpServletResponse) line: 637
DefinedSelector10153E4B83EC4A5E8C558FCE74071FB0(HttpBaseServlet).serviceInitialized(HttpServletRequest, HttpServletResponse) line: 225
DefinedSelector10153E4B83EC4A5E8C558FCE74071FB0(HttpSecureAppServlet).service(HttpServletRequest, HttpServletResponse) line: 434
DefinedSelector10153E4B83EC4A5E8C558FCE74071FB0(HttpServlet).service(ServletRequest, ServletResponse) line: 717
ApplicationFilterChain.internalDoFilter(ServletRequest, ServletResponse) line: 290
ApplicationFilterChain.doFilter(ServletRequest, ServletResponse) line: 206
SessionExpirationFilter.doFilter(ServletRequest, ServletResponse, FilterChain) line: 66
ApplicationFilterChain.internalDoFilter(ServletRequest, ServletResponse) line: 235
ApplicationFilterChain.doFilter(ServletRequest, ServletResponse) line: 206
CharsetFilter.doFilter(ServletRequest, ServletResponse, FilterChain) line: 35
ApplicationFilterChain.internalDoFilter(ServletRequest, ServletResponse) line: 235
ApplicationFilterChain.doFilter(ServletRequest, ServletResponse) line: 206
DalRequestFilter$1.doAction() line: 81
DalRequestFilter$1(ThreadHandler).run() line: 46
DalRequestFilter.doFilter(ServletRequest, ServletResponse, FilterChain) line: 101
ApplicationFilterChain.internalDoFilter(ServletRequest, ServletResponse) line: 235
ApplicationFilterChain.doFilter(ServletRequest, ServletResponse) line: 206
StandardWrapperValve.invoke(Request, Response) line: 233
StandardContextValve.invoke(Request, Response) line: 191
StandardHostValve.invoke(Request, Response) line: 127
ErrorReportValve.invoke(Request, Response) line: 102
StandardEngineValve.invoke(Request, Response) line: 109
CoyoteAdapter.service(Request, Response) line: 298
Http11Processor.process(Socket) line: 852
Http11Protocol$Http11ConnectionHandler.process(Socket) line: 588
JIoEndpoint$Worker.run() line: 489
Thread.run() line: 636
(0030390)
mtaal   
2010-08-27 09:52   
Scheduled
(0030391)
mtaal   
2010-08-27 09:52   
Repository: erp/mods/org.openbravo.userinterface.selector
Changeset: 24589eceba53b3248f156a29f32911b8065bd413
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Fri Aug 27 09:48:41 2010 +0200
URL: http://code.openbravo.com/erp/mods/org.openbravo.userinterface.selector/rev/24589eceba53b3248f156a29f32911b8065bd413 [^] [^]

Related to issue 14255: New references cannot be used as record identifier, Related to issue 13767: Wad-Window,grid-view display of parent link field behaves different with new selectors compared to old ones

---
M src-wad/org/openbravo/userinterface/selector/wad/WADSelector.java
M src-wad/org/openbravo/userinterface/selector/wad/WADSelectorData.xsql
M src-wad/org/openbravo/userinterface/selector/wad/WADSelectorPrimitive.java
(0030392)
mtaal   
2010-08-27 09:53   
See also the changesets of issue:
https://issues.openbravo.com/view.php?id=14255 [^]
(0030588)
mtaal   
2010-09-03 10:18   
Resolved as part of 14255
(0030589)
mtaal   
2010-09-03 10:18   
Closing as related issue 14255 is also closed