Skip to main content



      Home
Home » Eclipse Projects » NatTable » Multiple Cell Validators
Multiple Cell Validators [message #1022089] Thu, 21 March 2013 05:09 Go to next message
Eclipse UserFriend
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
Eclipse UserFriend
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: Wed Nov 05 12:44:59 EST 2025

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

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

Back to the top