Apache OpenOffice (AOO) Bugzilla – Issue 87690
list boxes in form do not refresh their list when their form is reloaded - approved
Last modified: 2008-06-03 20:31:04 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
Created attachment 52431 [details] document to reproduce the bug case
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.
Created attachment 52433 [details] document to reproduce the bug case (II)
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.
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.
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
reassign to msc
added "approved" to the title, because it will be easier to work with the 2.4.1 meta issue during release status meetings.
FYI: an automatic test case for this issue will be written
Created attachment 54170 [details] Screenshot from Version 2.4.1 RC2
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
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).