Article View: borland.public.jbuilder.java.swing
Article #10476Re: JdbTable not editable
From: Zippy
Date: Tue, 05 Oct 1999 00:00
Date: Tue, 05 Oct 1999 00:00
97 lines
4229 bytes
4229 bytes
Ive just started playing with JBuilders swing component collection...
I have yet to accomplish anything useful with the JDBTable bean. One
operation is that Id like to be able to define a column as a picklist
(in a dataset) and display this.... Works fine ith JBCL but not with
swing. Following this back I see some attempt at retrieveing the class
of the column in the DBTableModel But you dont define your columns
model there ... There is somem references to the itempainnter and
itemeditor do you need to use these ???
>I too am having a terrible time trying to use dbSwing components in JBuilder
>2.01.
>
>I discovered that Borland's dbTableModel.java source file was hard coded to
>return
>false, so dbTable cells could not be edited. Period. I copied that file into my
>project
>and changed it so iscellEditable returns true. Now I can edit cells, but they do
>not get
>placed back into the table. Why; look at setValueAt method below. Borland didn't
>implement
>it! It seems to me they only did a half way implementation of dbSwing. It is
>read only.
>Bummer! Looks like I will have to re-do my GUI and just use straight Borland
>JBCL components.
>It's too hard dealing with all the Swing bugs and Swing versions and Swing
>mismatches
>with JBCL components.
>
>Charlie
>-----------------------------------------
> public boolean isCellEditable(int rowIndex, int columnIndex) {
> return true; // changed to true by cdh
> }
>
> public Object getValueAt(int row, int column) {
> try {
> // NOTE THESE ARE REVERSED (row and column)
> dataSet.getVariant(column, row, value);
> return value;
> }
> catch (Exception ex) {
> handleException(ex);
> value.setUnassignedNull();
> return value;
> }
> }
>
> public void setValueAt(Object aValue, int rowIndex, int columnIndex) {
> }
>
>
>Tommy Cox wrote:
>
>> Tammy,
>>
>> Understanding your frustration, may I ask first, what in your design
>> consideration keeps you from using the JBCL components to do that. Of
>> course, you may be listing such a simple piece of code just to illustrate
>> the point, but we both know that the JBCL components would do this well.
>>
>> Secondly, if you think you are ready to scream now at this point. Just wait!
>> I personally am not impressed with JdbTable. And, have spent 4 days messing
>> with the thing. With other problems beyond the one you have mentioned. I
>> have found some pretty good tradeoffs and run into some pretty confusing
>> roadblocks. I have posted questions on this forum to get additional tips.
>> Maybe we can share our results as we tackle this.
>>
>> All the best.
>> Tommy
>> tommycox@mindspring.com
>> ICQ#2655768.
>>
>> Tammy McKean wrote in message <366442D9.6EAF5203@synchronis.com>...
>> >Ok,
>> >
>> >I am ready to scream! Why can I not get any JdbTable components to be
>> >editable? Let me qualify that: any JdbTable components that I specify a
>> >QueryDataSet for do not seem to be able to be made editable, at all, ever:(
>> >What am I missing? Any help appreciated.
>> >
>> > -tm
>> >
>> >BTW: here is a very simple test case of a JdbTable that is still not
>> editable:
>> >
>> >
>> >tammy@synchronis.com
>> >
>> >
>> >synchronis
>> >2999 overland avenue suite 217
>> >los angeles, ca 90064
>> >www.synchronis.com
>> >direct 310.837.8093
>> >fax 310.837.8094
>> >msg 310.649.1896
>> >
>> >
Technical Details
Message-ID:
<37f96244.480039@news.pangea.ca>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<366442D9.6EAF5203@synchronis.com> <75i54c$5gk1@forums.borland.com> <369A4764.881DB06F@epsilon.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,ce1d39d323d3d5f1,start X-Google-Attributes: gid111d45,public From: Zippy@Pangea.ca (Zippy) Subject: Re: JdbTable not editable Date: 1999/10/05 Message-ID: <37f96244.480039@news.pangea.ca> X-Deja-AN: 532908473 Content-Transfer-Encoding: 7bit References: <366442D9.6EAF5203@synchronis.com> <75i54c$5gk1@forums.borland.com> <369A4764.881DB06F@epsilon.com> Content-Type: text/plain; charset=us-ascii X-Complaints-To: abuse@pangea.ca X-Trace: pumpkin.pangea.ca 939091097 11034 207.161.110.29 (5 Oct 1999 02:38:17 GMT) Organization: Oats Mime-Version: 1.0 Reply-To: Zippy@Pangea.ca NNTP-Posting-Date: 5 Oct 1999 02:38:17 GMT Newsgroups: borland.public.jbuilder.java.swing