Notes |
|
(0079028)
|
caristu
|
2015-07-22 13:31
(edited on: 2015-07-22 17:50) |
|
The problem is that the _extraProperties in the datasource used by the selector does not contain the entity name if they are referencing to the main entity. When trying to set the selected value of the selector picklist in grid view, the display field name was never found as we currently return 'entity$property' as the display field name, instead of looking directly for 'property' when we are using a property that references the main entity on the display field (See attached selectorDefinition.txt).
The solution in issue 0027469 was not the most suitable so the change to fix it in issue 0030297 was correct. Just the attached fix was missing.
This fix has been pushed to try. It has been tested with the following selectors:
- Product (Search reference with FKSelectorUIDefinition UI definition)
- Business Partner selector
- Business Partner (Search reference with FKSelectorUIDefinition UI definition) (is Custom Query, so not affected)
|
|
|
(0079035)
|
hgbot
|
2015-07-22 20:09
|
|
Repository: erp/devel/pi
Changeset: cd1ddf017185991943a616cae587cd15f35d3a5a
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Wed Jul 22 17:02:50 2015 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/cd1ddf017185991943a616cae587cd15f35d3a5a [^]
Fixes issue 30403: selectors not working in grid view when display field is set
When setting the display field for a selector with FKSelectorUIDefinition as its UI Definition class, if the display field was referencing to a property of the main entity of the selector, the display field name returned as part of the gridProps in the view definition was 'entity'.
The _extraProperties in the datasource used by the selector does not contain the entity name if they are referencing to the main entity. That is the root of the problem: when trying to set the selected value of the selector picklist in grid view, the display field name was never found as we were using 'entity' instead of looking directly for 'property'.
This problem does not affect when setting as display field a field that references a property which does not belong to the main entity of the selector.
To solve this problem, now in FKSelectorUIDefinition we return 'property' as the display field name instead of 'entity' when the property belongs to the main entity.
---
M modules/org.openbravo.userinterface.selector/src/org/openbravo/userinterface/selector/reference/FKSelectorUIDefinition.java
---
|
|
|
(0079038)
|
alostale
|
2015-07-23 10:55
(edited on: 2015-07-23 11:21) |
|
code reviewed
* tested with Search and OBUISEL_Selector references both in grid and form views * tested issue 0030297
* tested issue 0023890
|
|
|
|
reopening due to code review:
private method FKSelectorUIDefinition.getFirstProperty is no longer used after this fix, it should be removed |
|
|
(0079040)
|
hgbot
|
2015-07-23 11:49
|
|
Repository: erp/devel/pi
Changeset: a6b70470ce55d90a19952f163ee69d937cffca2c
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Thu Jul 23 11:47:59 2015 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/a6b70470ce55d90a19952f163ee69d937cffca2c [^]
Related to issue 30403: Removed unused getFirstProperty method
---
M modules/org.openbravo.userinterface.selector/src/org/openbravo/userinterface/selector/reference/FKSelectorUIDefinition.java
---
|
|
|
|
|
|
|
|