You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pivot.apache.org by Chun Hui <sh...@gmail.com> on 2015/05/26 08:55:16 UTC

about adding a button UI in apache pivot TableView row

I'm trying to insert clickable UI controls into a pivot TableView. I chose
to use TableView instead of TablePane because it can easily load data via
an data array from json.

I need the user to be able to click on buttons and other UI controls
without putting a single row first into 'row edit' mode. I used a custom
CellRenderer, but the rendered buttons are not clickable.

I wonder if there is something that automatically blocks interactive UI in
a tableview that is not in 'edit' mode?

RE: about adding a button UI in apache pivot TableView row

Posted by Roger Whitcomb <Ro...@actian.com>.
Hi Chun,
                We have struggled with this as well in our application.  The quick answer, is:  yes, the TableView uses the components to just render the data for display when not in “edit” mode.  Then the components are instantiated and enabled when you start editing, etc.  That is the purpose of the TableViewRowEditor interface.  You can get some things to work (such as checkboxes) using a custom mouse listener, but edit controls are a whole different thing, and won’t work to directly edit.  There is a new style for TableView called “editOnMouseDown” (poorly documented, though), that helps with this.  Setting this style “true” means that edit mode starts with just a single mouse click instead of a double click.
                Having said all that, if you have ideas as to how this could be improved, we’re open to suggestions.  I still have open bug reports in our application because of this ;)

Thanks,
~Roger Whitcomb

From: Chun Hui [mailto:shinki.suen@gmail.com]
Sent: Monday, May 25, 2015 11:55 PM
To: user@pivot.apache.org
Subject: about adding a button UI in apache pivot TableView row


I'm trying to insert clickable UI controls into a pivot TableView. I chose to use TableView instead of TablePane because it can easily load data via an data array from json.

I need the user to be able to click on buttons and other UI controls without putting a single row first into 'row edit' mode. I used a custom CellRenderer, but the rendered buttons are not clickable.

I wonder if there is something that automatically blocks interactive UI in a tableview that is not in 'edit' mode?