Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » Multiple Cell Validators
Multiple Cell Validators [message #1022089] Thu, 21 March 2013 09:09 Go to next message
Sascha Smoo is currently offline Sascha SmooFriend
Messages: 56
Registered: November 2012
Member
Hello,

I'd like to know if there is a way to register more than one validator to a cell.

configRegistry.registerConfigAttribute(EditConfigAttributes.DATA_VALIDATOR,
new FourDigitsDataValidator(), DisplayMode.EDIT, "MonthEditLABEL");


That's the way I register a Validator to my cells with the label "MonthEditLABEL". Now I need to add another validator on top of the same label, but if I do so the first validator seems to be overwritten.

Any thoughts on this?

Greetings,
Sascha
Re: Multiple Cell Validators [message #1022155 is a reply to message #1022089] Thu, 21 March 2013 11:16 Go to previous message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2902
Registered: July 2012
Senior Member
Validator chains are currently not supported in NatTable. This is also not included in 1.0.0

What you could do is to create a validator that extends ContextualDataValidator. There you have the ConfigRegistry available and would be able to check for the whole LabelStack and check if there are additional validators registered. This allows you to create your own validator chain if necessary.

Hope that helps,
Dirk
Previous Topic:Decorate icons with text in NatTable Tree
Next Topic:ButtonCellPainter how do i use it?
Goto Forum:
  


Current Time: Thu Apr 25 14:28:35 GMT 2024

Powered by FUDForum. Page generated in 0.03140 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top