Toni,  (replying off-list as this really isn’t about NetBeans)

I’m not even at the “large data set” point yet.  I’m talking about the basics - 
a table with data that scrolls independently of column headings.  So far 
anything I’ve found that tries to get the table headings to align with the data 
has been a ugly hack.  This despite the fact that HTML’s <table> should support 
this directly with no need for any JavaScript. How many decades have they had 
to implement this basic functionality?

<table> has elements like <thead> and <tbody> that allow you to specify the 
separation of the table data from the table headers.  Unfortunately HTML 
remains broken in this basic area and does not allow you to set the body area 
to a specific size with auto-scroll.  I.e. using CSS to set a height or 
max-height of a <tbody> doesn’t do anything.  Quite frustrating considering the 
documentation I find specifically mentions that as a use case: 
https://www.w3schools.com/tags/tag_tbody.asp 
<https://www.w3schools.com/tags/tag_tbody.asp> "Browsers can use these elements 
to enable scrolling of the table body independently of the header and footer."
Even the samples at w3.org <http://w3.org/> 
https://www.w3.org/TR/2017/NOTE-wai-aria-practices-1.1-20171214/examples/grid/dataGrids.html
 
<https://www.w3.org/TR/2017/NOTE-wai-aria-practices-1.1-20171214/examples/grid/dataGrids.html>
 don’t bother using <thead> elements to separate the headers from the data, and 
it requires a lather large amount of low-level JavaScript to get basic features 
(still with no scrollbar for the data).
If this is the future of UI, it is a big step backwards.

Can you point me to one of those third party components that can do what JTable 
or TableView already does?

Regards,

Scott

> On Mar 19, 2018, at 10:38 AM, Toni Epple <[email protected]> wrote:
> 
> There‘s no standard control that is usable for large data sets, but plenty of 
> data grid components from different third parties, and it‘s not hard to roll 
> your own if you have special requirements. I did that for a customer, and it 
> took me about a day.
> 
> —-Toni
> 
> Von meinem iPad gesendet
> 
>> Am 19.03.2018 um 15:34 schrieb Scott Palmer <[email protected]>:
>> 
>> 
>> 
>>> On Mar 19, 2018, at 10:25 AM, John Kostaras <[email protected]> wrote:
>>> 
>>> *"This is the bit I don't understand.  Why would you want to do that?
>>> In every Swing component I can think of you wouldn't render an entire
>>> large data set in the view in one go or it would grind to a halt - you'd
>>> render a subset/summary/coalesced view of the model surely?  The point of
>>> this approach, at least as I understand it, is to still do all the data
>>> set interaction, filtering and calculation on the JVM."*
>>> 
>>> This is why we need components that retrieve only the data that need to be
>>> rendered in their window and be smart enough to retrieve/cache the data the
>>> user will request next. Like others here, our application needs to render a
>>> lot of data in an OutlineView (or JTable) and be responsive when the user
>>> moves this scrollbar. Not only, these data are updated constantly and we
>>> had bugs in the past with all these listeners. Not to mention, that with
>>> many data that change all the time, it can become unresponsive.
>>> 
>>> Eclipse provides this Nattable <https://www.eclipse.org/nattable/>, I don't
>>> know how good it is, but it advertises itself as a high performance SWT
>>> data grid. Personally, I 'd love to have this ported in NetBeans. If this
>>> could be achieved with HTML4Java is fine with me too.
>>> 
>>> Regard,
>>> 
>>> John.
>> 
>> Has HTML got a way to do anything remotely like a JTable yet?  When I last 
>> checked (two weeks ago) there was still no reasonable HTML way to do a table 
>> with headers that stayed in place while the data scrolled.  I found a few 
>> attempts at hacking it, but nothing good.  Am I just looking in the wrong 
>> places?
>> 
>> Add in the other functionality of Swing’s JTable or JavaFX’ TableView like 
>> showing/hiding columns, re-ordering columns, sorting, etc… (never mind not 
>> needing *all* the data to be present as <tr> elements)  and you can see how 
>> I find that HTML is far behind in terms of basic UI abilities.  I admit - I 
>> just don’t get why anyone would choose to use HTML for UI outside of a web 
>> app.
>> 
>> 
>> Scott

Reply via email to