[jaxx] branch develop updated (ab544ac -> 2e96c9f)
This is an automated email from the git hooks/post-receive script. New change to branch develop in repository jaxx. See http://git.nuiton.org/jaxx.git from ab544ac Merge branch 'feature/3305' into develop new 098c0ce fix typo new 594bd24 use non deprecated API new 2e96c9f refs #3513, introduce a SwingListValidatior constructors The 3 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Detailed log of new commits: commit 2e96c9fc7b2ac7033014f5e0df87185ad7e92e3e Author: Tony CHEMIT <chemit@codelutin.com> Date: Thu Sep 18 11:40:21 2014 +0200 refs #3513, introduce a SwingListValidatior constructors commit 594bd243978d71cab1ec90bc1782de2f3d4698f1 Author: Tony CHEMIT <chemit@codelutin.com> Date: Thu Sep 18 11:24:07 2014 +0200 use non deprecated API commit 098c0ce073ae7fd3f7a55f3de1cd8ff787ed87ab Author: Tony CHEMIT <chemit@codelutin.com> Date: Thu Sep 18 11:23:56 2014 +0200 fix typo Summary of changes: .../application/swing/table/ColumnIdentifier.java | 6 +- .../validator/swing/SwingListValidator.java | 71 ++++++++++++++++++++++ src/site/rst/index.rst | 2 +- 3 files changed, 75 insertions(+), 4 deletions(-) -- To stop receiving notification emails like this one, please contact nuiton.org SCM administrator <admin+scm@nuiton.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository jaxx. See http://git.nuiton.org/jaxx.git commit 098c0ce073ae7fd3f7a55f3de1cd8ff787ed87ab Author: Tony CHEMIT <chemit@codelutin.com> Date: Thu Sep 18 11:23:56 2014 +0200 fix typo --- src/site/rst/index.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/site/rst/index.rst b/src/site/rst/index.rst index ae3356a..5fb8294 100644 --- a/src/site/rst/index.rst +++ b/src/site/rst/index.rst @@ -190,7 +190,7 @@ Cela a entrainé un certain nombre de modification dans l'api de jaxx. Notamment propriétés de type JavaBean et la maintenance de l'ancienne et la nouvelle api aurait été trop compliquée et confuse. -Dans la version 2.3.x ou 2.4 une documentation complête va être écrite +Dans la version 2.3.x ou 2.4 une documentation complète va être écrite concernant l'utilisation de la validation avec JAXX, en attendant un nouveau tutorial jaxx-tutorial-validation a été écrit pour aider un peu (seul l'application est écrite, sans documentation pour le moment...) et la page -- To stop receiving notification emails like this one, please contact nuiton.org SCM administrator <admin+scm@nuiton.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository jaxx. See http://git.nuiton.org/jaxx.git commit 594bd243978d71cab1ec90bc1782de2f3d4698f1 Author: Tony CHEMIT <chemit@codelutin.com> Date: Thu Sep 18 11:24:07 2014 +0200 use non deprecated API --- .../org/nuiton/jaxx/application/swing/table/ColumnIdentifier.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/jaxx-application-swing/src/main/java/org/nuiton/jaxx/application/swing/table/ColumnIdentifier.java b/jaxx-application-swing/src/main/java/org/nuiton/jaxx/application/swing/table/ColumnIdentifier.java index d9899d7..c10c9b7 100644 --- a/jaxx-application-swing/src/main/java/org/nuiton/jaxx/application/swing/table/ColumnIdentifier.java +++ b/jaxx-application-swing/src/main/java/org/nuiton/jaxx/application/swing/table/ColumnIdentifier.java @@ -22,7 +22,7 @@ package org.nuiton.jaxx.application.swing.table; * #L% */ -import org.nuiton.jaxx.application.ApplicationDataUtil; +import org.nuiton.jaxx.application.bean.JavaBeanObjectUtil; import java.io.Serializable; @@ -89,14 +89,14 @@ public class ColumnIdentifier<R> implements Serializable { public Object getValue(R entry) { Object result = null; if (propertyName != null && entry != null) { - result = ApplicationDataUtil.getProperty(entry, propertyName); + result = JavaBeanObjectUtil.getProperty(entry, propertyName); } return result; } public void setValue(R entry, Object value) { if (propertyName != null) { - ApplicationDataUtil.setProperty(entry, propertyName, value); + JavaBeanObjectUtil.setProperty(entry, propertyName, value); } } -- To stop receiving notification emails like this one, please contact nuiton.org SCM administrator <admin+scm@nuiton.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository jaxx. See http://git.nuiton.org/jaxx.git commit 2e96c9fc7b2ac7033014f5e0df87185ad7e92e3e Author: Tony CHEMIT <chemit@codelutin.com> Date: Thu Sep 18 11:40:21 2014 +0200 refs #3513, introduce a SwingListValidatior constructors --- .../validator/swing/SwingListValidator.java | 71 ++++++++++++++++++++++ 1 file changed, 71 insertions(+) diff --git a/jaxx-validator/src/main/java/jaxx/runtime/validator/swing/SwingListValidator.java b/jaxx-validator/src/main/java/jaxx/runtime/validator/swing/SwingListValidator.java index 4a756a3..36c1d03 100644 --- a/jaxx-validator/src/main/java/jaxx/runtime/validator/swing/SwingListValidator.java +++ b/jaxx-validator/src/main/java/jaxx/runtime/validator/swing/SwingListValidator.java @@ -22,8 +22,11 @@ package jaxx.runtime.validator.swing; * #L% */ +import com.google.common.base.Preconditions; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; +import org.nuiton.validator.NuitonValidator; +import org.nuiton.validator.NuitonValidatorFactory; import org.nuiton.validator.NuitonValidatorProvider; import org.nuiton.validator.NuitonValidatorScope; import org.nuiton.validator.bean.list.BeanListValidator; @@ -41,6 +44,74 @@ public class SwingListValidator<B> extends BeanListValidator<B> { /** Logger */ private static final Log log = LogFactory.getLog(SwingListValidator.class); + /** + * Obtain a new {@link SwingListValidator} for the given parameters. + * + * <b>Note:</b> It will use the default provider of {@link NuitonValidator} + * + * @param type type of bean to validate + * @param context context of validation + * @param scopes authorized scopes (if {@code null}, will use all scopes) + * @param <O> type of bean to validate + * @return the new instanciated {@link BeanListValidator}. + * @throws NullPointerException if type is {@code null} + * @see NuitonValidatorFactory#getDefaultProviderName() + */ + public static <O> SwingListValidator<O> newSwingValidator(Class<O> type, + String context, + NuitonValidatorScope... scopes) throws NullPointerException { + + + // get the provider default name + String providerName = NuitonValidatorFactory.getDefaultProviderName(); + + // get the bean validator with this provider + SwingListValidator<O> beanValidator = newSwingValidator(providerName, + type, + context, + scopes + ); + return beanValidator; + } + + /** + * Obtain a new {@link SwingListValidator} for the given parameters. + * + * <b>Note:</b> It will use the provider of {@link NuitonValidator} + * defined by the {@code providerName}. + * + * @param providerName name of {@link NuitonValidator} to use + * @param type type of bean to validate + * @param context context of validation + * @param scopes authorized scopes (if {@code null}, will use all scopes) + * @param <O> type of bean to validate + * @return the new instanciated {@link BeanListValidator}. + * @throws NullPointerException if type is {@code null} + * @see NuitonValidatorFactory#getProvider(String) + */ + public static <O> SwingListValidator<O> newSwingValidator(String providerName, + Class<O> type, + String context, + NuitonValidatorScope... scopes) throws NullPointerException { + + Preconditions.checkNotNull(type, "type parameter can not be null."); + + // get delegate validator provider + NuitonValidatorProvider provider = + NuitonValidatorFactory.getProvider(providerName); + + Preconditions.checkState( + provider != null, + "Could not find provider with name " + providerName); + + // create the new instance of bean validator + SwingListValidator<O> validator = new SwingListValidator<O>( + provider, type, context, scopes + ); + + return validator; + } + protected JComponent editor; public SwingListValidator(NuitonValidatorProvider validatorProvider, Class<B> beanClass, String context) { -- To stop receiving notification emails like this one, please contact nuiton.org SCM administrator <admin+scm@nuiton.org>.
participants (1)
-
nuiton.org scm