You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Martijn Dashorst (JIRA)" <ji...@apache.org> on 2007/10/25 20:56:50 UTC

[jira] Created: (WICKET-1103) Allow custom validators to provide their own resourcebundles

Allow custom validators to provide their own resourcebundles
------------------------------------------------------------

                 Key: WICKET-1103
                 URL: https://issues.apache.org/jira/browse/WICKET-1103
             Project: Wicket
          Issue Type: Improvement
          Components: wicket
    Affects Versions: 1.4.0-alpha
            Reporter: Martijn Dashorst
             Fix For: 1.4.0-alpha


Basically allow the following to work:

public class MyValidator extends AbstractValidator {
   protected void onValidate(IValidatable v) {
       error(v);
   }
}

MyValidator.properties
MyValidator=${label} is invalid

MyValidator_nl.properties
MyValidator=${label} is niet goed

Igor also asked for package level resource bundles

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WICKET-1103) Allow custom validators to provide their own resourcebundles

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-1103?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Igor Vaynberg updated WICKET-1103:
----------------------------------

    Fix Version/s:     (was: 1.4-M4)
                   1.5-M1
         Assignee:     (was: Juergen Donnerstag)

moving to 1.5. this will take a lot of thinking and probably a lot of tweaks to our i18n resource loading code which is currently only based around component classes.

> Allow custom validators to provide their own resourcebundles
> ------------------------------------------------------------
>
>                 Key: WICKET-1103
>                 URL: https://issues.apache.org/jira/browse/WICKET-1103
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.4-M1
>            Reporter: Martijn Dashorst
>             Fix For: 1.5-M1
>
>
> Basically allow the following to work:
> public class MyValidator extends AbstractValidator {
>    protected void onValidate(IValidatable v) {
>        error(v);
>    }
> }
> MyValidator.properties
> MyValidator=${label} is invalid
> MyValidator_nl.properties
> MyValidator=${label} is niet goed
> Igor also asked for package level resource bundles

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (WICKET-1103) Allow custom validators to provide their own resourcebundles

Posted by "Juergen Donnerstag (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-1103?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Juergen Donnerstag resolved WICKET-1103.
----------------------------------------

    Resolution: Won't Fix

Is already possible. Please see my previous comment

> Allow custom validators to provide their own resourcebundles
> ------------------------------------------------------------
>
>                 Key: WICKET-1103
>                 URL: https://issues.apache.org/jira/browse/WICKET-1103
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.4-M1
>            Reporter: Martijn Dashorst
>            Assignee: Juergen Donnerstag
>             Fix For: 1.4-M1
>
>
> Basically allow the following to work:
> public class MyValidator extends AbstractValidator {
>    protected void onValidate(IValidatable v) {
>        error(v);
>    }
> }
> MyValidator.properties
> MyValidator=${label} is invalid
> MyValidator_nl.properties
> MyValidator=${label} is niet goed
> Igor also asked for package level resource bundles

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (WICKET-1103) Allow custom validators to provide their own resourcebundles

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-1103?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Igor Vaynberg resolved WICKET-1103.
-----------------------------------

       Resolution: Fixed
    Fix Version/s:     (was: 1.5-M1)
                   1.4-M4

both validator bundles and package bundles are now picked up.

there was already some support for package bundles (package.properties) but it would only search against the actual component, not its whole component hieararchy. this was pretty useless because most of the time errors are reported against core components eg textfield and so only core packages would be searched for package.properties files, this has been fixed.

> Allow custom validators to provide their own resourcebundles
> ------------------------------------------------------------
>
>                 Key: WICKET-1103
>                 URL: https://issues.apache.org/jira/browse/WICKET-1103
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.4-M1
>            Reporter: Martijn Dashorst
>            Assignee: Igor Vaynberg
>             Fix For: 1.4-M4
>
>
> Basically allow the following to work:
> public class MyValidator extends AbstractValidator {
>    protected void onValidate(IValidatable v) {
>        error(v);
>    }
> }
> MyValidator.properties
> MyValidator=${label} is invalid
> MyValidator_nl.properties
> MyValidator=${label} is niet goed
> Igor also asked for package level resource bundles

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (WICKET-1103) Allow custom validators to provide their own resourcebundles

Posted by "Juergen Donnerstag (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-1103?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Juergen Donnerstag reassigned WICKET-1103:
------------------------------------------

    Assignee: Juergen Donnerstag

> Allow custom validators to provide their own resourcebundles
> ------------------------------------------------------------
>
>                 Key: WICKET-1103
>                 URL: https://issues.apache.org/jira/browse/WICKET-1103
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.4-M1
>            Reporter: Martijn Dashorst
>            Assignee: Juergen Donnerstag
>             Fix For: 1.4-M1
>
>
> Basically allow the following to work:
> public class MyValidator extends AbstractValidator {
>    protected void onValidate(IValidatable v) {
>        error(v);
>    }
> }
> MyValidator.properties
> MyValidator=${label} is invalid
> MyValidator_nl.properties
> MyValidator=${label} is niet goed
> Igor also asked for package level resource bundles

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WICKET-1103) Allow custom validators to provide their own resourcebundles

Posted by "Martijn Dashorst (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-1103?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martijn Dashorst updated WICKET-1103:
-------------------------------------

    Fix Version/s:     (was: 1.4-M3)
                   1.4-M4

Moved to next milestone release.

> Allow custom validators to provide their own resourcebundles
> ------------------------------------------------------------
>
>                 Key: WICKET-1103
>                 URL: https://issues.apache.org/jira/browse/WICKET-1103
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.4-M1
>            Reporter: Martijn Dashorst
>            Assignee: Juergen Donnerstag
>             Fix For: 1.4-M4
>
>
> Basically allow the following to work:
> public class MyValidator extends AbstractValidator {
>    protected void onValidate(IValidatable v) {
>        error(v);
>    }
> }
> MyValidator.properties
> MyValidator=${label} is invalid
> MyValidator_nl.properties
> MyValidator=${label} is niet goed
> Igor also asked for package level resource bundles

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-1103) Allow custom validators to provide their own resourcebundles

Posted by "Juergen Donnerstag (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1103?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12585932#action_12585932 ] 

Juergen Donnerstag commented on WICKET-1103:
--------------------------------------------

You can do this already.

ClassStringResourceLoader loader = new ClassStringResourceLoader(MyValidator.class);
getResourceSettings().addStringResourceLoader(loader);

Please be aware that when calling addStringResourceLoader() the first time, it'll reset the list of loaders. Thus you have to add wicket's default loaders again.

		stringResourceLoaders.add(new ComponentStringResourceLoader());
		stringResourceLoaders.add(new PackageStringResourceLoader());
		stringResourceLoaders.add(new ClassStringResourceLoader(this.application.getClass()));

The package loader is under way and almost ready.

> Allow custom validators to provide their own resourcebundles
> ------------------------------------------------------------
>
>                 Key: WICKET-1103
>                 URL: https://issues.apache.org/jira/browse/WICKET-1103
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.4-M1
>            Reporter: Martijn Dashorst
>            Assignee: Juergen Donnerstag
>             Fix For: 1.4-M1
>
>
> Basically allow the following to work:
> public class MyValidator extends AbstractValidator {
>    protected void onValidate(IValidatable v) {
>        error(v);
>    }
> }
> MyValidator.properties
> MyValidator=${label} is invalid
> MyValidator_nl.properties
> MyValidator=${label} is niet goed
> Igor also asked for package level resource bundles

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WICKET-1103) Allow custom validators to provide their own resourcebundles

Posted by "Frank Bille Jensen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-1103?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Frank Bille Jensen updated WICKET-1103:
---------------------------------------

    Fix Version/s:     (was: 1.4-M2)
                   1.4-M3

> Allow custom validators to provide their own resourcebundles
> ------------------------------------------------------------
>
>                 Key: WICKET-1103
>                 URL: https://issues.apache.org/jira/browse/WICKET-1103
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.4-M1
>            Reporter: Martijn Dashorst
>            Assignee: Juergen Donnerstag
>             Fix For: 1.4-M3
>
>
> Basically allow the following to work:
> public class MyValidator extends AbstractValidator {
>    protected void onValidate(IValidatable v) {
>        error(v);
>    }
> }
> MyValidator.properties
> MyValidator=${label} is invalid
> MyValidator_nl.properties
> MyValidator=${label} is niet goed
> Igor also asked for package level resource bundles

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (WICKET-1103) Allow custom validators to provide their own resourcebundles

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-1103?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Igor Vaynberg reassigned WICKET-1103:
-------------------------------------

    Assignee: Igor Vaynberg

> Allow custom validators to provide their own resourcebundles
> ------------------------------------------------------------
>
>                 Key: WICKET-1103
>                 URL: https://issues.apache.org/jira/browse/WICKET-1103
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.4-M1
>            Reporter: Martijn Dashorst
>            Assignee: Igor Vaynberg
>             Fix For: 1.5-M1
>
>
> Basically allow the following to work:
> public class MyValidator extends AbstractValidator {
>    protected void onValidate(IValidatable v) {
>        error(v);
>    }
> }
> MyValidator.properties
> MyValidator=${label} is invalid
> MyValidator_nl.properties
> MyValidator=${label} is niet goed
> Igor also asked for package level resource bundles

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WICKET-1103) Support validator and package level resource bundles

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-1103?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Igor Vaynberg updated WICKET-1103:
----------------------------------

    Summary: Support validator and package level resource bundles  (was: Allow custom validators to provide their own resourcebundles)

> Support validator and package level resource bundles
> ----------------------------------------------------
>
>                 Key: WICKET-1103
>                 URL: https://issues.apache.org/jira/browse/WICKET-1103
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.4-M1
>            Reporter: Martijn Dashorst
>            Assignee: Igor Vaynberg
>             Fix For: 1.4-M4
>
>
> Basically allow the following to work:
> public class MyValidator extends AbstractValidator {
>    protected void onValidate(IValidatable v) {
>        error(v);
>    }
> }
> MyValidator.properties
> MyValidator=${label} is invalid
> MyValidator_nl.properties
> MyValidator=${label} is niet goed
> Igor also asked for package level resource bundles

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WICKET-1103) Allow custom validators to provide their own resourcebundles

Posted by "Frank Bille Jensen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-1103?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Frank Bille Jensen updated WICKET-1103:
---------------------------------------

    Fix Version/s:     (was: 1.4-M1)
                   1.4-M2

> Allow custom validators to provide their own resourcebundles
> ------------------------------------------------------------
>
>                 Key: WICKET-1103
>                 URL: https://issues.apache.org/jira/browse/WICKET-1103
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.4-M1
>            Reporter: Martijn Dashorst
>            Assignee: Juergen Donnerstag
>             Fix For: 1.4-M2
>
>
> Basically allow the following to work:
> public class MyValidator extends AbstractValidator {
>    protected void onValidate(IValidatable v) {
>        error(v);
>    }
> }
> MyValidator.properties
> MyValidator=${label} is invalid
> MyValidator_nl.properties
> MyValidator=${label} is niet goed
> Igor also asked for package level resource bundles

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Reopened: (WICKET-1103) Allow custom validators to provide their own resourcebundles

Posted by "Martijn Dashorst (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-1103?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martijn Dashorst reopened WICKET-1103:
--------------------------------------


The idea is to fold this into core so it works "out of the box"

> Allow custom validators to provide their own resourcebundles
> ------------------------------------------------------------
>
>                 Key: WICKET-1103
>                 URL: https://issues.apache.org/jira/browse/WICKET-1103
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.4-M1
>            Reporter: Martijn Dashorst
>            Assignee: Juergen Donnerstag
>             Fix For: 1.4-M1
>
>
> Basically allow the following to work:
> public class MyValidator extends AbstractValidator {
>    protected void onValidate(IValidatable v) {
>        error(v);
>    }
> }
> MyValidator.properties
> MyValidator=${label} is invalid
> MyValidator_nl.properties
> MyValidator=${label} is niet goed
> Igor also asked for package level resource bundles

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.