Issue 15026 - List box with dropdown=no has extra item
Summary: List box with dropdown=no has extra item
Status: CONFIRMED
Alias: None
Product: Base
Classification: Application
Component: code (show other issues)
Version: OOo 1.1 Beta2
Hardware: PC Windows 2000
: P3 Trivial (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-05-28 16:01 UTC by Unknown
Modified: 2017-05-20 10:47 UTC (History)
1 user (show)

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


Attachments
Database to demonstrate issue with listboxes and VFP tables (2.12 KB, application/octet-stream)
2003-06-23 16:57 UTC, Unknown
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description Unknown 2003-05-28 16:01:34 UTC
Steps:

1) Create a document.
2) Open the Form Functions toolbar.
3) Make sure AutoPilots On/Off is set to On.
4) Drop a listbox on the document.
5) In the AutoPilot, choose the Bibliography data source and the Biblio table 
for the form. Click Next.
6) Choose the Biblio table for the list box. (I know this is bad design, but 
I'm trying to work with common data.) Click Next.
7) Choose Title for the display field.
8) Link Title to Title on the Field Link page. (Yeah, again, I know this isn't 
good practice.)
9) Click Create.
10) From the list's context menu, choose Control.
11) In the Property Sheet, set Dropdown to No.
12) Close the Property Sheet.
13) On the Form Functions toolbar, switch Design Mode On/Off to Off.

Observed: The list has a blank item at the top.
Expected: No blank item.

Notes: This only happens if you set Dropdown to No. Interestingly, having done 
so, if you then switch Dropdown back to Yes, the extra item remains.
Comment 1 Frank Schönheit 2003-05-28 16:26:24 UTC
correcting sub component/default owner (see
http://www.openoffice.org/issues/describecomponents.cgi?component=database%20access)
Comment 2 Frank Schönheit 2003-05-28 16:46:22 UTC
Tamar, thanks for reporting this.

Though, I have a problem (: I always get this empty line, even if I
don't change the DropDown property (which's default is "No").

Can you please confirm that the empty line really depends on the
dropdown property? I suspect it really isn't, except I overlooked
something important.

The reason for the empty line is that the listbox is bound to a field
which is not required to be set. The listbox then automatically
inserts an empty string, and when chosen, it will write NULL into the
database.

If you'd bind the control to a field where the input is required, then
this empty string wouldn't appear.

So unless we find that the empty string is really dependent on the
dropdown property (sorry, I still doubt :), this works as intended,
and would be a INVALID.
Comment 3 Unknown 2003-05-28 17:19:38 UTC
I just tried it again. If I just go through the AutoPilot and then 
turn design mode off, I can drop open the list and there's no blank 
entry. I've scrolled to both ends to confirm this.

Once I set Dropdown to No, the blank entry appears.

Okay, now I tried it again with the Biblio table and, in that case, I 
do see the blank line initially. My other tests have been with dBase 
tables of my own design and they definitely exhibit the problem. 
Sorry for sending you down the wrong path.
Comment 4 marc.neumann 2003-06-04 14:20:45 UTC
Hi,

I can't reproduce this. In my list box I have everytime a blank line,
as FS mention for the null value.

Can you please attach a sample table to this issue, where the wrong
behaviour occurr.

Bye Marc
Comment 5 Unknown 2003-06-23 16:56:08 UTC
After some experimenting, I find that I'm seeing this problem with 
listboxes created based on Visual FoxPro data, which I'm accessing 
via ODBC. I've attached a sample database with two tables, Person and 
State. To demonstrate the problem:

1) Create an ODBC data source, using the Visual FoxPro driver, and 
pointing at this database.
2) Add this ODBC data source to the OOo Data Sources.
3) Create a form, with a single listbox. The form data source should 
be the Person table. The listbox data comes from the State table. 
Display the cStateName field. Link the cStateAbbr field in the two 
tables.

When you turn design mode off and drop open the list, there's no 
blank entry.

Sorry it's taken me so long to nail this down. 
Comment 6 Unknown 2003-06-23 16:57:59 UTC
Created attachment 7069 [details]
Database to demonstrate issue with listboxes and VFP tables
Comment 7 marc.neumann 2004-01-28 10:36:59 UTC
Hi,

Yes, I can reproduce this. 

msc -> fs: follow the instruction from tamar and you see the effect.

Bye Marc
Comment 8 hans_werner67 2004-02-02 12:14:45 UTC
change subcomponent to 'none'
Comment 9 Marcus 2017-05-20 10:47:32 UTC
Reset assigne to the default "issues@openoffice.apache.org".