🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.swing
Article #12427

Re: JdbTable not editable

#12427
From: Matt Krevs
Date: Tue, 12 Jan 1999 00:00
110 lines
4066 bytes
I havent worked with the dbSwing components but in pure swing you are meant
to create your own TableModel and put relevant code in isCellEditable()

Sounds like the default implementation for dbTableModel is for cells not to
be editable. I would guess that if you want to make your cells editable then
you should create your own table model inheritied from dbTableModel and
place relevant code in isCellEditable. I think its pretty dangerous editing
Inprise source.

Charlie Havener wrote in message <369A4764.881DB06F@epsilon.com>...
>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: <77dtl6$oa416@forums.borland.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <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,74c9f2aacacfc3ec
X-Google-Attributes: gid111d45,public
From: "Matt Krevs" <mattkrevs@flex.com.au>
Subject: Re: JdbTable not editable
Date: 1999/01/12
Message-ID: <77dtl6$oa416@forums.borland.com>
X-Deja-AN: 431410517
References: <366442D9.6EAF5203@synchronis.com> <75i54c$5gk1@forums.borland.com> <369A4764.881DB06F@epsilon.com>
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
Organization: Another Netscape Collabra Server User
Newsgroups: borland.public.jbuilder.java.swing