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 05:09 Go to next message
Sascha Smoo is currently offline Sascha Smoo
Messages: 53
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 07:16 Go to previous message
Dirk Fauth is currently offline Dirk Fauth
Messages: 1223
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:table reinit scrollbars problem
Next Topic:ButtonCellPainter how do i use it?
Goto Forum:
  


Current Time: Tue Jul 29 06:50:11 EDT 2014

Powered by FUDForum. Page generated in 0.01744 seconds