Issue 87690 - list boxes in form do not refresh their list when their form is reloaded - approved
Summary: list boxes in form do not refresh their list when their form is reloaded - ap...
Status: CLOSED FIXED
Alias: None
Product: Base
Classification: Application
Component: code (show other issues)
Version: OOo 2.4.0
Hardware: PC Windows XP
: P3 Trivial (vote)
Target Milestone: OOo 2.4.1
Assignee: marc.neumann
QA Contact: issues@dba
URL:
Keywords: regression
Depends on:
Blocks: 88258
  Show dependency tree
 
Reported: 2008-04-01 11:50 UTC by Frank Schönheit
Modified: 2008-06-03 20:31 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
document to reproduce the bug case (9.95 KB, application/vnd.sun.xml.base)
2008-04-01 11:50 UTC, Frank Schönheit
no flags Details
document to reproduce the bug case (II) (10.09 KB, application/vnd.sun.xml.base)
2008-04-01 12:07 UTC, Frank Schönheit
no flags Details
Screenshot from Version 2.4.1 RC2 (53.06 KB, image/png)
2008-06-02 14:14 UTC, Mechtilde
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description Frank Schönheit 2008-04-01 11:50:18 UTC
In OOo 2.3, when you reload a (logical) form, either programmatically or via the
UI, then all list boxes belonging to this form also refresh their list content.
In 2.4, this isn't the case anymore. In particular, you don't have any chance to
refresh a list boxes list content, without actually closing and re-opening the form.

To reproduce this:
- open the attached database document
- open the contained form by double clicking it
- in the above two controls, add or modify some records
- press the button to refresh the list boxes list
=> the content of the list *should* contain the new/changed names, but it doesn't
Comment 1 Frank Schönheit 2008-04-01 11:50:53 UTC
Created attachment 52431 [details]
document to reproduce the bug case
Comment 2 Frank Schönheit 2008-04-01 11:52:56 UTC
Since this used to work in 2.3.x, but not in 2.4, this a) is a regression and b)
should be fixed for the next release.
Given that there is *no* way to programmatically reload a list boxes list
anymore, which heavily affects existing applications developed with base, it
would even be a 2.4.1, IMO. So, I target it for 2.4.1 for the moment, though
that still requires approval from other parties.
Comment 3 Frank Schönheit 2008-04-01 12:07:48 UTC
Created attachment 52433 [details]
document to reproduce the bug case (II)
Comment 4 Frank Schönheit 2008-04-01 12:09:11 UTC
The second document is an extended bug doc, which shows that the list box can
neither be refreshed using its .refresh method, nor using its form's .reload.
Both approaches work in 2.3.x.
Comment 5 Frank Schönheit 2008-04-02 06:42:26 UTC
Fixed in CWS dba241b.

Note that the fix is that the list box refreshes its content when its .refresh
method is called, but still *not* when its form's .reload is called.

The reason here is a sub form is reloaded upon every move of its main form.
Thus, if you have a list box in a sub form (which is a common scenario), then
every move of the main form would refresh the list boxes list entries - which is
certainly not desired. In particular, this scenario was that expensive during
normal form operations that it was one of the reasons to disable the
refresh-on-reload functionality in list boxes.

So, if you want to programmatically refresh a list boxes list entries, then you
need to call .refresh on it. (Which, by the way, also works in existing OOo
versions, this is *not* new functionality.)

There's still issue 66628 which requests to be able to provide this refresh
functionality in the form UI, though.
Comment 6 marc.neumann 2008-04-23 11:29:11 UTC
verified in CWS dba241b

find more information about this CWS, like when it is available in the master
builds, in EIS, the Environment Information System:
http://eis.services.openoffice.org/EIS2/cws.ShowCWS?Path=OOH680%2Fdba241b
Comment 7 marc.neumann 2008-04-23 11:30:02 UTC
reassign to msc
Comment 8 uwe.luebbers 2008-04-28 11:58:19 UTC
added "approved" to the title, because it will be easier to work with the 2.4.1 meta issue 
during release status meetings.
Comment 9 marc.neumann 2008-04-28 12:32:14 UTC
FYI: an automatic test case for this issue will be written
Comment 10 Mechtilde 2008-06-02 14:14:29 UTC
Created attachment 54170 [details]
Screenshot from Version 2.4.1 RC2
Comment 11 andreschnabel 2008-06-03 18:02:47 UTC
I'm uncertain about the status of this issue.

@fs: what is the expected behaviour for the two examples with your fix

in OOH_M16 (debian, Pavel's build) I get the following:
1st example - click "refresh list" -> list is *not* refreshed
2nd example - click "refresh list" -> list *is* refreshed
2nd example - click "reload form" -> list is *not* refreshed


Comment 12 Frank Schönheit 2008-06-03 20:31:04 UTC
The behavior is as expected. Both the "Refresh list" button in the first
document (whose label is misleading) and the "Reload form" button in the second
document actually call a XLoadable::reload method at the form which the list box
belongs to.

This was the original scenario reported by users: reloading the form did not
refresh the list. However, this was not be fixed, and cannot be fixed, without
introducing severe performance problems. See my above comment ("Note that the
fix is that the list box refreshes its content when its .refresh method is
called, but still *not* when its form's .reload is called.", and below) for a
justification.

So, unfortunately if you previously used to reload the form to refresh a list
box content, you are forced to change your macro to call a "refresh" on the
listbox - which is the proper way, anyway, since reloading the form has side
effects.

The fix which introduced the bug actually killed both the reload and the refresh
approach, the fix for this bug here re-introduced the refresh functionality.


Marking issue as closed, since I verified the fix is in the master (OOHm16).