Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8090949

Don't force me to use the default 'placeholder' in an empty TableView

    Details

    • Type: Enhancement
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: 8
    • Fix Version/s: tbd
    • Component/s: javafx
    • Labels:
    • Environment:

      Build 92, on Windows 8.

      Description

      Sometimes when you have an empty TableView, you'd like it to just display a bunch of empty rows. Unfortunately, this doesn't seem to be possible in JavaFX.

      Instead, there is a 'placeholder' property in TableView, which specifies a Node that gets displayed instead of the table whenever the table is empty. The problem is, if this 'placeholder' property is null (its default value), the TableView uses a default placeholder which displays a message: "There is no data in this table" (or something like that).

      But I don't want to see that message...an empty table is a valid state for my application, and I would like an empty table to look just like the regular table, i.e. just a bunch of empty rows.

      ------------------------------

      I propose that you add some kind of static values (like TableView.EMPTY_ROWS_PLACEHOLDER and TableView.WARNING_MESSAGE_PLACEHOLDER) that can be passed to TableView's placeholder property. That would allow people to choose how they want it to behave.

      Another approach would be to simply make it so that when the 'placeholder' property is null (the default), you get the empty rows behaviour I just described (this just seems like a better default behaviour to me.)

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              cbanackjfx Cory Banack (Inactive)
            • Votes:
              6 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Imported: