about adding a button UI in apache pivot TableView row

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

about adding a button UI in apache pivot TableView row

Chun Hui

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?

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

Roger Whitcomb-2

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:[hidden email]]
Sent: Monday, May 25, 2015 11:55 PM
To: [hidden email]
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?

Loading...