Page 1 of 1

Using IntegerRangeValidator

Posted: Thu Nov 01, 2012 12:10 pm
by kja
I have an entity that contains a percent value, and I'd like to constrain and validate this field when entered into the admin app so that only 0 to 100 can be entered. I've created my own modules, presenters, etc... which all seems to work fine - but I can't get the IntegerRangeValidator (or FloatRangeValidator) to have any effect.

I've effectively used the com.smartgwt.client.widgets.form.validator.RegExpValidator elsewhere so was expecting the range validator to work too.

I have this in my entity class:

Code: Select all

       
        @Column(name = "PERCENT")
        @AdminPresentation(friendlyName = "Percentage (%)",
        validationConfigurations = { @ValidationConfiguration(validationImplementation = "com.smartgwt.client.widgets.form.validator.IntegerRangeValidator",
        configurationItems = {
                @ConfigurationItem(itemName = "min", itemValue = "0"),
                @ConfigurationItem(itemName = "max", itemValue = "100")
                })
        })
       protected int percent;


Any thoughts on where I may be going wrong? Are there any examples in the Broadleaf codebase or anywhere else that might guide me?

Re: Using IntegerRangeValidator

Posted: Tue Nov 06, 2012 6:15 pm
by phillipuniverse
Currently the admin doesn't support all of the SmartGWT validators out of the box. In order to get access to the rest of them, you will have to register your own ValidationFactory in a GWT Module subclass to properly instantiate the validator and set up the configuration properly.

Having said that, it's definitely valuable to already provide the base SmartGWT validators in Broadleaf itself. I've created a Jira ticket (http://jira.broadleafcommerce.org/browse/BLC-725) to address this.

Where I can download XRumer 7.7.35 Elite???

Posted: Thu Nov 15, 2012 10:12 am
by Maximusjef
Anybody know Where I can download XRumer 7.7.35 Elite??
Only this version, or higher!

P.S. It is the best program for working with forums ;)