David,

You should be able to do this in a couple of different ways.

The behaviour of the default Pivot (Terra) TableView is to open & use
the TableView.RowEditor (if one has been supplied) when a non-empty
row is double clicked.

This is defined in the TableView's skin.
http://pivot.apache.org/2.0/docs/api/org/apache/pivot/wtk/skin/terra/TerraTableViewSkin.html#mouseClick(org.apache.pivot.wtk.Component,
org.apache.pivot.wtk.Mouse.Button, int, int, int)
http://svn.apache.org/repos/asf/pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraTableViewSkin.java


You might choose to create & use a custom version of that skin which
performs some kind of check before opening the RowEditor, however it
would be simpler to take care of things in the RowEditor itself.

http://pivot.apache.org/2.0/docs/api/org/apache/pivot/wtk/TableView.RowEditor.html
http://svn.apache.org/repos/asf/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TableViewRowEditor.java


Double clicking on a row will still cause your RowEditor's beginEdit
method to be called (via TerraTableViewSkin.html#mouseClick).  You
could perform your check in the beginEdit method and choose whether to
continue with the standard behaviour of opening the RowEditor Window,
or simply to ignore the call and exit the method.

Chris

On 22 November 2011 10:45, David Delbecq <[email protected]> wrote:
> Hello,
>
> Is it possible in Pivot to have a tableview with some rows that are editable
> and some rows that aren't? Some kind of veto during the start of editing.
> I'd like to avoid having to create a table for readonly datas and a table
> for read/write datas.
>
> David Delbecq
>
>

Reply via email to