Project JEDI - Issue Tracker
Mantis Bugtracker

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0005190 [JEDI VCL] 00 JVCL Components minor always 2010-03-08 12:10 2011-06-10 16:09
Reporter Thor View Status public  
Assigned To AHUser
Priority normal Resolution fixed  
Status resolved   Product Version Daily / GIT
Summary 0005190: jvDBlookup don't refresh displayValue when lookupindex is the same value of the previous
Description Suppose you browse a table1 that is master for a table2. Table2 is master for table3.
You have a jvDBlookup with use table1 as datasource and a field from table1 as datafield. The same jvDBlookup use Table3 as lookupsource + a field as lookupindex and another field as lookupdisplay.
When you browse the table1 this change also table2 and table3 but if
the value for the field lookupindex and datafield is the same as the previous,
the lookupdisplay don't change !
I've tryed to force the display in the following way (on an event of record change of the first table) but none of this worked :
// DBLCindc.Refresh;
// DBLCindc.Realign;
// DBLCindc.Repaint;
// DBLCindc.Update;
// DBLCindc.ResetField;
// DBLCindc.DisplayValue:=IFAT.Tindc.fieldbyname('indirizzo').asstring;
P.S: DBLCindc is the TjvDBlookup

Solved with the following new method in the class and calling (DBLCindc.ForceDisplay;) in the event record change

Below the patch with the current SVN.
If you find a way to automate the display change without calling "ForceDisplay" is welcome ;-)
Additional Information Index: JvDBLookup.pas
===================================================================
--- JvDBLookup.pas (revision 12372)
+++ JvDBLookup.pas (working copy)
@@ -447,6 +447,7 @@
     procedure CloseUp(Accept: Boolean); dynamic;
     procedure DropDown; virtual;
     procedure ResetField; override;
+ procedure ForceDisplay;
     property IsDropDown: Boolean read FListVisible;
     property ListVisible: Boolean read FListVisible;
     property Text: string read GetText;
@@ -2818,6 +2819,14 @@
   Result := inherited Text;
 end;
 
+procedure TJvDBLookupCombo.ForceDisplay;
+begin
+ ListLinkActiveChanged;
+ if FListActive then
+ DataLinkRecordChanged(nil);
+ DisplayValueChanged;
+end;
+
 procedure TJvDBLookupCombo.InvalidateText;
 var
   R: TRect;
Tags No tags attached.
Attached Files zip file icon testLookupCombo.zip [^] (514,825 bytes) 2010-03-09 16:50

- Relationships
parent of 0005207resolvedAHUser stack overflow testing sample of issue 0005190 
related to 0005521resolvedobones bug 5190 reappeared from revision 12821 (jvDBlookup don't refresh displayValue when lookupindex is the same value of the previou 

-  Notes
(0017235)
Thor (reporter)
2010-03-08 12:15

Sorry for the mismatch read JvDBLookupCombo where jvDBlookup ... can't find
where to modify the report
(0017282)
obones (administrator)
2010-03-09 12:09

Please provide the zipped sources of a sample application showing this
(0017297)
Thor (reporter)
2010-03-09 16:52

Source and exe with the Button and the new "procedure".
Try browsing forward and back. The code "2" have different city for every name
but the lookupCombo don't change the display value.
(0017308)
AHUser (developer)
2010-03-16 23:03

Fixed in SVN.

The JvDBLookup control now updates automatically.

- Issue History
Date Modified Username Field Change
2010-03-08 12:10 Thor New Issue
2010-03-08 12:15 Thor Note Added: 0017235
2010-03-08 12:15 Thor Issue Monitored: Thor
2010-03-09 12:09 obones Note Added: 0017282
2010-03-09 12:09 obones Status new => feedback
2010-03-09 16:50 Thor File Added: testLookupCombo.zip
2010-03-09 16:52 Thor Note Added: 0017297
2010-03-16 23:03 AHUser Note Added: 0017308
2010-03-16 23:03 AHUser Status feedback => resolved
2010-03-16 23:03 AHUser Fixed in Version => Daily / SVN
2010-03-16 23:03 AHUser Resolution open => fixed
2010-03-16 23:03 AHUser Assigned To => AHUser
2010-03-24 18:59 outchy Relationship added parent of 0005207
2010-03-30 09:21 Thor Issue End Monitor: Thor
2011-06-10 16:09 obones Fixed in Version Daily / SVN => 3.40
2012-02-27 16:59 obones Relationship added related to 0005521


Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker