Sorry - I haven't looked at this code in a while. You should just be able to override endEdit() and perform your validation. Don't call the base endEdit() if validation fails.
On Mar 7, 2011, at 4:06 PM, anton dos santos wrote: > Ok > but how can my app (my validators) tell the TableViewRowEditor that it should > not store the row? > it happens in TableViewRowEditor#endEdit(boolean result) which is invoked by > keyPressed(). > So I should override keyPressed() and check the status of all validators > before invoking endEdit() ? > > On 07/03/2011 21:41, Greg Brown wrote: >> That's true, but it is up to your app to decide what constitutes "valid". >> >> On Mar 7, 2011, at 3:36 PM, anton dos santos wrote: >> >>> when a value is not valid you can still press return and then editing ends >>> and store() is also called. >>> So modifying the MouseListener will not be enough. >>> I believe that store() should not be invoked when there is a non valid >>> value in the row >>> >>> >>> On 07/03/2011 21:04, lello wrote: >>>> The problem I am facing is that when you have any value which is not valid >>>> you can still select a row of the table with the mouse and trigger a >>>> store() >>>> method. This shouldn't be allowed whether or not strictValidation() is true >>>> or false, since it returns an exception in any case. I should overwrite >>>> some >>>> MouseListener in my custom TableRowEditor, but I can't find any. >>>> Any suggestion? >>>> >>>> -- >>>> View this message in context: >>>> http://apache-pivot-users.399431.n3.nabble.com/TextInput-and-Validator-issues-tp2641141p2647704.html >>>> Sent from the Apache Pivot - Users mailing list archive at Nabble.com. >>>> >>>> >> >> >
