Yes, the row editors can be messy to setup.  Every time I’ve done it, there is 
a ton of code.  Likely a chance for some new features for version 2.1 ;)

Would it help if I dig up some examples?

One thing I can think of about read-only columns is to just render a Label 
there, or you could put in a TextInput with “readonly” set to true.

It’s also important to call the “super.beginEdit()” inside your own “beginEdit” 
method because the super does the “load” from the current data object into your 
row editor components, and conversely to call the super method from your 
“endEdit” method also (to do the “store” back into the data object).

One trick I’ve been using in other areas, if you have a fixed set of data types 
that need to be edited, is just to create a small BXML file with just the row 
editor in it.  That way your Java code is reduced considerably from just 
instantiating and setting up each of the components directly in code.  Of 
course, if you have completely dynamic data, then that won’t work…

Let us know how it’s going.
~Roger

From: Tom [mailto:t...@soaringclub.org]
Sent: Sunday, February 07, 2016 8:21 AM
To: user@pivot.apache.org
Subject: Re: Editing "disabled" TableView column data

So far I derived a TableViewCellRenderer that can render a cell as "disabled".

The trick then is to process this information in the TableViewRowEditor, which 
I have done by creating my own. (I found it difficult to extend Pivot's - 
basically wound it copying it and renaming it.)

My RowEditor can now disable the appropriate CellEditor Component. So far so 
good.

At the moment I am wrestling with understanding TableView data binding.

It seemed like I was heading down a path of endlessly extending Components.

So far it looks like I can have an "editable" property in a custom TableView 
cell class (OlympicStanding).

I know I can disable CellEditors. Right now the only unknown is how editor 
Components will bind to custom objects in cells.

Let me know if I'm making this more complicated than it is.

Thanks

Tom


Sandro Martini <sandro.mart...@gmail.com<mailto:sandro.mart...@gmail.com>> 
wrote:

Hi Tom,
welcome to Pivot and sorry for the delay.

What do you mean by disabled data ?
A row that's not editable ?
I remember a prototype made by a user (but never proposed for a real inclusion 
in Pivot) to select or render cells in a different way ... do you need 
something like this ?

Anyway we have some example of table row editing, I can give you more details.

Note that in our sources in svn (both branch 2.0.x and trunk) there is an 
example subproject with some not so trivial  samples.

On documentation I know that could be improved,  and any help is welcome :-) ...
Note that all our mailing lists are public so you can find many info in some 
indexing services like Nabble.

Bye,
Sandro
Il 04/Feb/2016 19:21, "Tom Coleman" 
<t...@soaringclub.org<mailto:t...@soaringclub.org>> ha scritto:

Here's one condition that I could use some guidance on.

I've basically figured out how to display data ini a TableView as "disabled".  
This basically involves examining the data in context and rendering an 
appropriate style.  So far so good.

But once identified as "disabled", how should I go about disallowing editing of 
the column?

That ends my question.  Editorial comments follow:

I've been wading through the project and so far have been quite impressed.

Between the web docs, the API docs, tutorials, examples, demos, tests and 
source code, there is not much that someone with time and patience can't figure 
out.

Two observations are that many of the examples tend to be very simple and that 
Google is not much help.

Thanks!

Tom



Reply via email to