🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #19803

Re: Problem with setItems() on the ChoiceControl

#19803
From: Andrew Bennett
Date: Thu, 18 Dec 1997 00:00
34 lines
1755 bytes


Len Halio wrote:

> I've added a ChoiceControl and bound it to a database.  I'd like to
> populate the choice items from a column of the database so I used the
> setItems method listed in the ChoiceControl class.  However when I compile,
> I get an error 42 indicating that the method is not part of the
> ChoiceControl class - but it is listed in the docs etc as a legitimate
> method.
>
> Any ideas in what I am doing wrong?

The ChoiceControl is a singleton in the model-view architecture.  You
can't use it like you are thinking.  It gets bound to a field of a row,
not to a subset of all the values of a column.

Check out
http://www.borland.com/devsupport/jbuilder/qanda/499.html

What you can do is, do a query, and plow through that
result set, adding the results of the query to your ChoiceControl.

Then, selecting a value from that Choice should populate that
field, which will get posted when it gets resolved.


Andrew
--
  Andrew Bennett            ->  abennett@borland.com
  JBuilder info             ->  http://www.borland.com/jbuilder/
  JBuilder newsgroups info  ->  http://www.borland.com/newsgroups/
**** Please don't post a reply AND send email.  Do one.  I'll see it. ****
Technical Details
Message-ID: <34998873.7C11B4B1@borland.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <01bd0be4$9b14c2c0$0f6e5cc0@len>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,fd62607f75740f7b
X-Google-Attributes: gidf74b3,public
From: Andrew Bennett <abennett@borland.com>
Subject: Re: Problem with setItems() on the ChoiceControl
Date: 1997/12/18
Message-ID: <34998873.7C11B4B1@borland.com>
X-Deja-AN: 299433910
Content-Transfer-Encoding: 7bit
References: <01bd0be4$9b14c2c0$0f6e5cc0@len>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Organization: None
Newsgroups: borland.public.jbuilder.java.language