TIP: Click on subject to list as thread! ANSI
echo: rberrypi
to: MARTIN GREGORIE
from: ADRIAN CASPERSZ
date: 2018-09-20 17:23:00
subject: Re: Displaying a ragged a

On 19/09/18 14:55, Martin Gregorie wrote:
> On Wed, 19 Sep 2018 14:02:13 +0100, Adrian Caspersz wrote:
>
>> On 16/09/18 19:17, Martin Gregorie wrote:
>>> I'm in the process of creating a desktop application to display and
>>> edit data that's best treated as a ragged array of Strings: it is quite
>>> unlikely that all rows in the array will be the same length.
>>>
>>> I've built and debugged a Datastore class to hold it as an ArrayList of
>>> ArrayList  - the ArrayList being in a wrapper class
>>> representing a row of fields. The DataStore allows rows, columns and
>>> individual fields to be inserted, deleted, and the fields to be
>>> modified.
>>>
>>> Datastore extends AbstractTableModel because I was initially intending
>>> to use a JTable to display and manipulate its contents, but now its
>>> successfully manipulating the ragged array I'm having twinges of doubt
>>> about how whether a JTable can is the best way of displaying it and
>>> allowing it to be viewed and modified, i.e. can a JTable deal
>>> successfully with the missing elements at the end of rows in a ragged
>>> array?
>>>
>>> Would I be better off with a custom built structure containing, say, an
>>> array of JButtons to display fields in the ragged array and that can be
>>> clicked to add a field, edit or delete it?
>>>
>>> I'll be very interested to hear how you've handled, or would handle,
>>> this display problem.
>>
>> XML/XLST to a web browser.
>
> ...and modifying it? Saving the result?

web app, client side javascript (jquery, handlebars etc...)

https://en.wikipedia.org/wiki/Ajax_(programming)

or good old CGI html forms processing (POST/GET etc...)

or a NodeJS server....

--
Adrian C

--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)

SOURCE: echomail via QWK@docsplace.org

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.