Buix-commits
Threads by month
- ----- 2026 -----
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
October 2008
- 2 participants
- 150 discussions
r1000 - in lutinjaxx/trunk/jaxx-core: . src/main/java/jaxx/runtime src/main/java/jaxx/runtime/validator
by tchemit@users.labs.libre-entreprise.org 27 Oct '08
by tchemit@users.labs.libre-entreprise.org 27 Oct '08
27 Oct '08
Author: tchemit
Date: 2008-10-27 11:08:21 +0000 (Mon, 27 Oct 2008)
New Revision: 1000
Modified:
lutinjaxx/trunk/jaxx-core/changelog
lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/runtime/Util.java
lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/runtime/validator/BeanValidator.java
lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/runtime/validator/BeanValidatorErrorListModel.java
Log:
add conversion support in validator
Modified: lutinjaxx/trunk/jaxx-core/changelog
===================================================================
--- lutinjaxx/trunk/jaxx-core/changelog 2008-10-27 10:40:48 UTC (rev 999)
+++ lutinjaxx/trunk/jaxx-core/changelog 2008-10-27 11:08:21 UTC (rev 1000)
@@ -1,4 +1,5 @@
ver-0-6 chemit 200811??
+ * 20081027 [chemit] add conversion support in validator
* 20081025 [chemit] improve BeanValidator tag :
- add a errorList attribute for set a ErrorListMouseListener on the errorList
- add a beanInitializer attribute for set the validator's bean at runtime
Modified: lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/runtime/Util.java
===================================================================
--- lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/runtime/Util.java 2008-10-27 10:40:48 UTC (rev 999)
+++ lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/runtime/Util.java 2008-10-27 11:08:21 UTC (rev 1000)
@@ -1,5 +1,6 @@
package jaxx.runtime;
+import jaxx.runtime.validator.BeanValidator;
import jaxx.runtime.validator.ErrorListMouseListener;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -276,6 +277,38 @@
}
/**
+ * Convert a value to a given type and then if was succesffull try to set it in the bean manage by the validator.
+ *
+ * @param validator validator to be involved
+ * @param fieldName the name of the bean property
+ * @param value the actual value to convert
+ * @param valueClass the type of the conversion
+ */
+ public static void convert(BeanValidator<?> validator, String fieldName, String value, Class<?> valueClass) {
+
+ Object result = validator.convert(fieldName, value, valueClass);
+ if (result != null) {
+ try {
+ BeanInfo info = Introspector.getBeanInfo(validator.getBean().getClass());
+
+ for (PropertyDescriptor descriptor : info.getPropertyDescriptors()) {
+ if (fieldName.equals(descriptor.getName()) && descriptor.getWriteMethod() != null) {
+
+ descriptor.getWriteMethod().invoke(validator.getBean(), result);
+ break;
+ }
+ }
+ } catch (IntrospectionException e) {
+ log.error("could not obtain beanInfo for " + valueClass.getClass() + ", reason : " + e.getMessage(), e);
+ } catch (InvocationTargetException e) {
+ log.error("could not obtain beanInfo for " + valueClass.getClass() + ", reason : " + e.getMessage(), e);
+ } catch (IllegalAccessException e) {
+ log.error("could not obtain beanInfo for " + valueClass.getClass() + ", reason : " + e.getMessage(), e);
+ }
+ }
+ }
+
+ /**
* recherche les composants portant le meme nom que les champs de la classe
* clazz. Cette methode est statique pour pouvoir eventuellement l'utiliser
* dans un autre context (je pense par exemple a la generation jaxx).
Modified: lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/runtime/validator/BeanValidator.java
===================================================================
--- lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/runtime/validator/BeanValidator.java 2008-10-27 10:40:48 UTC (rev 999)
+++ lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/runtime/validator/BeanValidator.java 2008-10-27 11:08:21 UTC (rev 1000)
@@ -32,13 +32,17 @@
import com.opensymphony.xwork2.validator.ValidationException;
import jaxx.runtime.validator.ui.AbstractBeanValidatorUI;
import jaxx.runtime.validator.ui.IconValidationUI;
+import org.apache.commons.beanutils.ConversionException;
+import org.apache.commons.beanutils.Converter;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.codelutin.util.ConverterUtil;
import org.jdesktop.jxlayer.JXLayer;
import javax.swing.JComponent;
import javax.swing.SwingUtilities;
import java.awt.Container;
+import java.beans.Introspector;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;
@@ -46,8 +50,12 @@
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.Collection;
+import java.util.Collections;
import java.util.HashMap;
+import java.util.List;
import java.util.Map;
+import java.util.Map.Entry;
+import java.util.TreeMap;
/**
* <p/>
@@ -153,17 +161,20 @@
/** Object servant a contenir la liste des erreurs */
protected BeanValidatorErrorListModel errorListModel;
- /** ui renderer class*/
+ /** ui renderer class */
protected Class<? extends AbstractBeanValidatorUI> uiClass;
/** validator context */
protected ActionContext context;
-
+
+ protected Map<String, String> conversionErrors;
+
public BeanValidator() {
pcs = new PropertyChangeSupport(this);
validationSupport = new ValidationAwareSupport();
validationContext = new DelegatingValidatorContext(validationSupport);
fieldRepresentation = new HashMap<String, JComponent>();
+ conversionErrors = new TreeMap<String, String>();
}
public BeanValidatorErrorListModel getErrorListModel() {
@@ -229,6 +240,9 @@
public void setBean(T bean) {
T oldBean = this.bean;
+
+ // clean conversions of previous bean
+ conversionErrors.clear();
if (this.bean != null) {
try {
Method method = this.bean.getClass().getMethod("removePropertyChangeListener", PropertyChangeListener.class);
@@ -261,7 +275,7 @@
/** @return <code>true</code> if errors are detected, <code>false</code> otherwise */
public boolean hasErrors() {
//todo should also detecte actionErrors ?
- return validationContext.hasFieldErrors();
+ return validationContext.hasFieldErrors() || !conversionErrors.isEmpty();
//return validationContext.hasFieldErrors() || validationContext.hasActionErrors();
}
@@ -277,6 +291,10 @@
return validationContext.getActionMessages();
}
+ public Map<String, String> getConversionErrors() {
+ return conversionErrors;
+ }
+
/** install ui on required components */
public void installUIs() {
SwingUtilities.invokeLater(new Runnable() {
@@ -298,6 +316,52 @@
}
/**
+ * Convert a value.
+ * <p/>
+ * If an error occurs, then add an error in validator.
+ *
+ * @param fieldName the name of the bean property
+ * @param value the value to convert
+ * @param valueClass the type of converted value
+ * @return the converted value, or null if conversion was not ok
+ */
+ public <T> T convert(String fieldName, String value, Class<T> valueClass) {
+ if (valueClass == null) {
+ throw new IllegalArgumentException("valueClass can not be null");
+ }
+
+ // on ne convertit pas si il y a un bean et que le resultat de la validation
+ // pourra etre affiche quelque part
+ if (bean == null || getErrorListModel() == null || fieldRepresentation.size() == 0 || value == null) {
+ return null;
+ }
+
+ // remove the previous conversion error for the field
+ conversionErrors.remove(fieldName);
+
+ T result;
+ try {
+ Converter converter = ConverterUtil.getConverter(valueClass);
+ if (converter == null) {
+ throw new RuntimeException("could not find converter for the type " + valueClass);
+ }
+ result = (T) converter.convert(valueClass, value);
+ if (result != null && !value.equals(result.toString())) {
+ conversionErrors.put(fieldName, "error.convertor." + Introspector.decapitalize(valueClass.getSimpleName()));
+ result = null;
+ validate();
+ }
+ } catch (ConversionException e) {
+ // get
+ conversionErrors.put(fieldName, "error.convertor." + Introspector.decapitalize(valueClass.getSimpleName()));
+ result = null;
+ validate();
+ }
+
+ return result;
+ }
+
+ /**
* il faut eviter le code re-intrant (durant une validation, une autre est
* demandee). Pour cela on fait la validation dans un thread, et tant
* que la premiere validation n'est pas fini, on ne repond pas aux
@@ -319,6 +383,9 @@
getValidator().validate(bean, null, validationContext);
+ // add the registred conversion errors
+ transfertConversionErrorsToFieldErrors();
+
if (log.isDebugEnabled()) {
log.debug("Action errors: " + validationContext.getActionErrors());
log.debug("Action messages: " + validationContext.getActionMessages());
@@ -357,7 +424,7 @@
ActionValidatorManager.class, "no-annotations");
}
//TC - 20081024 : since context is in a ThreadLocal variable, we must do the check
- if (ActionContext.getContext()==null) {
+ if (ActionContext.getContext() == null) {
ActionContext.setContext(context);
}
return validator;
@@ -387,6 +454,29 @@
}
}
+ /**
+ * Transfer the registred conversion errors to fieldErrors.
+ * <p/>
+ * The previously filed errors of a given field where a conversion error occurs will be removed.
+ */
+ protected void transfertConversionErrorsToFieldErrors() {
+ Map map = getFieldErrors();
+ for (Entry<String, String> entry : conversionErrors.entrySet()) {
+ // remove from validation, errors occurs on this field
+ List errors = (List) map.get(entry.getKey());
+ if (errors != null) {
+ errors.clear();
+ errors.add(entry.getValue());
+ } else {
+ errors = Collections.singletonList(entry.getValue());
+ }
+ // add the concrete conversion error
+ map.put(entry.getKey(), errors);
+ }
+ validationContext.setFieldErrors(map);
+ }
+
+
protected class Listener implements PropertyChangeListener {
public void propertyChange(PropertyChangeEvent evt) {
Modified: lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/runtime/validator/BeanValidatorErrorListModel.java
===================================================================
--- lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/runtime/validator/BeanValidatorErrorListModel.java 2008-10-27 10:40:48 UTC (rev 999)
+++ lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/runtime/validator/BeanValidatorErrorListModel.java 2008-10-27 11:08:21 UTC (rev 1000)
@@ -93,7 +93,6 @@
Map.Entry<?, ?> r = (Map.Entry<?, ?>) o;
BeanValidatorError<T> error;
String field = (String) r.getKey();
-
JComponent component = validator.getFieldRepresentation(field);
if (component!=null) {
for (Object errorString : (List<?>) r.getValue()) {
1
0
r999 - in lutinjaxx/trunk/maven-jaxx-plugin/src/test: java/org/codelutin/jaxx resources/testcases resources/testcases/bug_1722
by tchemit@users.labs.libre-entreprise.org 27 Oct '08
by tchemit@users.labs.libre-entreprise.org 27 Oct '08
27 Oct '08
Author: tchemit
Date: 2008-10-27 10:40:48 +0000 (Mon, 27 Oct 2008)
New Revision: 999
Added:
lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/Bug1722Test.java
lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/Bug_1722.xml
lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/bug_1722/
lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/bug_1722/DemoPanel.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/bug_1722/JButtonDemo.jaxx
Log:
add test to solve bug 1722... so actually maven-jaxx-plugin will not successfull compile since to that bug.
Added: lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/Bug1722Test.java
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/Bug1722Test.java (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/Bug1722Test.java 2008-10-27 10:40:48 UTC (rev 999)
@@ -0,0 +1,17 @@
+package org.codelutin.jaxx;
+
+import java.io.File;
+
+/** @author chemit */
+public class Bug1722Test extends JaxxBaseTest {
+
+ protected String prefix = "src" + File.separator + "test" + File.separator + "resources" + File.separator + "testcases" + File.separator;
+
+ public String getPrefix() {
+ return prefix;
+ }
+ public void testBug_1722() throws Exception {
+ mojo.execute();
+ assertEquals(2, mojo.getFiles().length);
+ }
+}
Copied: lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/Bug_1722.xml (from rev 948, lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/ClassReferences.xml)
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/Bug_1722.xml (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/Bug_1722.xml 2008-10-27 10:40:48 UTC (rev 999)
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codelutin</groupId>
+ <artifactId>maven-jaxx-plugin</artifactId>
+ <configuration>
+ <src>${basedir}/src/test/resources</src>
+ <outJava>${basedir}/target/it-generated-source/java</outJava>
+ <outResource>${basedir}/target/it-generated-source/resources</outResource>
+ <force>true</force>
+ <includes>
+ <value>**/bug_1722/*.jaxx</value>
+ </includes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
Property changes on: lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/Bug_1722.xml
___________________________________________________________________
Name: svn:mergeinfo
+
Copied: lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/bug_1722/DemoPanel.jaxx (from rev 948, lutinjaxx/trunk/jaxx-example/Components/src/main/java/examples/Components/DemoPanel.jaxx)
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/bug_1722/DemoPanel.jaxx (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/bug_1722/DemoPanel.jaxx 2008-10-27 10:40:48 UTC (rev 999)
@@ -0,0 +1,7 @@
+<JTabbedPane id='top'>
+ <tab title='Title'>
+ <JPanel id='demoPanel'>
+ <JLabel text='override'/>
+ </JPanel>
+ </tab>
+</JTabbedPane>
\ No newline at end of file
Property changes on: lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/bug_1722/DemoPanel.jaxx
___________________________________________________________________
Name: svn:mergeinfo
+
Copied: lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/bug_1722/JButtonDemo.jaxx (from rev 948, lutinjaxx/trunk/jaxx-example/Components/src/main/java/examples/Components/JButtonDemo.jaxx)
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/bug_1722/JButtonDemo.jaxx (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/bug_1722/JButtonDemo.jaxx 2008-10-27 10:40:48 UTC (rev 999)
@@ -0,0 +1,5 @@
+<DemoPanel>
+ <JPanel id='demoPanel'>
+ <JLabel text='override'/>
+ </JPanel>
+</DemoPanel>
\ No newline at end of file
Property changes on: lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/bug_1722/JButtonDemo.jaxx
___________________________________________________________________
Name: svn:mergeinfo
+
1
0
r998 - in lutinjaxx/trunk/jaxx-core/src/main: java/jaxx/runtime/validator java/jaxx/runtime/validator/field resources
by tchemit@users.labs.libre-entreprise.org 26 Oct '08
by tchemit@users.labs.libre-entreprise.org 26 Oct '08
26 Oct '08
Author: tchemit
Date: 2008-10-26 14:37:30 +0000 (Sun, 26 Oct 2008)
New Revision: 998
Added:
lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/runtime/validator/field/
lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/runtime/validator/field/ExistingDirectoryFieldValidator.java
lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/runtime/validator/field/ExistingFileFieldValidator.java
lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/runtime/validator/field/NotExistingDirectoryFieldValidator.java
lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/runtime/validator/field/NotExistingFileFieldValidator.java
lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/runtime/validator/field/RequiredFileFieldValidator.java
Removed:
lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/runtime/validator/ExistingDirectoryFieldValidator.java
lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/runtime/validator/ExistingFileFieldValidator.java
lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/runtime/validator/NotExistingDirectoryFieldValidator.java
lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/runtime/validator/NotExistingFileFieldValidator.java
lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/runtime/validator/RequiredFileFieldValidator.java
Modified:
lutinjaxx/trunk/jaxx-core/src/main/resources/validators.xml
Log:
create package field
Deleted: lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/runtime/validator/ExistingDirectoryFieldValidator.java
===================================================================
--- lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/runtime/validator/ExistingDirectoryFieldValidator.java 2008-10-25 19:57:53 UTC (rev 997)
+++ lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/runtime/validator/ExistingDirectoryFieldValidator.java 2008-10-26 14:37:30 UTC (rev 998)
@@ -1,72 +0,0 @@
-package jaxx.runtime.validator;
-
-import com.opensymphony.xwork2.validator.ValidationException;
-import com.opensymphony.xwork2.validator.validators.FieldValidatorSupport;
-
-import java.io.File;
-
-/**
- * <!-- START SNIPPET: javadoc -->
- * ExistingDirectoryFieldValidator checks that a File field exists and is a directory.
- * <!-- END SNIPPET: javadoc -->
- * <p/>
- * <p/>
- * <!-- START SNIPPET: parameters -->
- * <ul>
- * <li>fieldName - The field name this validator is validating. Required if using Plain-Validator Syntax otherwise not required</li>
- * </ul>
- * <!-- END SNIPPET: parameters -->
- * <p/>
- * <p/>
- * <pre>
- * <!-- START SNIPPET: examples -->
- * <validators>
- * <!-- Plain-Validator Syntax -->
- * <validator type="existingDirectory">
- * <param name="fieldName">tmp</param>
- * <message>tmp is not an existing directory</message>
- * </validator>
- * <p/>
- * <!-- Field-Validator Syntax -->
- * <field name="tmp">
- * <field-validator type="existingDirectory">
- * <message>tmp is not an existing directory</message>
- * </field-validator>
- * </field>
- * </validators>
- * <!-- END SNIPPET: examples -->
- * </pre>
- *
- * @author chemit
- */
-public class ExistingDirectoryFieldValidator extends FieldValidatorSupport {
-
- public void validate(Object object) throws ValidationException {
- String fieldName = getFieldName();
- Object value = this.getFieldValue(fieldName, object);
- if (value==null) {
- // no value defined
- addFieldError(fieldName, object);
- return;
- }
- File f;
- if (value instanceof File) {
- f = (File) value;
- } else if (value instanceof String) {
- f = new File((String) value);
- } else {
- addFieldError(fieldName, object);
- return;
- }
-
- if (!(f.isDirectory() && f.exists())) {
- // f is not a directory, nor exists
- addFieldError(fieldName, object);
- }
- }
-
- @Override
- public String getValidatorType() {
- return "existingDirectory";
- }
-}
\ No newline at end of file
Deleted: lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/runtime/validator/ExistingFileFieldValidator.java
===================================================================
--- lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/runtime/validator/ExistingFileFieldValidator.java 2008-10-25 19:57:53 UTC (rev 997)
+++ lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/runtime/validator/ExistingFileFieldValidator.java 2008-10-26 14:37:30 UTC (rev 998)
@@ -1,72 +0,0 @@
-package jaxx.runtime.validator;
-
-import com.opensymphony.xwork2.validator.ValidationException;
-import com.opensymphony.xwork2.validator.validators.FieldValidatorSupport;
-
-import java.io.File;
-
-/**
- * <!-- START SNIPPET: javadoc -->
- * ExistingFileFieldValidator checks that a File field exists. *
- * <!-- END SNIPPET: javadoc -->
- * <p/>
- * <p/>
- * <!-- START SNIPPET: parameters -->
- * <ul>
- * <li>fieldName - The field name this validator is validating. Required if using Plain-Validator Syntax otherwise not required</li>
- * </ul>
- * <!-- END SNIPPET: parameters -->
- * <p/>
- * <p/>
- * <pre>
- * <!-- START SNIPPET: examples -->
- * <validators>
- * <!-- Plain-Validator Syntax -->
- * <validator type="fileExisting">
- * <param name="fieldName">tmp</param>
- * <message>tmp is not an existing file</message>
- * </validator>
- * <p/>
- * <!-- Field-Validator Syntax -->
- * <field name="tmp">
- * <field-validator type="fileExisting">
- * <message>tmp is not an existing file</message>
- * </field-validator>
- * </field>
- * </validators>
- * <!-- END SNIPPET: examples -->
- * </pre>
- *
- * @author chemit
- */
-public class ExistingFileFieldValidator extends FieldValidatorSupport {
-
- public void validate(Object object) throws ValidationException {
- String fieldName = getFieldName();
- Object value = this.getFieldValue(fieldName, object);
- if (value == null) {
- // no value defined
- addFieldError(fieldName, object);
- return;
- }
- File f;
- if (value instanceof File) {
- f = (File) value;
- } else if (value instanceof String) {
- f = new File((String) value);
- } else {
- addFieldError(fieldName, object);
- return;
- }
-
- if (!(f.isFile() && f.exists())) {
- // f is not a file nor exists
- addFieldError(fieldName, object);
- }
- }
-
- @Override
- public String getValidatorType() {
- return "existingFile";
- }
-}
Deleted: lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/runtime/validator/NotExistingDirectoryFieldValidator.java
===================================================================
--- lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/runtime/validator/NotExistingDirectoryFieldValidator.java 2008-10-25 19:57:53 UTC (rev 997)
+++ lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/runtime/validator/NotExistingDirectoryFieldValidator.java 2008-10-26 14:37:30 UTC (rev 998)
@@ -1,72 +0,0 @@
-package jaxx.runtime.validator;
-
-import com.opensymphony.xwork2.validator.ValidationException;
-import com.opensymphony.xwork2.validator.validators.FieldValidatorSupport;
-
-import java.io.File;
-
-/**
- * <!-- START SNIPPET: javadoc -->
- * NotExistingDirectoryFieldValidator checks that a File field as a directory does not exist. *
- * <!-- END SNIPPET: javadoc -->
- * <p/>
- * <p/>
- * <!-- START SNIPPET: parameters -->
- * <ul>
- * <li>fieldName - The field name this validator is validating. Required if using Plain-Validator Syntax otherwise not required</li>
- * </ul>
- * <!-- END SNIPPET: parameters -->
- * <p/>
- * <p/>
- * <pre>
- * <!-- START SNIPPET: examples -->
- * <validators>
- * <!-- Plain-Validator Syntax -->
- * <validator type="notExistingDirectory">
- * <param name="fieldName">tmp</param>
- * <message>tmp is an existing directory</message>
- * </validator>
- * <p/>
- * <!-- Field-Validator Syntax -->
- * <field name="tmp">
- * <field-validator type="notExistingDirectory">
- * <message>tmp is an existing directory</message>
- * </field-validator>
- * </field>
- * </validators>
- * <!-- END SNIPPET: examples -->
- * </pre>
- *
- * @author chemit
- */
-public class NotExistingDirectoryFieldValidator extends FieldValidatorSupport {
-
- @Override
- public void validate(Object object) throws ValidationException {
- String fieldName = getFieldName();
- Object value = this.getFieldValue(fieldName, object);
- if (value == null) {
- // no value defined
- addFieldError(fieldName, object);
- return;
- }
- File f;
- if (value instanceof File) {
- f = (File) value;
- } else if (value instanceof String) {
- f = new File((String) value);
- } else {
- addFieldError(fieldName, object);
- return;
- }
-
- if (f.exists() || f.isFile()) {
- addFieldError(fieldName, object);
- }
- }
-
- @Override
- public String getValidatorType() {
- return "notExistingDirectory";
- }
-}
\ No newline at end of file
Deleted: lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/runtime/validator/NotExistingFileFieldValidator.java
===================================================================
--- lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/runtime/validator/NotExistingFileFieldValidator.java 2008-10-25 19:57:53 UTC (rev 997)
+++ lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/runtime/validator/NotExistingFileFieldValidator.java 2008-10-26 14:37:30 UTC (rev 998)
@@ -1,73 +0,0 @@
-package jaxx.runtime.validator;
-
-import com.opensymphony.xwork2.validator.ValidationException;
-import com.opensymphony.xwork2.validator.validators.FieldValidatorSupport;
-
-import java.io.File;
-
-/**
- * <!-- START SNIPPET: javadoc -->
- * NotExistingFileFieldValidator checks that a File field as a file does not exist. *
- * <!-- END SNIPPET: javadoc -->
- * <p/>
- * <p/>
- * <!-- START SNIPPET: parameters -->
- * <ul>
- * <li>fieldName - The field name this validator is validating. Required if using Plain-Validator Syntax otherwise not required</li>
- * </ul>
- * <!-- END SNIPPET: parameters -->
- * <p/>
- * <p/>
- * <pre>
- * <!-- START SNIPPET: examples -->
- * <validators>
- * <!-- Plain-Validator Syntax -->
- * <validator type="notExistingFile">
- * <param name="fieldName">tmp</param>
- * <message>tmp is an existing file</message>
- * </validator>
- * <p/>
- * <!-- Field-Validator Syntax -->
- * <field name="tmp">
- * <field-validator type="notExistingFile">
- * <message>tmp is an existing file</message>
- * </field-validator>
- * </field>
- * </validators>
- * <!-- END SNIPPET: examples -->
- * </pre>
- *
- * @author chemit
- */
-public class NotExistingFileFieldValidator extends FieldValidatorSupport {
-
- @Override
- public void validate(Object object) throws ValidationException {
- String fieldName = getFieldName();
- Object value = this.getFieldValue(fieldName, object);
- if (value==null) {
- // no value defined
- addFieldError(fieldName, object);
- return;
- }
- File f;
- if (value instanceof File) {
- f = (File) value;
- } else if (value instanceof String) {
- f = new File((String) value);
- } else {
- addFieldError(fieldName, object);
- return;
- }
-
- if (f.exists() || f.isDirectory()) {
- // f is not a file and exist
- addFieldError(fieldName, object);
- }
- }
-
- @Override
- public String getValidatorType() {
- return "notExistingFile";
- }
-}
\ No newline at end of file
Deleted: lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/runtime/validator/RequiredFileFieldValidator.java
===================================================================
--- lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/runtime/validator/RequiredFileFieldValidator.java 2008-10-25 19:57:53 UTC (rev 997)
+++ lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/runtime/validator/RequiredFileFieldValidator.java 2008-10-26 14:37:30 UTC (rev 998)
@@ -1,72 +0,0 @@
-package jaxx.runtime.validator;
-
-import com.opensymphony.xwork2.validator.ValidationException;
-import com.opensymphony.xwork2.validator.validators.FieldValidatorSupport;
-
-import java.io.File;
-
-/**
- * <!-- START SNIPPET: javadoc -->
- * RequiredFileFieldValidator checks that a File field is not null nor have an empty filename.
- * <!-- END SNIPPET: javadoc -->
- * <p/>
- * <p/>
- * <!-- START SNIPPET: parameters -->
- * <ul>
- * <li>fieldName - The field name this validator is validating. Required if using Plain-Validator Syntax otherwise not required</li>
- * </ul>
- * <!-- END SNIPPET: parameters -->
- * <p/>
- * <p/>
- * <pre>
- * <!-- START SNIPPET: examples -->
- * <validators>
- * <!-- Plain-Validator Syntax -->
- * <validator type="requiredFile">
- * <param name="fieldName">tmp</param>
- * <message>tmp is required</message>
- * </validator>
- * <p/>
- * <!-- Field-Validator Syntax -->
- * <field name="tmp">
- * <field-validator type="requiredFile">
- * <message>tmp is required</message>
- * </field-validator>
- * </field>
- * </validators>
- * <!-- END SNIPPET: examples -->
- * </pre>
- *
- * @author chemit
- */
-public class RequiredFileFieldValidator extends FieldValidatorSupport {
-
- public void validate(Object object) throws ValidationException {
- String fieldName = getFieldName();
- Object value = this.getFieldValue(fieldName, object);
- if (value == null) {
- // no value defined
- addFieldError(fieldName, object);
- return;
- }
- File f;
- if (value instanceof File) {
- f = (File) value;
- } else if (value instanceof String) {
- f = new File((String) value);
- } else {
- addFieldError(fieldName, object);
- return;
- }
-
- if (f.getPath().trim().isEmpty()) {
- // f is not a directory nor exists
- addFieldError(fieldName, object);
- }
- }
-
- @Override
- public String getValidatorType() {
- return "requiredFile";
- }
-}
\ No newline at end of file
Copied: lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/runtime/validator/field/ExistingDirectoryFieldValidator.java (from rev 981, lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/runtime/validator/ExistingDirectoryFieldValidator.java)
===================================================================
--- lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/runtime/validator/field/ExistingDirectoryFieldValidator.java (rev 0)
+++ lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/runtime/validator/field/ExistingDirectoryFieldValidator.java 2008-10-26 14:37:30 UTC (rev 998)
@@ -0,0 +1,72 @@
+package jaxx.runtime.validator.field;
+
+import com.opensymphony.xwork2.validator.ValidationException;
+import com.opensymphony.xwork2.validator.validators.FieldValidatorSupport;
+
+import java.io.File;
+
+/**
+ * <!-- START SNIPPET: javadoc -->
+ * ExistingDirectoryFieldValidator checks that a File field exists and is a directory.
+ * <!-- END SNIPPET: javadoc -->
+ * <p/>
+ * <p/>
+ * <!-- START SNIPPET: parameters -->
+ * <ul>
+ * <li>fieldName - The field name this validator is validating. Required if using Plain-Validator Syntax otherwise not required</li>
+ * </ul>
+ * <!-- END SNIPPET: parameters -->
+ * <p/>
+ * <p/>
+ * <pre>
+ * <!-- START SNIPPET: examples -->
+ * <validators>
+ * <!-- Plain-Validator Syntax -->
+ * <validator type="existingDirectory">
+ * <param name="fieldName">tmp</param>
+ * <message>tmp is not an existing directory</message>
+ * </validator>
+ * <p/>
+ * <!-- Field-Validator Syntax -->
+ * <field name="tmp">
+ * <field-validator type="existingDirectory">
+ * <message>tmp is not an existing directory</message>
+ * </field-validator>
+ * </field>
+ * </validators>
+ * <!-- END SNIPPET: examples -->
+ * </pre>
+ *
+ * @author chemit
+ */
+public class ExistingDirectoryFieldValidator extends FieldValidatorSupport {
+
+ public void validate(Object object) throws ValidationException {
+ String fieldName = getFieldName();
+ Object value = this.getFieldValue(fieldName, object);
+ if (value==null) {
+ // no value defined
+ addFieldError(fieldName, object);
+ return;
+ }
+ File f;
+ if (value instanceof File) {
+ f = (File) value;
+ } else if (value instanceof String) {
+ f = new File((String) value);
+ } else {
+ addFieldError(fieldName, object);
+ return;
+ }
+
+ if (!(f.isDirectory() && f.exists())) {
+ // f is not a directory, nor exists
+ addFieldError(fieldName, object);
+ }
+ }
+
+ @Override
+ public String getValidatorType() {
+ return "existingDirectory";
+ }
+}
\ No newline at end of file
Copied: lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/runtime/validator/field/ExistingFileFieldValidator.java (from rev 981, lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/runtime/validator/ExistingFileFieldValidator.java)
===================================================================
--- lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/runtime/validator/field/ExistingFileFieldValidator.java (rev 0)
+++ lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/runtime/validator/field/ExistingFileFieldValidator.java 2008-10-26 14:37:30 UTC (rev 998)
@@ -0,0 +1,72 @@
+package jaxx.runtime.validator.field;
+
+import com.opensymphony.xwork2.validator.ValidationException;
+import com.opensymphony.xwork2.validator.validators.FieldValidatorSupport;
+
+import java.io.File;
+
+/**
+ * <!-- START SNIPPET: javadoc -->
+ * ExistingFileFieldValidator checks that a File field exists. *
+ * <!-- END SNIPPET: javadoc -->
+ * <p/>
+ * <p/>
+ * <!-- START SNIPPET: parameters -->
+ * <ul>
+ * <li>fieldName - The field name this validator is validating. Required if using Plain-Validator Syntax otherwise not required</li>
+ * </ul>
+ * <!-- END SNIPPET: parameters -->
+ * <p/>
+ * <p/>
+ * <pre>
+ * <!-- START SNIPPET: examples -->
+ * <validators>
+ * <!-- Plain-Validator Syntax -->
+ * <validator type="fileExisting">
+ * <param name="fieldName">tmp</param>
+ * <message>tmp is not an existing file</message>
+ * </validator>
+ * <p/>
+ * <!-- Field-Validator Syntax -->
+ * <field name="tmp">
+ * <field-validator type="fileExisting">
+ * <message>tmp is not an existing file</message>
+ * </field-validator>
+ * </field>
+ * </validators>
+ * <!-- END SNIPPET: examples -->
+ * </pre>
+ *
+ * @author chemit
+ */
+public class ExistingFileFieldValidator extends FieldValidatorSupport {
+
+ public void validate(Object object) throws ValidationException {
+ String fieldName = getFieldName();
+ Object value = this.getFieldValue(fieldName, object);
+ if (value == null) {
+ // no value defined
+ addFieldError(fieldName, object);
+ return;
+ }
+ File f;
+ if (value instanceof File) {
+ f = (File) value;
+ } else if (value instanceof String) {
+ f = new File((String) value);
+ } else {
+ addFieldError(fieldName, object);
+ return;
+ }
+
+ if (!(f.isFile() && f.exists())) {
+ // f is not a file nor exists
+ addFieldError(fieldName, object);
+ }
+ }
+
+ @Override
+ public String getValidatorType() {
+ return "existingFile";
+ }
+}
Copied: lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/runtime/validator/field/NotExistingDirectoryFieldValidator.java (from rev 981, lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/runtime/validator/NotExistingDirectoryFieldValidator.java)
===================================================================
--- lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/runtime/validator/field/NotExistingDirectoryFieldValidator.java (rev 0)
+++ lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/runtime/validator/field/NotExistingDirectoryFieldValidator.java 2008-10-26 14:37:30 UTC (rev 998)
@@ -0,0 +1,72 @@
+package jaxx.runtime.validator.field;
+
+import com.opensymphony.xwork2.validator.ValidationException;
+import com.opensymphony.xwork2.validator.validators.FieldValidatorSupport;
+
+import java.io.File;
+
+/**
+ * <!-- START SNIPPET: javadoc -->
+ * NotExistingDirectoryFieldValidator checks that a File field as a directory does not exist. *
+ * <!-- END SNIPPET: javadoc -->
+ * <p/>
+ * <p/>
+ * <!-- START SNIPPET: parameters -->
+ * <ul>
+ * <li>fieldName - The field name this validator is validating. Required if using Plain-Validator Syntax otherwise not required</li>
+ * </ul>
+ * <!-- END SNIPPET: parameters -->
+ * <p/>
+ * <p/>
+ * <pre>
+ * <!-- START SNIPPET: examples -->
+ * <validators>
+ * <!-- Plain-Validator Syntax -->
+ * <validator type="notExistingDirectory">
+ * <param name="fieldName">tmp</param>
+ * <message>tmp is an existing directory</message>
+ * </validator>
+ * <p/>
+ * <!-- Field-Validator Syntax -->
+ * <field name="tmp">
+ * <field-validator type="notExistingDirectory">
+ * <message>tmp is an existing directory</message>
+ * </field-validator>
+ * </field>
+ * </validators>
+ * <!-- END SNIPPET: examples -->
+ * </pre>
+ *
+ * @author chemit
+ */
+public class NotExistingDirectoryFieldValidator extends FieldValidatorSupport {
+
+ @Override
+ public void validate(Object object) throws ValidationException {
+ String fieldName = getFieldName();
+ Object value = this.getFieldValue(fieldName, object);
+ if (value == null) {
+ // no value defined
+ addFieldError(fieldName, object);
+ return;
+ }
+ File f;
+ if (value instanceof File) {
+ f = (File) value;
+ } else if (value instanceof String) {
+ f = new File((String) value);
+ } else {
+ addFieldError(fieldName, object);
+ return;
+ }
+
+ if (f.exists() || f.isFile()) {
+ addFieldError(fieldName, object);
+ }
+ }
+
+ @Override
+ public String getValidatorType() {
+ return "notExistingDirectory";
+ }
+}
\ No newline at end of file
Copied: lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/runtime/validator/field/NotExistingFileFieldValidator.java (from rev 981, lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/runtime/validator/NotExistingFileFieldValidator.java)
===================================================================
--- lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/runtime/validator/field/NotExistingFileFieldValidator.java (rev 0)
+++ lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/runtime/validator/field/NotExistingFileFieldValidator.java 2008-10-26 14:37:30 UTC (rev 998)
@@ -0,0 +1,73 @@
+package jaxx.runtime.validator.field;
+
+import com.opensymphony.xwork2.validator.ValidationException;
+import com.opensymphony.xwork2.validator.validators.FieldValidatorSupport;
+
+import java.io.File;
+
+/**
+ * <!-- START SNIPPET: javadoc -->
+ * NotExistingFileFieldValidator checks that a File field as a file does not exist. *
+ * <!-- END SNIPPET: javadoc -->
+ * <p/>
+ * <p/>
+ * <!-- START SNIPPET: parameters -->
+ * <ul>
+ * <li>fieldName - The field name this validator is validating. Required if using Plain-Validator Syntax otherwise not required</li>
+ * </ul>
+ * <!-- END SNIPPET: parameters -->
+ * <p/>
+ * <p/>
+ * <pre>
+ * <!-- START SNIPPET: examples -->
+ * <validators>
+ * <!-- Plain-Validator Syntax -->
+ * <validator type="notExistingFile">
+ * <param name="fieldName">tmp</param>
+ * <message>tmp is an existing file</message>
+ * </validator>
+ * <p/>
+ * <!-- Field-Validator Syntax -->
+ * <field name="tmp">
+ * <field-validator type="notExistingFile">
+ * <message>tmp is an existing file</message>
+ * </field-validator>
+ * </field>
+ * </validators>
+ * <!-- END SNIPPET: examples -->
+ * </pre>
+ *
+ * @author chemit
+ */
+public class NotExistingFileFieldValidator extends FieldValidatorSupport {
+
+ @Override
+ public void validate(Object object) throws ValidationException {
+ String fieldName = getFieldName();
+ Object value = this.getFieldValue(fieldName, object);
+ if (value==null) {
+ // no value defined
+ addFieldError(fieldName, object);
+ return;
+ }
+ File f;
+ if (value instanceof File) {
+ f = (File) value;
+ } else if (value instanceof String) {
+ f = new File((String) value);
+ } else {
+ addFieldError(fieldName, object);
+ return;
+ }
+
+ if (f.exists() || f.isDirectory()) {
+ // f is not a file and exist
+ addFieldError(fieldName, object);
+ }
+ }
+
+ @Override
+ public String getValidatorType() {
+ return "notExistingFile";
+ }
+}
\ No newline at end of file
Property changes on: lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/runtime/validator/field/NotExistingFileFieldValidator.java
___________________________________________________________________
Name: svn:mergeinfo
+
Copied: lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/runtime/validator/field/RequiredFileFieldValidator.java (from rev 983, lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/runtime/validator/RequiredFileFieldValidator.java)
===================================================================
--- lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/runtime/validator/field/RequiredFileFieldValidator.java (rev 0)
+++ lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/runtime/validator/field/RequiredFileFieldValidator.java 2008-10-26 14:37:30 UTC (rev 998)
@@ -0,0 +1,72 @@
+package jaxx.runtime.validator.field;
+
+import com.opensymphony.xwork2.validator.ValidationException;
+import com.opensymphony.xwork2.validator.validators.FieldValidatorSupport;
+
+import java.io.File;
+
+/**
+ * <!-- START SNIPPET: javadoc -->
+ * RequiredFileFieldValidator checks that a File field is not null nor have an empty filename.
+ * <!-- END SNIPPET: javadoc -->
+ * <p/>
+ * <p/>
+ * <!-- START SNIPPET: parameters -->
+ * <ul>
+ * <li>fieldName - The field name this validator is validating. Required if using Plain-Validator Syntax otherwise not required</li>
+ * </ul>
+ * <!-- END SNIPPET: parameters -->
+ * <p/>
+ * <p/>
+ * <pre>
+ * <!-- START SNIPPET: examples -->
+ * <validators>
+ * <!-- Plain-Validator Syntax -->
+ * <validator type="requiredFile">
+ * <param name="fieldName">tmp</param>
+ * <message>tmp is required</message>
+ * </validator>
+ * <p/>
+ * <!-- Field-Validator Syntax -->
+ * <field name="tmp">
+ * <field-validator type="requiredFile">
+ * <message>tmp is required</message>
+ * </field-validator>
+ * </field>
+ * </validators>
+ * <!-- END SNIPPET: examples -->
+ * </pre>
+ *
+ * @author chemit
+ */
+public class RequiredFileFieldValidator extends FieldValidatorSupport {
+
+ public void validate(Object object) throws ValidationException {
+ String fieldName = getFieldName();
+ Object value = this.getFieldValue(fieldName, object);
+ if (value == null) {
+ // no value defined
+ addFieldError(fieldName, object);
+ return;
+ }
+ File f;
+ if (value instanceof File) {
+ f = (File) value;
+ } else if (value instanceof String) {
+ f = new File((String) value);
+ } else {
+ addFieldError(fieldName, object);
+ return;
+ }
+
+ if (f.getPath().trim().isEmpty()) {
+ // f is not a directory nor exists
+ addFieldError(fieldName, object);
+ }
+ }
+
+ @Override
+ public String getValidatorType() {
+ return "requiredFile";
+ }
+}
\ No newline at end of file
Property changes on: lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/runtime/validator/field/RequiredFileFieldValidator.java
___________________________________________________________________
Name: svn:mergeinfo
+
Modified: lutinjaxx/trunk/jaxx-core/src/main/resources/validators.xml
===================================================================
--- lutinjaxx/trunk/jaxx-core/src/main/resources/validators.xml 2008-10-25 19:57:53 UTC (rev 997)
+++ lutinjaxx/trunk/jaxx-core/src/main/resources/validators.xml 2008-10-26 14:37:30 UTC (rev 998)
@@ -5,10 +5,10 @@
<!-- START SNIPPET: validators -->
<validators>
- <validator name="requiredFile" class="jaxx.runtime.validator.RequiredFileFieldValidator"/>
- <validator name="existingFile" class="jaxx.runtime.validator.ExistingFileFieldValidator"/>
- <validator name="notExistingFile" class="jaxx.runtime.validator.NotExistingFileFieldValidator"/>
- <validator name="existingDirectory" class="jaxx.runtime.validator.ExistingDirectoryFieldValidator"/>
- <validator name="notExistingDirectory" class="jaxx.runtime.validator.NotExistingDirectoryFieldValidator"/>
+ <validator name="requiredFile" class="jaxx.runtime.validator.field.RequiredFileFieldValidator"/>
+ <validator name="existingFile" class="jaxx.runtime.validator.field.ExistingFileFieldValidator"/>
+ <validator name="notExistingFile" class="jaxx.runtime.validator.field.NotExistingFileFieldValidator"/>
+ <validator name="existingDirectory" class="jaxx.runtime.validator.field.ExistingDirectoryFieldValidator"/>
+ <validator name="notExistingDirectory" class="jaxx.runtime.validator.field.NotExistingDirectoryFieldValidator"/>
</validators>
<!-- END SNIPPET: validators -->
1
0
r997 - in lutinjaxx/trunk/jaxx-core/src/main/java/jaxx: runtime tags/validator
by tchemit@users.labs.libre-entreprise.org 25 Oct '08
by tchemit@users.labs.libre-entreprise.org 25 Oct '08
25 Oct '08
Author: tchemit
Date: 2008-10-25 19:57:53 +0000 (Sat, 25 Oct 2008)
New Revision: 997
Modified:
lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/runtime/Util.java
lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/tags/validator/BeanValidatorHandler.java
Log:
register only one ErrorListMouseListener
Modified: lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/runtime/Util.java
===================================================================
--- lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/runtime/Util.java 2008-10-25 19:47:06 UTC (rev 996)
+++ lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/runtime/Util.java 2008-10-25 19:57:53 UTC (rev 997)
@@ -1,13 +1,16 @@
package jaxx.runtime;
+import jaxx.runtime.validator.ErrorListMouseListener;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.jdesktop.jxlayer.JXLayer;
import javax.swing.JComponent;
+import javax.swing.JList;
import java.awt.Component;
import java.awt.Container;
import java.awt.Dimension;
+import java.awt.event.MouseListener;
import java.beans.BeanInfo;
import java.beans.IntrospectionException;
import java.beans.Introspector;
@@ -343,4 +346,18 @@
layer.add(component);
return layer;
}
+
+ public static void registerErrorListMouseListener(JList list) {
+ if (list == null) {
+ return;
+ }
+ for (MouseListener listener : list.getMouseListeners()) {
+ if (listener instanceof ErrorListMouseListener) {
+ // already have a such listener
+ log.info("already registered a such MouseListener : " + listener);
+ return;
+ }
+ }
+ list.addMouseListener(new ErrorListMouseListener());
+ }
}
Modified: lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/tags/validator/BeanValidatorHandler.java
===================================================================
--- lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/tags/validator/BeanValidatorHandler.java 2008-10-25 19:47:06 UTC (rev 996)
+++ lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/tags/validator/BeanValidatorHandler.java 2008-10-25 19:57:53 UTC (rev 997)
@@ -11,8 +11,8 @@
import jaxx.introspection.JAXXPropertyDescriptor;
import jaxx.reflect.ClassDescriptor;
import jaxx.reflect.ClassDescriptorLoader;
+import jaxx.runtime.Util;
import jaxx.runtime.validator.BeanValidator;
-import jaxx.runtime.validator.ErrorListMouseListener;
import jaxx.runtime.validator.ui.AbstractBeanValidatorUI;
import jaxx.tags.DefaultObjectHandler;
import jaxx.types.TypeManager;
@@ -314,7 +314,7 @@
}
}
- String code = errorList + ".addMouseListener(new " + ErrorListMouseListener.class.getName() + "());";
+ String code = Util.class.getName() + ".registerErrorListMouseListener(" + errorList + ");";
appendAdditionCode(code);
return false;
1
0
r996 - in lutinjaxx/trunk/maven-jaxx-plugin/src/test: java/org/codelutin/jaxx resources/testcases/validator/errors
by tchemit@users.labs.libre-entreprise.org 25 Oct '08
by tchemit@users.labs.libre-entreprise.org 25 Oct '08
25 Oct '08
Author: tchemit
Date: 2008-10-25 19:47:06 +0000 (Sat, 25 Oct 2008)
New Revision: 996
Added:
lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/errors/UnfoundErrorList.jaxx
Modified:
lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/CompilerTest.java
lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/errors/UnfoundErrorListModel.jaxx
Log:
add a errorList attribute for set a ErrorListMouseListener on the errorList
Modified: lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/CompilerTest.java
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/CompilerTest.java 2008-10-25 19:46:47 UTC (rev 995)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/CompilerTest.java 2008-10-25 19:47:06 UTC (rev 996)
@@ -186,7 +186,7 @@
// init mojo to get alls files to treate
mojo.init();
String[] files = mojo.getFiles();
- assertEquals(16, mojo.getFiles().length);
+ assertEquals(17, mojo.getFiles().length);
mojo.setLog(new SystemStreamLog() {
@Override
public boolean isErrorEnabled() {
Copied: lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/errors/UnfoundErrorList.jaxx (from rev 968, lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/errors/UnfoundErrorListModel.jaxx)
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/errors/UnfoundErrorList.jaxx (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/errors/UnfoundErrorList.jaxx 2008-10-25 19:47:06 UTC (rev 996)
@@ -0,0 +1,85 @@
+<Application title="Validation.jaxx">
+
+ <!-- models -->
+ <Model id='model'/>
+
+ <jaxx.runtime.validator.BeanValidatorErrorListModel id='errors'/>
+
+ <!-- validators -->
+ <BeanValidator id='validator' bean='model' errorList='fake'>
+ <field name="text"/>
+ <field name="text2"/>
+ <field name="ratio"/>
+ </BeanValidator>
+ <Table fill='both'>
+ <row>
+ <cell weightx='1' weighty='1' insets='6, 3, 0, 0'>
+ <JPanel border='{BorderFactory.createTitledBorder("Form")}'
+ layout='{new GridLayout()}' width='250' height='120'>
+ <Table anchor='west' fill='both'>
+ <row>
+ <cell>
+ <JLabel text='Text:'/>
+ </cell>
+ <cell weightx='1'>
+ <JTextField id='text' text='{model.getText()}'
+ onKeyReleased='model.setText(text.getText())'/>
+ </cell>
+ </row>
+ <row>
+ <cell>
+ <JLabel text='Text2:'/>
+ </cell>
+ <cell weightx='1'>
+ <JTextField id='text2' text='{model.getText2()}'
+ onKeyReleased='model.setText2(text2.getText())'/>
+ </cell>
+ </row>
+
+ <row>
+ <cell>
+ <JLabel text='Ratio:'/>
+ </cell>
+ <cell>
+ <JSlider id='ratio' minimum='0' maximum='100' value='{model.getRatio()}'
+ onStateChanged='model.setRatio(ratio.getValue())'/>
+ </cell>
+ </row>
+ </Table>
+ </JPanel>
+ </cell>
+ <cell weightx='1' weighty='1' insets='6, 3, 0, 0'>
+ <JPanel border='{BorderFactory.createTitledBorder("Model")}'
+ layout='{new GridLayout()}' width='250' height='120'>
+ <Table anchor='west' fill='both'>
+ <row>
+ <cell>
+ <JLabel text='Text:'/>
+ </cell>
+ <cell weightx='1'>
+ <JLabel text='{model.getText()}'/>
+ </cell>
+ </row>
+ <row>
+ <cell>
+ <JLabel text='Text2:'/>
+ </cell>
+ <cell weightx='1'>
+ <JLabel text='{model.getText2()}'/>
+ </cell>
+ </row>
+
+ <row>
+ <cell>
+ <JLabel text='Ratio:'/>
+ </cell>
+ <cell>
+ <JLabel text='{model.getRatio()}'/>
+ </cell>
+ </row>
+ </Table>
+ </JPanel>
+ </cell>
+ </row>
+ </Table>
+</Application>
Property changes on: lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/errors/UnfoundErrorList.jaxx
___________________________________________________________________
Name: svn:mergeinfo
+
Modified: lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/errors/UnfoundErrorListModel.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/errors/UnfoundErrorListModel.jaxx 2008-10-25 19:46:47 UTC (rev 995)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/errors/UnfoundErrorListModel.jaxx 2008-10-25 19:47:06 UTC (rev 996)
@@ -2,23 +2,13 @@
<!-- models -->
<Model id='model'/>
- <Model id='model2'/>
- <!-- errors model -->
- <jaxx.runtime.validator.BeanValidatorErrorListModel id='errors' onContentsChanged='ok.setEnabled(errors.size()==0)'/>
-
<!-- validators -->
<BeanValidator id='validator' bean='model' errorListModel='fake'>
<field name="text"/>
<field name="text2"/>
<field name="ratio"/>
</BeanValidator>
- <BeanValidator id='validator2' bean='model2' errorListModel='errors' uiClass="jaxx.runtime.validator.ui.IconValidationUI">
- <field name="text" component="_text"/>
- <field name="text2" component="_text2"/>
- <field name="ratio" component="_ratio"/>
- </BeanValidator>
-
<Table fill='both'>
<row>
<cell weightx='1' weighty='1' insets='6, 3, 0, 0'>
@@ -89,178 +79,5 @@
</JPanel>
</cell>
</row>
- <row>
- <cell weightx='1' weighty='1' insets='6, 3, 0, 0'>
- <JPanel border='{BorderFactory.createTitledBorder("Form2")}'
- layout='{new GridLayout()}' width='250' height='120'>
- <Table anchor='west' fill='both'>
- <row>
- <cell>
- <JLabel text='Text:'/>
- </cell>
- <cell weightx='1'>
- <JTextField id='_text' text='{model2.getText()}'
- onKeyReleased='model2.setText(_text.getText())'/>
- </cell>
- </row>
- <row>
- <cell>
- <JLabel text='Text2:'/>
- </cell>
- <cell weightx='1'>
- <JTextField id='_text2' text='{model2.getText2()}'
- onKeyReleased='model2.setText2(_text2.getText())'/>
- </cell>
- </row>
-
- <row>
- <cell>
- <JLabel text='Ratio:'/>
- </cell>
- <cell>
- <JSlider id='_ratio' minimum='0' maximum='100' value='{model2.getRatio()}'
- onStateChanged='model2.setRatio(_ratio.getValue())'/>
- </cell>
- </row>
- </Table>
- </JPanel>
- </cell>
- <cell weightx='1' weighty='1' insets='6, 3, 0, 0'>
- <JPanel border='{BorderFactory.createTitledBorder("Model2")}'
- layout='{new GridLayout()}' width='250' height='120'>
- <Table anchor='west' fill='both'>
- <row>
- <cell>
- <JLabel text='Text:'/>
- </cell>
- <cell weightx='1'>
- <JLabel text='{model2.getText()}'/>
- </cell>
- </row>
- <row>
- <cell>
- <JLabel text='Text2:'/>
- </cell>
- <cell weightx='1'>
- <JLabel text='{model2.getText2()}'/>
- </cell>
- </row>
-
- <row>
- <cell>
- <JLabel text='Ratio:'/>
- </cell>
- <cell>
- <JLabel text='{model2.getRatio()}'/>
- </cell>
- </row>
- </Table>
- </JPanel>
- </cell>
- </row>
- <row>
- <cell weightx='1' weighty='1' insets='6, 3, 0, 0'>
- <JPanel border='{BorderFactory.createTitledBorder("Identify Form")}'
- layout='{new GridLayout()}' width='250' height='140'>
- <Table anchor='west' fill='both'>
- <row>
- <cell>
- <JLabel text='FirstName:'/>
- </cell>
- <cell weightx='1'>
- <JTextField id='firstName' text='{identity.getFirstName()}'
- onKeyReleased='identity.setFirstName(firstName.getText())'/>
- </cell>
- </row>
- <row>
- <cell>
- <JLabel text='LastName:'/>
- </cell>
- <cell weightx='1'>
- <JTextField id='lastName' text='{identity.getLastName()}'
- onKeyReleased='identity.setLastName(lastName.getText())'/>
- </cell>
- </row>
- <row>
- <cell>
- <JLabel text='Email:'/>
- </cell>
- <cell weightx='1'>
- <JTextField id='email2' text='{identity.getEmail()}'
- onKeyReleased='identity.setEmail(email2.getText())'/>
- </cell>
- </row>
-
- <row>
- <cell>
- <JLabel text='Age:'/>
- </cell>
- <cell>
- <JSlider id='age' minimum='0' maximum='100' value='{identity.getAge()}'
- onStateChanged='identity.setAge(age.getValue())'/>
- </cell>
- </row>
- </Table>
- </JPanel>
- </cell>
- <cell weightx='1' weighty='1' insets='6, 3, 0, 0'>
- <JPanel border='{BorderFactory.createTitledBorder("Identity Model")}'
- layout='{new GridLayout()}' width='250' height='120'>
- <Table anchor='west' fill='both'>
- <row>
- <cell>
- <JLabel text='FirstName:'/>
- </cell>
- <cell weightx='1'>
- <JLabel text='{identity.getFirstName()}'/>
- </cell>
- </row>
- <row>
- <cell>
- <JLabel text='LastName:'/>
- </cell>
- <cell weightx='1'>
- <JLabel text='{identity.getLastName()}'/>
- </cell>
- </row>
- <row>
- <cell>
- <JLabel text='Email:'/>
- </cell>
- <cell weightx='1'>
- <JLabel text='{identity.getEmail()}'/>
- </cell>
- </row>
-
- <row>
- <cell>
- <JLabel text='Age:'/>
- </cell>
- <cell>
- <JLabel text='{identity.getAge()}'/>
- </cell>
- </row>
- </Table>
- </JPanel>
- </cell>
- </row>
- <row>
- <cell columns='2' fill="both">
- <JPanel border='{BorderFactory.createTitledBorder("Errors")}' layout='{new GridLayout()}' height='200' width='500'>
- <JScrollPane>
- <JList model='{errors}'/>
- </JScrollPane>
- </JPanel>
- </cell>
- </row>
- <row>
- <cell columns='2' fill="both">
- <JPanel layout='{new GridLayout(1,2,0,0)}'>
- <JButton text='cancel' onActionPerformed='dispose()'/>
- <JButton id='ok' text='valid' onActionPerformed='dispose()'/>
- </JPanel>
- </cell>
- </row>
-
</Table>
</Application>
1
0
r995 - in lutinjaxx/trunk: jaxx-core jaxx-core/src/main/java/jaxx/runtime/validator jaxx-core/src/main/java/jaxx/tags/validator jaxx-example/Validation/src/main/java/examples/Validation
by tchemit@users.labs.libre-entreprise.org 25 Oct '08
by tchemit@users.labs.libre-entreprise.org 25 Oct '08
25 Oct '08
Author: tchemit
Date: 2008-10-25 19:46:47 +0000 (Sat, 25 Oct 2008)
New Revision: 995
Added:
lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/runtime/validator/ErrorListMouseListener.java
Modified:
lutinjaxx/trunk/jaxx-core/changelog
lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/tags/validator/BeanValidatorHandler.java
lutinjaxx/trunk/jaxx-example/Validation/src/main/java/examples/Validation/Validation.jaxx
Log:
add a errorList attribute for set a ErrorListMouseListener on the errorList
Modified: lutinjaxx/trunk/jaxx-core/changelog
===================================================================
--- lutinjaxx/trunk/jaxx-core/changelog 2008-10-25 17:03:27 UTC (rev 994)
+++ lutinjaxx/trunk/jaxx-core/changelog 2008-10-25 19:46:47 UTC (rev 995)
@@ -1,5 +1,6 @@
ver-0-6 chemit 200811??
* 20081025 [chemit] improve BeanValidator tag :
+ - add a errorList attribute for set a ErrorListMouseListener on the errorList
- add a beanInitializer attribute for set the validator's bean at runtime
- add a default errorListModel value 'errors'
* 20081025 [chemit] introduce JAXXInitialContext to fill JAXXContext at runtime before $initialize() method
Added: lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/runtime/validator/ErrorListMouseListener.java
===================================================================
--- lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/runtime/validator/ErrorListMouseListener.java (rev 0)
+++ lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/runtime/validator/ErrorListMouseListener.java 2008-10-25 19:46:47 UTC (rev 995)
@@ -0,0 +1,62 @@
+package jaxx.runtime.validator;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import javax.swing.JComponent;
+import javax.swing.JList;
+import java.awt.event.MouseAdapter;
+import java.awt.event.MouseEvent;
+
+/**
+ * A mouse listener to put on a {@link JList} with a {@link BeanValidatorErrorListModel} as a model.
+ * <p/>
+ * When a double click occurs, find the selected error in model and then focus to the associated component of error.
+ *
+ * @author chemit
+ */
+public class ErrorListMouseListener extends MouseAdapter {
+
+ /** to use log facility, just put in your code: log.info(\"...\"); */
+ static private Log log = LogFactory.getLog(ErrorListMouseListener.class);
+
+ @Override
+ public void mouseClicked(MouseEvent e) {
+ super.mouseClicked(e);
+ if (e.getClickCount() == 2) {
+
+ BeanValidatorError<?> entry = getSelectedError(e);
+ if (entry == null) {
+ // no entry found
+ return;
+ }
+ JComponent component = entry.getComponent();
+ if (component == null) {
+ return;
+ }
+ component.requestFocus();
+ }
+ }
+
+
+ protected BeanValidatorError<?> getSelectedError(MouseEvent e) {
+ JList list = (JList) e.getSource();
+ if (!(list.getModel() instanceof BeanValidatorErrorListModel)) {
+ log.warn("model must ne a " + BeanValidatorErrorListModel.class + ", but was " + list.getModel());
+ return null;
+ }
+
+ BeanValidatorErrorListModel model = (BeanValidatorErrorListModel) list.getModel();
+ int index = list.getSelectionModel().getMinSelectionIndex();
+ if (index == -1) {
+ // nothing is selected
+ return null;
+ }
+ BeanValidatorError<?> entry = (BeanValidatorError) model.getElementAt(index);
+ if (log.isDebugEnabled()) {
+ log.debug("selected index: " + index + " : error: " + entry);
+ }
+ return entry;
+ }
+
+}
Modified: lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/tags/validator/BeanValidatorHandler.java
===================================================================
--- lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/tags/validator/BeanValidatorHandler.java 2008-10-25 17:03:27 UTC (rev 994)
+++ lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/tags/validator/BeanValidatorHandler.java 2008-10-25 19:46:47 UTC (rev 995)
@@ -12,6 +12,7 @@
import jaxx.reflect.ClassDescriptor;
import jaxx.reflect.ClassDescriptorLoader;
import jaxx.runtime.validator.BeanValidator;
+import jaxx.runtime.validator.ErrorListMouseListener;
import jaxx.runtime.validator.ui.AbstractBeanValidatorUI;
import jaxx.tags.DefaultObjectHandler;
import jaxx.types.TypeManager;
@@ -33,7 +34,9 @@
public static final String BEAN_INITIALIZER_ATTRIBUTE = "beanInitializer";
public static final String ERROR_LIST_MODEL_ATTRIBUTE = "errorListModel";
+ public static final String ERROR_LIST_ATTRIBUTE = "errorList";
public static final String ERROR_LIST_MODEL_DEFAULT = "errors";
+ public static final String ERROR_LIST_DEFAULT = "errorList";
public static final String AUTOFIELD_ATTRIBUTE = "autoField";
public static final String UI_CLASS_ATTRIBUTE = "uiClass";
@@ -74,6 +77,10 @@
boolean error = info.addErrorListModel(tag, this, compiler);
if (!error) {
+ error = info.addErrorList(tag, compiler);
+ }
+
+ if (!error) {
error = info.addUiClass(this, compiler);
}
@@ -117,6 +124,7 @@
protected String beanInitializer;
protected String uiClass;
protected String errorListModel;
+ protected String errorList;
protected Boolean autoField;
protected Boolean strictMode;
protected JAXXBeanInfo beanDescriptor;
@@ -162,6 +170,12 @@
}
return;
}
+ if (ERROR_LIST_ATTRIBUTE.equals(property)) {
+ if (value != null && !value.trim().isEmpty()) {
+ errorList = value;
+ }
+ return;
+ }
if (UI_CLASS_ATTRIBUTE.equals(property)) {
if (value != null && !value.trim().isEmpty()) {
uiClass = value;
@@ -269,23 +283,42 @@
protected boolean addErrorListModel(Element tag, BeanValidatorHandler handler, JAXXCompiler compiler) {
if (errorListModel == null) {
// try with the default "errors"
-
- if (!compiler.checkReference(tag, ERROR_LIST_MODEL_DEFAULT, true, ERROR_LIST_MODEL_ATTRIBUTE)) {
+ if (!compiler.checkReference(tag, ERROR_LIST_MODEL_DEFAULT, false, ERROR_LIST_MODEL_ATTRIBUTE)) {
+ return false;
+ }
+ errorListModel = ERROR_LIST_MODEL_DEFAULT;
+ } else {
+ if (!compiler.checkReference(tag, errorListModel, true, ERROR_LIST_MODEL_ATTRIBUTE)) {
return true;
}
- String code = handler.getSetPropertyCode(getJavaCode(), ERROR_LIST_MODEL_ATTRIBUTE, ERROR_LIST_MODEL_DEFAULT, compiler);
- appendAdditionCode(code);
- return false;
}
- if (!compiler.checkReference(tag, errorListModel, true, ERROR_LIST_MODEL_ATTRIBUTE)) {
- return true;
+ String code = handler.getSetPropertyCode(getJavaCode(), ERROR_LIST_MODEL_ATTRIBUTE, errorListModel, compiler);
+ appendAdditionCode(code);
+
+ return false;
+
+ }
+
+ protected boolean addErrorList(Element tag, JAXXCompiler compiler) {
+
+ if (errorList == null) {
+ // try with the default "errorList"
+ if (!compiler.checkReference(tag, ERROR_LIST_DEFAULT, false, ERROR_LIST_ATTRIBUTE)) {
+ return false;
+ }
+ errorList = ERROR_LIST_DEFAULT;
+ } else {
+ if (!compiler.checkReference(tag, errorList, true, ERROR_LIST_ATTRIBUTE)) {
+ return true;
+ }
}
- String code = handler.getSetPropertyCode(getJavaCode(), ERROR_LIST_MODEL_ATTRIBUTE, errorListModel, compiler);
+ String code = errorList + ".addMouseListener(new " + ErrorListMouseListener.class.getName() + "());";
appendAdditionCode(code);
return false;
+
}
protected boolean addBean(Element tag, BeanValidatorHandler handler, JAXXCompiler compiler) {
Modified: lutinjaxx/trunk/jaxx-example/Validation/src/main/java/examples/Validation/Validation.jaxx
===================================================================
--- lutinjaxx/trunk/jaxx-example/Validation/src/main/java/examples/Validation/Validation.jaxx 2008-10-25 17:03:27 UTC (rev 994)
+++ lutinjaxx/trunk/jaxx-example/Validation/src/main/java/examples/Validation/Validation.jaxx 2008-10-25 19:46:47 UTC (rev 995)
@@ -10,17 +10,17 @@
<jaxx.runtime.validator.BeanValidatorErrorListModel id='errors' onContentsChanged='ok.setEnabled(errors.size()==0)'/>
<!-- validators -->
- <BeanValidator id='validator' bean='model' errorListModel='errors'>
+ <BeanValidator id='validator' bean='model'>
<field name="text"/>
<field name="text2"/>
<field name="ratio"/>
</BeanValidator>
- <BeanValidator id='validator2' bean='model2' errorListModel='errors' uiClass="jaxx.runtime.validator.ui.IconValidationUI">
+ <BeanValidator id='validator2' bean='model2' uiClass="jaxx.runtime.validator.ui.IconValidationUI">
<field name="text" component="_text"/>
<field name="text2" component="_text2"/>
<field name="ratio" component="_ratio"/>
</BeanValidator>
- <BeanValidator id='validator3' autoField='true' bean='identity' errorListModel='errors' uiClass="jaxx.runtime.validator.ui.TranslucentValidationUI">
+ <BeanValidator id='validator3' autoField='true' bean='identity' uiClass="jaxx.runtime.validator.ui.TranslucentValidationUI">
<field name="email" component="email2"/>
</BeanValidator>
@@ -286,7 +286,7 @@
<cell columns='2' fill="both">
<JPanel border='{BorderFactory.createTitledBorder("Errors")}' layout='{new GridLayout()}' height='200' width='500'>
<JScrollPane>
- <JList model='{errors}'/>
+ <JList id='errorList' model='{errors}'/>
</JScrollPane>
</JPanel>
</cell>
1
0
r994 - in lutinjaxx/trunk: jaxx-core jaxx-core/src/main/java/jaxx/compiler jaxx-core/src/main/java/jaxx/runtime jaxx-core/src/main/java/jaxx/tags/validator maven-jaxx-plugin/src/test/java/org/codelutin/jaxx maven-jaxx-plugin/src/test/resources/testcases/validator/ok
by tchemit@users.labs.libre-entreprise.org 25 Oct '08
by tchemit@users.labs.libre-entreprise.org 25 Oct '08
25 Oct '08
Author: tchemit
Date: 2008-10-25 17:03:27 +0000 (Sat, 25 Oct 2008)
New Revision: 994
Added:
lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/runtime/JAXXInitialContext.java
lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/ok/ValidationBeanClass.jaxx
Modified:
lutinjaxx/trunk/jaxx-core/changelog
lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/compiler/JAXXObjectGenerator.java
lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/tags/validator/BeanValidatorHandler.java
lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/tags/validator/FieldValidatorHandler.java
lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/CompilerTest.java
Log:
* improve BeanValidator tag :
- add a beanInitializer attribute for set the validator's bean at runtime
- add a default errorListModel value 'errors'
*introduce JAXXInitialContext to fill JAXXContext at runtime before $initialize() method
Modified: lutinjaxx/trunk/jaxx-core/changelog
===================================================================
--- lutinjaxx/trunk/jaxx-core/changelog 2008-10-24 17:44:12 UTC (rev 993)
+++ lutinjaxx/trunk/jaxx-core/changelog 2008-10-25 17:03:27 UTC (rev 994)
@@ -1,5 +1,9 @@
ver-0-6 chemit 200811??
- * 20081024 [chemit] fix validator context lost if UI is launched from another thread
+ * 20081025 [chemit] improve BeanValidator tag :
+ - add a beanInitializer attribute for set the validator's bean at runtime
+ - add a default errorListModel value 'errors'
+ * 20081025 [chemit] introduce JAXXInitialContext to fill JAXXContext at runtime before $initialize() method
+ * 20081024 [chemit] fix validator context lost if UI is launched from another thread
ver-0-5 chemit 20081002
* 20081017 [chemit] add validator support
* 20081013 [chemit] can generate logger on jaxx files
Modified: lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/compiler/JAXXObjectGenerator.java
===================================================================
--- lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/compiler/JAXXObjectGenerator.java 2008-10-24 17:44:12 UTC (rev 993)
+++ lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/compiler/JAXXObjectGenerator.java 2008-10-25 17:03:27 UTC (rev 994)
@@ -141,12 +141,14 @@
}
javaFile.addImport("jaxx.runtime.validator.BeanValidator");
-
+ javaFile.addImport("jaxx.runtime.JAXXInitialContext");
+
if (compiler.getStylesheet() != null) {
javaFile.addField(new JavaField(0, "java.util.Map", "$previousValues", "new java.util.HashMap()"));
}
javaFile.addMethod(createConstructor(className));
+ javaFile.addMethod(createConstructorWithInitialContext(className));
javaFile.addMethod(createInitializer(className));
javaFile.addMethod(new JavaMethod(Modifier.PUBLIC, "BeanValidator<?>", "getValidator", new JavaArgument[]{new JavaArgument("String", "validatorId")},
null, "return (BeanValidator)(validatorIds.contains(validatorId)?getObjectById(validatorId):null);"));
@@ -399,7 +401,22 @@
return new JavaMethod(Modifier.PUBLIC, null, className, null, null, code.toString());
}
+ protected JavaMethod createConstructorWithInitialContext(String className) throws CompilerException {
+ StringBuffer code = new StringBuffer();
+ String constructorParams = compiler.getRootObject().getConstructorParams();
+ if (constructorParams != null) {
+ code.append(" super(").append(constructorParams).append(");");
+ code.append(JAXXCompiler.getLineSeparator());
+ }
+ code.append("initialContext.to(this);");
+ code.append(JAXXCompiler.getLineSeparator());
+ code.append("$initialize();");
+ code.append(JAXXCompiler.getLineSeparator());
+ JavaArgument arg = new JavaArgument("jaxx.runtime.JAXXInitialContext","initialContext");
+ return new JavaMethod(Modifier.PUBLIC, null, className, new JavaArgument[]{arg}, null, code.toString());
+ }
+
protected JavaMethod createInitializer(String className) throws CompilerException {
StringBuffer code = new StringBuffer();
CompiledObject root = compiler.getRootObject();
Added: lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/runtime/JAXXInitialContext.java
===================================================================
--- lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/runtime/JAXXInitialContext.java (rev 0)
+++ lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/runtime/JAXXInitialContext.java 2008-10-25 17:03:27 UTC (rev 994)
@@ -0,0 +1,133 @@
+package jaxx.runtime;
+
+import java.awt.Container;
+import java.util.LinkedHashSet;
+import java.util.Map.Entry;
+import java.util.Set;
+
+/**
+ * An initial context to be inject in a {@link JAXXObject}.
+ * <p/>
+ * The method {@link #add(Object)} register a simple value.
+ * <p/>
+ * The method {@link #add(String, Object)} register a named value.
+ * <p/>
+ * The method {@link #to(JAXXObject)} inject in the {@link JAXXObject} the values registred in the initial context.
+ * <p/>
+ * The initial context is also a "limited" {@link JAXXContext}, since we can only use the two methods
+ * <p/>
+ * {@link #getContextValue(Class)} or {@link #getContextValue(Class, String)}.
+ *
+ * @see JAXXContext
+ */
+public class JAXXInitialContext implements JAXXContext {
+
+ public static class JAXXInitialContextEntry implements Entry<String, Object> {
+
+ protected String key;
+ protected Object value;
+
+ public JAXXInitialContextEntry(String key, Object value) {
+ this.key = key;
+ this.value = value;
+ }
+
+ public String getKey() {
+ return key;
+ }
+
+ public Object getValue() {
+ return value;
+ }
+
+ public Object setValue(Object value) {
+ Object oldValue = this.value;
+ this.value = value;
+ return oldValue;
+ }
+
+ }
+
+ protected Set<Entry<String, Object>> entries;
+
+ public JAXXInitialContext() {
+ entries = new LinkedHashSet<Entry<String, Object>>();
+ }
+
+ /**
+ * Register a simple (none named) value in the context.
+ *
+ * @param value the value to be registred in the context
+ * @return the instance of the context
+ */
+ public JAXXInitialContext add(Object value) {
+ return add(null, value);
+ }
+
+ /**
+ * Register a named value in the context.
+ *
+ * @param name the name of the value
+ * @param value the value to registred
+ * @return the instance of the context
+ */
+ public JAXXInitialContext add(String name, Object value) {
+ entries.add(new JAXXInitialContextEntry(name, value));
+ return this;
+ }
+
+ /**
+ * Inject all the registed values into the {@link JAXXObject}
+ *
+ * @param dst the object to fill.
+ */
+ public void to(JAXXObject dst) {
+ for (Entry<String, Object> entry : entries) {
+ if (entry.getKey() == null) {
+ dst.setContextValue(entry.getValue());
+ } else {
+ dst.setContextValue(entry.getValue(), entry.getKey());
+ }
+ }
+ }
+
+ @SuppressWarnings({"unchecked"})
+ public <T> T getContextValue(Class<T> clazz) {
+ T result = null;
+ for (Entry<String, Object> entry : entries) {
+ if (clazz.isAssignableFrom(entry.getValue().getClass())) {
+ result = (T) entry.getValue();
+ break;
+ }
+ }
+ return result;
+ }
+
+ @SuppressWarnings({"unchecked"})
+ public <T> T getContextValue(Class<T> clazz, String name) {
+ T result = null;
+ for (Entry<String, Object> entry : entries) {
+ if (name.equals(entry.getKey()) && clazz.isAssignableFrom(entry.getValue().getClass())) {
+ result = (T) entry.getValue();
+ }
+ }
+ return result;
+ }
+
+ public void setContextValue(Object o) {
+ throw new RuntimeException("not implemented");
+ }
+
+ public void setContextValue(Object o, String name) {
+ throw new RuntimeException("not implemented");
+ }
+
+ public <O extends Container> O getParentContainer(Class<O> clazz) {
+ throw new RuntimeException("not implemented");
+ }
+
+ public <O extends Container> O getParentContainer(Object top, Class<O> clazz) {
+ throw new RuntimeException("not implemented");
+ }
+
+}
Modified: lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/tags/validator/BeanValidatorHandler.java
===================================================================
--- lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/tags/validator/BeanValidatorHandler.java 2008-10-24 17:44:12 UTC (rev 993)
+++ lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/tags/validator/BeanValidatorHandler.java 2008-10-25 17:03:27 UTC (rev 994)
@@ -29,7 +29,12 @@
public static final String BEAN_VALIDATOR_TAG = BeanValidator.class.getSimpleName();
public static final String BEAN_ATTRIBUTE = "bean";
+ public static final String BEAN_CLASS_ATTRIBUTE = "beanClass";
+ public static final String BEAN_INITIALIZER_ATTRIBUTE = "beanInitializer";
+
public static final String ERROR_LIST_MODEL_ATTRIBUTE = "errorListModel";
+ public static final String ERROR_LIST_MODEL_DEFAULT = "errors";
+
public static final String AUTOFIELD_ATTRIBUTE = "autoField";
public static final String UI_CLASS_ATTRIBUTE = "uiClass";
public static final String STRICT_MODE_ATTRIBUTE = "strictMode";
@@ -37,12 +42,6 @@
/** to use log facility, just put in your code: log.info(\"...\"); */
static Log log = LogFactory.getLog(BeanValidatorHandler.class);
- /**
- * Creates a new <code>DefaultObjectHandler</code> which provides support for the specified class. The
- * class is not actually introspected until the {@link #compileFirstPass} method is invoked.
- *
- * @param beanClass the class which this handler supports
- */
public BeanValidatorHandler(ClassDescriptor beanClass) {
super(beanClass);
ClassDescriptorLoader.checkSupportClass(getClass(), beanClass, BeanValidator.class);
@@ -72,69 +71,18 @@
CompiledBeanValidator info = (CompiledBeanValidator) objectMap.get(tag);
- String tmp;
+ boolean error = info.addErrorListModel(tag, this, compiler);
- tmp = info.getErrorListModel();
- if (tmp != null) {
- if (compiler.checkReference(tag, tmp, true, ERROR_LIST_MODEL_ATTRIBUTE)) {
- String code = getSetPropertyCode(info.getJavaCode(), ERROR_LIST_MODEL_ATTRIBUTE, tmp, compiler);
- info.appendAdditionCode(code);
- }
+ if (!error) {
+ error = info.addUiClass(this, compiler);
}
- tmp = info.getUiClass();
- if (tmp != null) {
- try {
- ClassDescriptor uiClass = ClassDescriptorLoader.getClassDescriptor(tmp);
- if (!ClassDescriptorLoader.getClassDescriptor(AbstractBeanValidatorUI.class).isAssignableFrom(uiClass)) {
- compiler.reportError("attribute 'ui' :'" + tmp + "' is not assignable from class " + AbstractBeanValidatorUI.class);
- } else {
- String code = getSetPropertyCode(info.getJavaCode(), UI_CLASS_ATTRIBUTE, uiClass.getName() + ".class", compiler);
- info.appendAdditionCode(code);
- }
- } catch (ClassNotFoundException e) {
- compiler.reportError("class not found '" + tmp + "'");
- }
+ if (!error) {
+ error = info.addBean(tag, this, compiler);
}
- String bean = info.getBean();
- boolean error = false;
- if (bean != null) {
- if (compiler.checkReference(tag, bean, true, BEAN_ATTRIBUTE)) {
- String code = getSetPropertyCode(info.getJavaCode(), BEAN_ATTRIBUTE, bean, compiler);
- info.appendAdditionCode(code);
- // add generic type to validator
- JAXXBeanInfo beanInfo = info.getBeanDescriptor(compiler);
- info.setGenericTypes(new String[]{beanInfo.getJAXXBeanDescriptor().getClassDescriptor().getName()});
- } else {
- error=true;
- }
-
- //TODO: checkthe bean is not already used in another validator
- if (!error && compiler.isBeanUsedByValidator(bean)) {
- compiler.reportError("the bean '" + bean + "' is already used in another the validator, can not used it in '" + tag + "'");
- error = true;
- }
-
- if (!error && info.getAutoField()) {
- //if (bean == null) {
- // compiler.reportError("tag '" + tag.getLocalName() + "' need a " + BEAN_ATTRIBUTE + " attribute to use autofield mode");
- //} else {
- registerAutoFieldBean(tag, compiler, info);
- // }
- }
-
- if (!error && info.getBeanDescriptor(compiler) != null) {
-
- // add fieldrepresentation invocations
- addFieldRepresentations(tag, compiler, info);
-
- // register the validator in compiler
- compiler.registerValidator(info);
- }
-
- } else {
- compiler.reportError("tag '" + tag + "' requires a bean attribute");
+ if (error) {
+ log.warn("error were detected in second compile pass of CompiledObject [" + info + "]");
}
// close the compiled object
@@ -152,77 +100,21 @@
if (compiler.getOptions().isVerbose()) {
log.info(propertyName + " : " + stringValue + " for " + object);
}
+ // delegate to the compiled object with is statefull (but not the tag handler)
object.addProperty(propertyName, stringValue);
}
- protected void registerAutoFieldBean(Element tag, JAXXCompiler compiler, CompiledBeanValidator info) {
- JAXXBeanInfo beanInfo = info.getBeanDescriptor(compiler);
- for (JAXXPropertyDescriptor beanProperty : beanInfo.getJAXXPropertyDescriptors()) {
- String descriptionName = beanProperty.getName();
- if (compiler.getOptions().isVerbose()) {
- log.info("try to bind on bean " + beanInfo.getJAXXBeanDescriptor().getName() + " property " + descriptionName);
- }
- if (beanProperty.getWriteMethodDescriptor() == null) {
- // read-only property
- continue;
- }
- if (info.getFields().containsKey(descriptionName)) {
- // already defined in field
- continue;
- }
- if (!compiler.checkReference(tag, descriptionName, info.getStrictMode(), null)) {
- // no editor component found
- continue;
- }
- // ok add the field mapping
- info.addField(descriptionName, descriptionName, compiler);
- }
- }
-
- protected void addFieldRepresentations(Element tag, JAXXCompiler compiler, CompiledBeanValidator info) {
- for (Entry<String, String> entry : info.getFields().entrySet()) {
- String propertyName = entry.getKey();
- String component = entry.getValue();
- if (!checkBeanProperty(compiler, info, propertyName)) {
- // property not find on bean
- continue;
- }
- if (!compiler.checkReference(tag, component, true, null)) {
- // editor component not find on ui
- continue;
- }
- if (compiler.isComponentUsedByValidator(component)) {
- // component is already used by another validator
- compiler.reportError("component '" + component + "' is already used by another validator.");
- continue;
- }
- String keyCode = TypeManager.getJavaCode(propertyName);
- info.appendAdditionCode(info.getJavaCode() + ".setFieldRepresentation(" + keyCode + ", " + component + ");");
-
- }
- }
-
- protected boolean checkBeanProperty(JAXXCompiler compiler, CompiledBeanValidator info, String propertyName) {
-
- for (JAXXPropertyDescriptor beanProperty : info.getBeanDescriptor(compiler).getJAXXPropertyDescriptors()) {
- if (beanProperty.getName().equals(propertyName)) {
- if (beanProperty.getWriteMethodDescriptor() == null) {
- // read-onlyproperty
- compiler.reportError("could not bind the readonly property '" + propertyName + "' on bean [" + info.getBean() + "] ");
- return false;
- }
- return true;
- }
- }
- compiler.reportError("could not find the property '" + propertyName + "' on bean [" + info.getBean() + "] ");
- return false;
- }
-
- /** @author chemit */
+ /**
+ * The compiled objet representing a BeanValidator to be generated in JAXXObject
+ *
+ * @author chemit
+ */
public static class CompiledBeanValidator extends CompiledObject {
protected Map<String, String> fields;
protected String bean;
+ protected String beanClass;
+ protected String beanInitializer;
protected String uiClass;
protected String errorListModel;
protected Boolean autoField;
@@ -251,6 +143,19 @@
}
return;
}
+ if (BEAN_CLASS_ATTRIBUTE.equals(property)) {
+ if (value != null && !value.trim().isEmpty()) {
+ beanClass = value;
+ }
+ return;
+ }
+ if (BEAN_INITIALIZER_ATTRIBUTE.equals(property)) {
+ if (value != null && !value.trim().isEmpty()) {
+ beanInitializer = value;
+ }
+ return;
+ }
+
if (ERROR_LIST_MODEL_ATTRIBUTE.equals(property)) {
if (value != null && !value.trim().isEmpty()) {
errorListModel = value;
@@ -281,17 +186,6 @@
super.addProperty(property, value);
}
- public void addField(String id, String component, JAXXCompiler compiler) {
- if (fields.containsKey(id)) {
- compiler.reportError("duplicate field '" + id + "' for validator " + this);
- } else {
- if (compiler.getOptions().isVerbose()) {
- log.info("add field <" + id + ":" + component + ">");
- }
- fields.put(id, component);
- }
- }
-
public String getBean() {
return bean;
}
@@ -312,20 +206,31 @@
return uiClass;
}
+ public String getBeanClass() {
+ return beanClass;
+ }
+
public JAXXBeanInfo getBeanDescriptor(JAXXCompiler compiler) {
- if (beanDescriptor == null && bean != null) {
+ if (beanDescriptor == null && foundBean()) {
+
+ String beanClassName = null;
try {
- String beanClassName = compiler.getSymbolTable().getClassTagIds().get(bean);
- if (beanClassName == null) {
- compiler.reportError("could not find class of the bean '" + bean + "'");
- return null;
+ // get the real bean class name (from bean or beanClass)
+ if (beanClass != null) {
+ beanClassName = beanClass;
+ } else {
+ beanClassName = compiler.getSymbolTable().getClassTagIds().get(bean);
+ if (beanClassName == null) {
+ compiler.reportError("could not find class of the bean '" + bean + "'");
+ return null;
+ }
}
ClassDescriptor beanClassDescriptor = ClassDescriptorLoader.getClassDescriptor(beanClassName);
- beanDescriptor = getJAXXBeanInfo(beanClassDescriptor);
+ beanDescriptor = DefaultObjectHandler.getJAXXBeanInfo(beanClassDescriptor);
} catch (ClassNotFoundException e) {
- compiler.reportError("could not load class " + bean);
+ compiler.reportError("could not load class " + beanClassName);
} catch (IntrospectionException e) {
- compiler.reportError("could not load class " + bean);
+ compiler.reportError("could not load class " + beanClassName);
}
}
return beanDescriptor;
@@ -336,5 +241,175 @@
// do nothing
compiler.reportError("can not add CompiledObject in the tag '" + BEAN_VALIDATOR_TAG + " (only field tags)");
}
+
+ public boolean foundBean() {
+ return !(bean == null && beanClass == null);
+ }
+
+ protected boolean addUiClass(BeanValidatorHandler handler, JAXXCompiler compiler) {
+ boolean withError = false;
+ if (uiClass != null) {
+ try {
+ ClassDescriptor uiClazz = ClassDescriptorLoader.getClassDescriptor(uiClass);
+ if (!ClassDescriptorLoader.getClassDescriptor(AbstractBeanValidatorUI.class).isAssignableFrom(uiClazz)) {
+ compiler.reportError("attribute 'ui' :'" + uiClass + "' is not assignable from class " + AbstractBeanValidatorUI.class);
+ withError = true;
+ } else {
+ String code = handler.getSetPropertyCode(getJavaCode(), UI_CLASS_ATTRIBUTE, uiClazz.getName() + ".class", compiler);
+ appendAdditionCode(code);
+ }
+ } catch (ClassNotFoundException e) {
+ compiler.reportError("class not found '" + uiClass + "'");
+ withError = true;
+ }
+ }
+ return withError;
+ }
+
+ protected boolean addErrorListModel(Element tag, BeanValidatorHandler handler, JAXXCompiler compiler) {
+ if (errorListModel == null) {
+ // try with the default "errors"
+
+ if (!compiler.checkReference(tag, ERROR_LIST_MODEL_DEFAULT, true, ERROR_LIST_MODEL_ATTRIBUTE)) {
+ return true;
+ }
+ String code = handler.getSetPropertyCode(getJavaCode(), ERROR_LIST_MODEL_ATTRIBUTE, ERROR_LIST_MODEL_DEFAULT, compiler);
+ appendAdditionCode(code);
+ return false;
+ }
+
+ if (!compiler.checkReference(tag, errorListModel, true, ERROR_LIST_MODEL_ATTRIBUTE)) {
+ return true;
+ }
+
+ String code = handler.getSetPropertyCode(getJavaCode(), ERROR_LIST_MODEL_ATTRIBUTE, errorListModel, compiler);
+ appendAdditionCode(code);
+
+ return false;
+ }
+
+ protected boolean addBean(Element tag, BeanValidatorHandler handler, JAXXCompiler compiler) {
+
+ if (!foundBean()) {
+ compiler.reportError("tag '" + tag + "' requires a 'bean' or a 'beanClass' attribute");
+ return true;
+ }
+
+ if (bean != null) {
+
+ if (!compiler.checkReference(tag, bean, true, BEAN_ATTRIBUTE)) {
+ // could not find bean in compiled object
+ return true;
+ }
+
+ if (compiler.isBeanUsedByValidator(bean)) {
+ compiler.reportError("the bean '" + bean + "' is already used in another the validator, can not used it in '" + tag + "'");
+ return true;
+ }
+
+ if (beanInitializer != null) {
+ compiler.reportWarning("tag '" + tag + "' found a 'bean' and a 'beanInitializer' attributes, 'beanInitializer' is skipped");
+ }
+ beanInitializer = bean;
+ }
+
+ if (beanInitializer != null) {
+ String code = handler.getSetPropertyCode(getJavaCode(), BEAN_ATTRIBUTE, compiler.checkJavaCode(beanInitializer), compiler);
+ appendAdditionCode(code);
+ }
+
+ // add generic type to validator
+ JAXXBeanInfo beanInfo = getBeanDescriptor(compiler);
+ setGenericTypes(new String[]{beanInfo.getJAXXBeanDescriptor().getClassDescriptor().getName()});
+
+ if (getAutoField()) {
+ registerAutoFieldBean(tag, compiler, beanInfo);
+ }
+
+ if (getBeanDescriptor(compiler) != null) {
+
+ // add fieldrepresentation invocations
+ addFieldRepresentations(tag, compiler);
+
+ // register the validator in compiler
+ compiler.registerValidator(this);
+
+ }
+
+ return false;
+ }
+
+ protected void addFieldRepresentations(Element tag, JAXXCompiler compiler) {
+ for (Entry<String, String> entry : fields.entrySet()) {
+ String propertyName = entry.getKey();
+ String component = entry.getValue();
+ if (!checkBeanProperty(compiler, propertyName)) {
+ // property not find on bean
+ continue;
+ }
+ if (!compiler.checkReference(tag, component, true, null)) {
+ // editor component not find on ui
+ continue;
+ }
+ if (compiler.isComponentUsedByValidator(component)) {
+ // component is already used by another validator
+ compiler.reportError("component '" + component + "' is already used by another validator.");
+ continue;
+ }
+ String keyCode = TypeManager.getJavaCode(propertyName);
+ appendAdditionCode(getJavaCode() + ".setFieldRepresentation(" + keyCode + ", " + component + ");");
+
+ }
+ }
+
+ protected void registerAutoFieldBean(Element tag, JAXXCompiler compiler, JAXXBeanInfo beanInfo) {
+ for (JAXXPropertyDescriptor beanProperty : beanInfo.getJAXXPropertyDescriptors()) {
+ String descriptionName = beanProperty.getName();
+ if (compiler.getOptions().isVerbose()) {
+ log.info("try to bind on bean " + beanInfo.getJAXXBeanDescriptor().getName() + " property " + descriptionName);
+ }
+ if (beanProperty.getWriteMethodDescriptor() == null) {
+ // read-only property
+ continue;
+ }
+ if (fields.containsKey(descriptionName)) {
+ // already defined in field
+ continue;
+ }
+ if (!compiler.checkReference(tag, descriptionName, getStrictMode(), null)) {
+ // no editor component found
+ continue;
+ }
+ // ok add the field mapping
+ registerField(descriptionName, descriptionName, compiler);
+ }
+ }
+
+ public void registerField(String id, String component, JAXXCompiler compiler) {
+ if (fields.containsKey(id)) {
+ compiler.reportError("duplicate field '" + id + "' for validator " + this);
+ } else {
+ if (compiler.getOptions().isVerbose()) {
+ log.info("add field <" + id + ":" + component + ">");
+ }
+ fields.put(id, component);
+ }
+ }
+
+ protected boolean checkBeanProperty(JAXXCompiler compiler, String propertyName) {
+
+ for (JAXXPropertyDescriptor beanProperty : getBeanDescriptor(compiler).getJAXXPropertyDescriptors()) {
+ if (beanProperty.getName().equals(propertyName)) {
+ if (beanProperty.getWriteMethodDescriptor() == null) {
+ // read-onlyproperty
+ compiler.reportError("could not bind the readonly property '" + propertyName + "' on bean [" + getBean() + "] ");
+ return false;
+ }
+ return true;
+ }
+ }
+ compiler.reportError("could not find the property '" + propertyName + "' on bean [" + getBean() + "] ");
+ return false;
+ }
}
}
\ No newline at end of file
Modified: lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/tags/validator/FieldValidatorHandler.java
===================================================================
--- lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/tags/validator/FieldValidatorHandler.java 2008-10-24 17:44:12 UTC (rev 993)
+++ lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/tags/validator/FieldValidatorHandler.java 2008-10-25 17:03:27 UTC (rev 994)
@@ -42,7 +42,7 @@
return;
}
- CompiledBeanValidator validator = (CompiledBeanValidator) compiler.getOpenComponent();
+ CompiledBeanValidator info = (CompiledBeanValidator) compiler.getOpenComponent();
String name = tag.getAttribute(NAME_ATTRIBUTE);
String component = tag.getAttribute(COMPONENT_ATTRIBUTE);
@@ -61,15 +61,15 @@
}
component = component.trim();
- // check component is not already used by this validator
- if (validator.getFields().containsValue(component)) {
+ // check component is not already used by this compiled object
+ if (info.getFields().containsValue(component)) {
compiler.reportError(FIELD_VALIDATOR_TAG + " tag found a attribute " + COMPONENT_ATTRIBUTE + " ["+component+"] already used in this validator");
return;
}
- // check component exist (again perharps, but if error will known exactly which tag failed...)
+ // check component exist (again perharps, but let the error knows exactly which tag failed...)
if (compiler.checkReference(tag, component, true, COMPONENT_ATTRIBUTE)) {
// add a field
- validator.addField(name, component, compiler);
+ info.registerField(name, component, compiler);
}
Modified: lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/CompilerTest.java
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/CompilerTest.java 2008-10-24 17:44:12 UTC (rev 993)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/CompilerTest.java 2008-10-25 17:03:27 UTC (rev 994)
@@ -178,7 +178,7 @@
public void testValidatorOk() throws Exception {
mojo.execute();
- assertEquals(1, mojo.getFiles().length);
+ assertEquals(2, mojo.getFiles().length);
}
Copied: lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/ok/ValidationBeanClass.jaxx (from rev 968, lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/ok/Validation.jaxx)
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/ok/ValidationBeanClass.jaxx (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/ok/ValidationBeanClass.jaxx 2008-10-25 17:03:27 UTC (rev 994)
@@ -0,0 +1,111 @@
+<Application title="Validation.jaxx">
+
+ <!-- models -->
+ <Identity id='identity'/>
+
+ <!-- errors model -->
+ <jaxx.runtime.validator.BeanValidatorErrorListModel id='errors'/>
+
+ <!-- validators -->
+ <BeanValidator id='validator3' autoField='true' beanClass='testcases.validator.ok.Identity' errorListModel='errors'>
+ <field name="email" component="email2"/>
+ </BeanValidator>
+
+ <Table fill='both'>
+ <row>
+ <cell weightx='1' weighty='1' insets='6, 3, 0, 0'>
+ <JPanel border='{BorderFactory.createTitledBorder("Identify Form")}'
+ layout='{new GridLayout()}' width='250' height='140'>
+ <Table anchor='west' fill='both'>
+ <row>
+ <cell>
+ <JLabel text='FirstName:'/>
+ </cell>
+ <cell weightx='1'>
+ <JTextField id='firstName' text='{identity.getFirstName()}'
+ onKeyReleased='identity.setFirstName(firstName.getText())'/>
+ </cell>
+ </row>
+ <row>
+ <cell>
+ <JLabel text='LastName:'/>
+ </cell>
+ <cell weightx='1'>
+ <JTextField id='lastName' text='{identity.getLastName()}'
+ onKeyReleased='identity.setLastName(lastName.getText())'/>
+ </cell>
+ </row>
+ <row>
+ <cell>
+ <JLabel text='Email:'/>
+ </cell>
+ <cell weightx='1'>
+ <JTextField id='email2' text='{identity.getEmail()}'
+ onKeyReleased='identity.setEmail(email2.getText())'/>
+ </cell>
+ </row>
+
+ <row>
+ <cell>
+ <JLabel text='Age:'/>
+ </cell>
+ <cell>
+ <JSlider id='age' minimum='0' maximum='100' value='{identity.getAge()}'
+ onStateChanged='identity.setAge(age.getValue())'/>
+ </cell>
+ </row>
+ </Table>
+ </JPanel>
+ </cell>
+ <cell weightx='1' weighty='1' insets='6, 3, 0, 0'>
+ <JPanel border='{BorderFactory.createTitledBorder("Identity Model")}'
+ layout='{new GridLayout()}' width='250' height='120'>
+ <Table anchor='west' fill='both'>
+ <row>
+ <cell>
+ <JLabel text='FirstName:'/>
+ </cell>
+ <cell weightx='1'>
+ <JLabel text='{identity.getFirstName()}'/>
+ </cell>
+ </row>
+ <row>
+ <cell>
+ <JLabel text='LastName:'/>
+ </cell>
+ <cell weightx='1'>
+ <JLabel text='{identity.getLastName()}'/>
+ </cell>
+ </row>
+ <row>
+ <cell>
+ <JLabel text='Email:'/>
+ </cell>
+ <cell weightx='1'>
+ <JLabel text='{identity.getEmail()}'/>
+ </cell>
+ </row>
+
+ <row>
+ <cell>
+ <JLabel text='Age:'/>
+ </cell>
+ <cell>
+ <JLabel text='{identity.getAge()}'/>
+ </cell>
+ </row>
+ </Table>
+ </JPanel>
+ </cell>
+ </row>
+ <row>
+ <cell columns='2' fill="both">
+ <JPanel border='{BorderFactory.createTitledBorder("Errors")}' layout='{new GridLayout()}' height='200' width='500'>
+ <JScrollPane>
+ <JList model='{errors}'/>
+ </JScrollPane>
+ </JPanel>
+ </cell>
+ </row>
+ </Table>
+</Application>
Property changes on: lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/ok/ValidationBeanClass.jaxx
___________________________________________________________________
Name: svn:mergeinfo
+
1
0
r993 - in lutinjaxx/trunk/jaxx-core: . src/main/java/jaxx/runtime/validator
by tchemit@users.labs.libre-entreprise.org 24 Oct '08
by tchemit@users.labs.libre-entreprise.org 24 Oct '08
24 Oct '08
Author: tchemit
Date: 2008-10-24 17:44:12 +0000 (Fri, 24 Oct 2008)
New Revision: 993
Modified:
lutinjaxx/trunk/jaxx-core/changelog
lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/runtime/validator/BeanValidator.java
Log:
fix validator context lost if UI is launched from another thread
Modified: lutinjaxx/trunk/jaxx-core/changelog
===================================================================
--- lutinjaxx/trunk/jaxx-core/changelog 2008-10-21 08:17:39 UTC (rev 992)
+++ lutinjaxx/trunk/jaxx-core/changelog 2008-10-24 17:44:12 UTC (rev 993)
@@ -1,3 +1,5 @@
+ ver-0-6 chemit 200811??
+ * 20081024 [chemit] fix validator context lost if UI is launched from another thread
ver-0-5 chemit 20081002
* 20081017 [chemit] add validator support
* 20081013 [chemit] can generate logger on jaxx files
Modified: lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/runtime/validator/BeanValidator.java
===================================================================
--- lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/runtime/validator/BeanValidator.java 2008-10-21 08:17:39 UTC (rev 992)
+++ lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/runtime/validator/BeanValidator.java 2008-10-24 17:44:12 UTC (rev 993)
@@ -153,8 +153,12 @@
/** Object servant a contenir la liste des erreurs */
protected BeanValidatorErrorListModel errorListModel;
+ /** ui renderer class*/
protected Class<? extends AbstractBeanValidatorUI> uiClass;
+ /** validator context */
+ protected ActionContext context;
+
public BeanValidator() {
pcs = new PropertyChangeSupport(this);
validationSupport = new ValidationAwareSupport();
@@ -346,12 +350,16 @@
ValueStackFactory vsf = conf.getContainer().getInstance(
ValueStackFactory.class);
ValueStack vs = vsf.createValueStack();
- ActionContext context = new ActionContext(vs.getContext());
+ context = new ActionContext(vs.getContext());
ActionContext.setContext(context);
validator = conf.getContainer().getInstance(
ActionValidatorManager.class, "no-annotations");
}
+ //TC - 20081024 : since context is in a ThreadLocal variable, we must do the check
+ if (ActionContext.getContext()==null) {
+ ActionContext.setContext(context);
+ }
return validator;
}
1
0
r992 - in lutinjaxx/trunk: . jaxx-core jaxx-example jaxx-example/Calculator jaxx-example/Counter jaxx-example/LabelStyle jaxx-example/Validation jaxx-swing-action jaxx-util maven-jaxx-plugin
by tchemit@users.labs.libre-entreprise.org 21 Oct '08
by tchemit@users.labs.libre-entreprise.org 21 Oct '08
21 Oct '08
Author: tchemit
Date: 2008-10-21 08:17:39 +0000 (Tue, 21 Oct 2008)
New Revision: 992
Modified:
lutinjaxx/trunk/jaxx-core/pom.xml
lutinjaxx/trunk/jaxx-example/Calculator/pom.xml
lutinjaxx/trunk/jaxx-example/Counter/pom.xml
lutinjaxx/trunk/jaxx-example/LabelStyle/pom.xml
lutinjaxx/trunk/jaxx-example/Validation/pom.xml
lutinjaxx/trunk/jaxx-example/pom.xml
lutinjaxx/trunk/jaxx-swing-action/pom.xml
lutinjaxx/trunk/jaxx-util/pom.xml
lutinjaxx/trunk/maven-jaxx-plugin/pom.xml
lutinjaxx/trunk/pom.xml
Log:
push back scm generics values
Modified: lutinjaxx/trunk/jaxx-core/pom.xml
===================================================================
--- lutinjaxx/trunk/jaxx-core/pom.xml 2008-10-21 07:31:16 UTC (rev 991)
+++ lutinjaxx/trunk/jaxx-core/pom.xml 2008-10-21 08:17:39 UTC (rev 992)
@@ -61,9 +61,9 @@
<!-- ************************************************************* -->
<!-- *** Build Environment ************************************** -->
<!-- ************************************************************* -->
- <scm>
- <connection>scm:svn:svn://anonymous@labs.libre-entreprise.org/svnroot/buix/lutinjaxx/trunk/jaxx-core</connection>
- <developerConnection>scm:svn:svn+ssh://tchemit@labs.libre-entreprise.org/svnroot/buix/lutinjaxx/trunk/jaxx-core</developerConnection>
- <url>http://labs.libre-entreprise.org/plugins/scmsvn/viewcvs.php/lutinjaxx/trunk…</url>
+ <scm>
+ <connection>${scm.connection.son}</connection>
+ <developerConnection>${scm.developerConnection.son}</developerConnection>
+ <url>${scm.url.son}</url>
</scm>
</project>
Modified: lutinjaxx/trunk/jaxx-example/Calculator/pom.xml
===================================================================
--- lutinjaxx/trunk/jaxx-example/Calculator/pom.xml 2008-10-21 07:31:16 UTC (rev 991)
+++ lutinjaxx/trunk/jaxx-example/Calculator/pom.xml 2008-10-21 08:17:39 UTC (rev 992)
@@ -1,4 +1,5 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
@@ -31,9 +32,9 @@
<!-- *** Build Environment ************************************** -->
<!-- ************************************************************* -->
<scm>
- <connection>scm:svn:svn://anonymous@labs.libre-entreprise.org/svnroot/buix/lutinjaxx/trunk/jaxx-example/Calculator</connection>
- <developerConnection>scm:svn:svn+ssh://tchemit@labs.libre-entreprise.org/svnroot/buix/lutinjaxx/trunk/jaxx-example/Calculator</developerConnection>
- <url>http://labs.libre-entreprise.org/plugins/scmsvn/viewcvs.php/lutinjaxx/trunk…</url>
+ <connection>${scm.connection.example}</connection>
+ <developerConnection>${scm.developerConnection.example}</developerConnection>
+ <url>${scm.url.example}</url>
</scm>
</project>
\ No newline at end of file
Modified: lutinjaxx/trunk/jaxx-example/Counter/pom.xml
===================================================================
--- lutinjaxx/trunk/jaxx-example/Counter/pom.xml 2008-10-21 07:31:16 UTC (rev 991)
+++ lutinjaxx/trunk/jaxx-example/Counter/pom.xml 2008-10-21 08:17:39 UTC (rev 992)
@@ -1,4 +1,5 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
@@ -31,8 +32,8 @@
<!-- *** Build Environment ************************************** -->
<!-- ************************************************************* -->
<scm>
- <connection>scm:svn:svn://anonymous@labs.libre-entreprise.org/svnroot/buix/lutinjaxx/trunk/jaxx-example/Counter</connection>
- <developerConnection>scm:svn:svn+ssh://tchemit@labs.libre-entreprise.org/svnroot/buix/lutinjaxx/trunk/jaxx-example/Counter</developerConnection>
- <url>http://labs.libre-entreprise.org/plugins/scmsvn/viewcvs.php/lutinjaxx/trunk…</url>
+ <connection>${scm.connection.example}</connection>
+ <developerConnection>${scm.developerConnection.example}</developerConnection>
+ <url>${scm.url.example}</url>
</scm>
</project>
\ No newline at end of file
Modified: lutinjaxx/trunk/jaxx-example/LabelStyle/pom.xml
===================================================================
--- lutinjaxx/trunk/jaxx-example/LabelStyle/pom.xml 2008-10-21 07:31:16 UTC (rev 991)
+++ lutinjaxx/trunk/jaxx-example/LabelStyle/pom.xml 2008-10-21 08:17:39 UTC (rev 992)
@@ -1,4 +1,5 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
@@ -31,8 +32,8 @@
<!-- *** Build Environment ************************************** -->
<!-- ************************************************************* -->
<scm>
- <connection>scm:svn:svn://anonymous@labs.libre-entreprise.org/svnroot/buix/lutinjaxx/trunk/jaxx-example/LabelStyle</connection>
- <developerConnection>scm:svn:svn+ssh://tchemit@labs.libre-entreprise.org/svnroot/buix/lutinjaxx/trunk/jaxx-example/LabelStyle</developerConnection>
- <url>http://labs.libre-entreprise.org/plugins/scmsvn/viewcvs.php/lutinjaxx/trunk…</url>
+ <connection>${scm.connection.example}</connection>
+ <developerConnection>${scm.developerConnection.example}</developerConnection>
+ <url>${scm.url.example}</url>
</scm>
</project>
\ No newline at end of file
Modified: lutinjaxx/trunk/jaxx-example/Validation/pom.xml
===================================================================
--- lutinjaxx/trunk/jaxx-example/Validation/pom.xml 2008-10-21 07:31:16 UTC (rev 991)
+++ lutinjaxx/trunk/jaxx-example/Validation/pom.xml 2008-10-21 08:17:39 UTC (rev 992)
@@ -1,4 +1,5 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
@@ -31,8 +32,8 @@
<!-- *** Build Environment ************************************** -->
<!-- ************************************************************* -->
<scm>
- <connection>scm:svn:svn://anonymous@labs.libre-entreprise.org/svnroot/buix/lutinjaxx/trunk/jaxx-example/Validation</connection>
- <developerConnection>scm:svn:svn+ssh://tchemit@labs.libre-entreprise.org/svnroot/buix/lutinjaxx/trunk/jaxx-example/Validation</developerConnection>
- <url>http://labs.libre-entreprise.org/plugins/scmsvn/viewcvs.php/lutinjaxx/trunk…</url>
+ <connection>${scm.connection.example}</connection>
+ <developerConnection>${scm.developerConnection.example}</developerConnection>
+ <url>${scm.url.example}</url>
</scm>
</project>
\ No newline at end of file
Modified: lutinjaxx/trunk/jaxx-example/pom.xml
===================================================================
--- lutinjaxx/trunk/jaxx-example/pom.xml 2008-10-21 07:31:16 UTC (rev 991)
+++ lutinjaxx/trunk/jaxx-example/pom.xml 2008-10-21 08:17:39 UTC (rev 992)
@@ -76,9 +76,9 @@
<!-- *** Build Environment ************************************** -->
<!-- ************************************************************* -->
<scm>
- <connection>scm:svn:svn://anonymous@labs.libre-entreprise.org/svnroot/buix/lutinjaxx/trunk/jaxx-example</connection>
- <developerConnection>scm:svn:svn+ssh://tchemit@labs.libre-entreprise.org/svnroot/buix/lutinjaxx/trunk/jaxx-example</developerConnection>
- <url>http://labs.libre-entreprise.org/plugins/scmsvn/viewcvs.php/lutinjaxx/trunk…</url>
+ <connection>${scm.connection.son}</connection>
+ <developerConnection>${scm.developerConnection.son}</developerConnection>
+ <url>${scm.url.son}</url>
</scm>
<build>
Modified: lutinjaxx/trunk/jaxx-swing-action/pom.xml
===================================================================
--- lutinjaxx/trunk/jaxx-swing-action/pom.xml 2008-10-21 07:31:16 UTC (rev 991)
+++ lutinjaxx/trunk/jaxx-swing-action/pom.xml 2008-10-21 08:17:39 UTC (rev 992)
@@ -65,10 +65,10 @@
<!-- ************************************************************* -->
<!-- *** Build Environment ************************************** -->
<!-- ************************************************************* -->
- <scm>
- <connection>scm:svn:svn://anonymous@labs.libre-entreprise.org/svnroot/buix/lutinjaxx/trunk/jaxx-swing-action</connection>
- <developerConnection>scm:svn:svn+ssh://tchemit@labs.libre-entreprise.org/svnroot/buix/lutinjaxx/trunk/jaxx-swing-action</developerConnection>
- <url>http://labs.libre-entreprise.org/plugins/scmsvn/viewcvs.php/lutinjaxx/trunk…</url>
+ <scm>
+ <connection>${scm.connection.son}</connection>
+ <developerConnection>${scm.developerConnection.son}</developerConnection>
+ <url>${scm.url.son}</url>
</scm>
</project>
Modified: lutinjaxx/trunk/jaxx-util/pom.xml
===================================================================
--- lutinjaxx/trunk/jaxx-util/pom.xml 2008-10-21 07:31:16 UTC (rev 991)
+++ lutinjaxx/trunk/jaxx-util/pom.xml 2008-10-21 08:17:39 UTC (rev 992)
@@ -38,8 +38,9 @@
<!-- *** Build Environment ************************************** -->
<!-- ************************************************************* -->
<scm>
- <connection>scm:svn:svn://anonymous@labs.libre-entreprise.org/svnroot/buix/lutinjaxx/trunk/jaxx-util</connection>
- <developerConnection>scm:svn:svn+ssh://tchemit@labs.libre-entreprise.org/svnroot/buix/lutinjaxx/trunk/jaxx-util</developerConnection>
- <url>http://labs.libre-entreprise.org/plugins/scmsvn/viewcvs.php/lutinjaxx/trunk…</url>
+ <connection>${scm.connection.son}</connection>
+ <developerConnection>${scm.developerConnection.son}</developerConnection>
+ <url>${scm.url.son}</url>
</scm>
+
</project>
Modified: lutinjaxx/trunk/maven-jaxx-plugin/pom.xml
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/pom.xml 2008-10-21 07:31:16 UTC (rev 991)
+++ lutinjaxx/trunk/maven-jaxx-plugin/pom.xml 2008-10-21 08:17:39 UTC (rev 992)
@@ -118,11 +118,10 @@
<!-- ************************************************************* -->
<!-- *** Build Environment ************************************** -->
<!-- ************************************************************* -->
- <scm>
- <connection>scm:svn:svn://anonymous@labs.libre-entreprise.org/svnroot/buix/lutinjaxx/trunk/maven-jaxx-plugin</connection>
- <developerConnection>scm:svn:svn+ssh://tchemit@labs.libre-entreprise.org/svnroot/buix/lutinjaxx/trunk/maven-jaxx-plugin</developerConnection>
- <url>http://labs.libre-entreprise.org/plugins/scmsvn/viewcvs.php/lutinjaxx/trunk…</url>
+ <scm>
+ <connection>${scm.connection.son}</connection>
+ <developerConnection>${scm.developerConnection.son}</developerConnection>
+ <url>${scm.url.son}</url>
</scm>
-
</project>
\ No newline at end of file
Modified: lutinjaxx/trunk/pom.xml
===================================================================
--- lutinjaxx/trunk/pom.xml 2008-10-21 07:31:16 UTC (rev 991)
+++ lutinjaxx/trunk/pom.xml 2008-10-21 08:17:39 UTC (rev 992)
@@ -1,4 +1,5 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
@@ -193,9 +194,9 @@
<!-- *** Build Environment ************************************** -->
<!-- ************************************************************* -->
<scm>
- <connection>scm:svn:svn://anonymous@labs.libre-entreprise.org/svnroot/buix/lutinjaxx/trunk</connection>
- <developerConnection>scm:svn:svn+ssh://tchemit@labs.libre-entreprise.org/svnroot/buix/lutinjaxx/trunk</developerConnection>
- <url>http://labs.libre-entreprise.org/plugins/scmsvn/viewcvs.php/lutinjaxx/trunk…</url>
+ <connection>${maven.scm.connection}</connection>
+ <developerConnection>${maven.scm.developerConnection}</developerConnection>
+ <url>${maven.scm.url}</url>
</scm>
<profiles>
1
0
r991 - in lutinjaxx/trunk: . jaxx-core jaxx-example jaxx-example/Calculator jaxx-example/Counter jaxx-example/LabelStyle jaxx-example/Validation jaxx-swing-action jaxx-util maven-jaxx-plugin
by tchemit@users.labs.libre-entreprise.org 21 Oct '08
by tchemit@users.labs.libre-entreprise.org 21 Oct '08
21 Oct '08
Author: tchemit
Date: 2008-10-21 07:31:16 +0000 (Tue, 21 Oct 2008)
New Revision: 991
Modified:
lutinjaxx/trunk/jaxx-core/pom.xml
lutinjaxx/trunk/jaxx-example/Calculator/pom.xml
lutinjaxx/trunk/jaxx-example/Counter/pom.xml
lutinjaxx/trunk/jaxx-example/LabelStyle/pom.xml
lutinjaxx/trunk/jaxx-example/Validation/pom.xml
lutinjaxx/trunk/jaxx-example/pom.xml
lutinjaxx/trunk/jaxx-swing-action/pom.xml
lutinjaxx/trunk/jaxx-util/pom.xml
lutinjaxx/trunk/maven-jaxx-plugin/pom.xml
lutinjaxx/trunk/pom.xml
Log:
[maven-release-plugin] prepare for next development iteration
Modified: lutinjaxx/trunk/jaxx-core/pom.xml
===================================================================
--- lutinjaxx/trunk/jaxx-core/pom.xml 2008-10-21 07:31:05 UTC (rev 990)
+++ lutinjaxx/trunk/jaxx-core/pom.xml 2008-10-21 07:31:16 UTC (rev 991)
@@ -10,7 +10,7 @@
<parent>
<groupId>org.codelutin</groupId>
<artifactId>lutinjaxx</artifactId>
- <version>0.5</version>
+ <version>0.6-SNAPSHOT</version>
</parent>
<artifactId>jaxx-core</artifactId>
@@ -62,8 +62,8 @@
<!-- *** Build Environment ************************************** -->
<!-- ************************************************************* -->
<scm>
- <connection>scm:svn:svn://anonymous@labs.libre-entreprise.org/svnroot/buix/lutinjaxx/tags/0.5/jaxx-core</connection>
- <developerConnection>scm:svn:svn+ssh://tchemit@labs.libre-entreprise.org/svnroot/buix/lutinjaxx/tags/0.5/jaxx-core</developerConnection>
- <url>http://labs.libre-entreprise.org/plugins/scmsvn/viewcvs.php/lutinjaxx/tags/…</url>
+ <connection>scm:svn:svn://anonymous@labs.libre-entreprise.org/svnroot/buix/lutinjaxx/trunk/jaxx-core</connection>
+ <developerConnection>scm:svn:svn+ssh://tchemit@labs.libre-entreprise.org/svnroot/buix/lutinjaxx/trunk/jaxx-core</developerConnection>
+ <url>http://labs.libre-entreprise.org/plugins/scmsvn/viewcvs.php/lutinjaxx/trunk…</url>
</scm>
</project>
Modified: lutinjaxx/trunk/jaxx-example/Calculator/pom.xml
===================================================================
--- lutinjaxx/trunk/jaxx-example/Calculator/pom.xml 2008-10-21 07:31:05 UTC (rev 990)
+++ lutinjaxx/trunk/jaxx-example/Calculator/pom.xml 2008-10-21 07:31:16 UTC (rev 991)
@@ -9,7 +9,7 @@
<parent>
<groupId>org.codelutin</groupId>
<artifactId>jaxx-example</artifactId>
- <version>0.5</version>
+ <version>0.6-SNAPSHOT</version>
</parent>
<groupId>org.codelutin.jaxx-example</groupId>
@@ -31,9 +31,9 @@
<!-- *** Build Environment ************************************** -->
<!-- ************************************************************* -->
<scm>
- <connection>scm:svn:svn://anonymous@labs.libre-entreprise.org/svnroot/buix/lutinjaxx/tags/0.5/jaxx-example/Calculator</connection>
- <developerConnection>scm:svn:svn+ssh://tchemit@labs.libre-entreprise.org/svnroot/buix/lutinjaxx/tags/0.5/jaxx-example/Calculator</developerConnection>
- <url>http://labs.libre-entreprise.org/plugins/scmsvn/viewcvs.php/lutinjaxx/tags/…</url>
+ <connection>scm:svn:svn://anonymous@labs.libre-entreprise.org/svnroot/buix/lutinjaxx/trunk/jaxx-example/Calculator</connection>
+ <developerConnection>scm:svn:svn+ssh://tchemit@labs.libre-entreprise.org/svnroot/buix/lutinjaxx/trunk/jaxx-example/Calculator</developerConnection>
+ <url>http://labs.libre-entreprise.org/plugins/scmsvn/viewcvs.php/lutinjaxx/trunk…</url>
</scm>
</project>
\ No newline at end of file
Modified: lutinjaxx/trunk/jaxx-example/Counter/pom.xml
===================================================================
--- lutinjaxx/trunk/jaxx-example/Counter/pom.xml 2008-10-21 07:31:05 UTC (rev 990)
+++ lutinjaxx/trunk/jaxx-example/Counter/pom.xml 2008-10-21 07:31:16 UTC (rev 991)
@@ -9,7 +9,7 @@
<parent>
<groupId>org.codelutin</groupId>
<artifactId>jaxx-example</artifactId>
- <version>0.5</version>
+ <version>0.6-SNAPSHOT</version>
</parent>
<groupId>org.codelutin.jaxx-example</groupId>
@@ -31,8 +31,8 @@
<!-- *** Build Environment ************************************** -->
<!-- ************************************************************* -->
<scm>
- <connection>scm:svn:svn://anonymous@labs.libre-entreprise.org/svnroot/buix/lutinjaxx/tags/0.5/jaxx-example/Counter</connection>
- <developerConnection>scm:svn:svn+ssh://tchemit@labs.libre-entreprise.org/svnroot/buix/lutinjaxx/tags/0.5/jaxx-example/Counter</developerConnection>
- <url>http://labs.libre-entreprise.org/plugins/scmsvn/viewcvs.php/lutinjaxx/tags/…</url>
+ <connection>scm:svn:svn://anonymous@labs.libre-entreprise.org/svnroot/buix/lutinjaxx/trunk/jaxx-example/Counter</connection>
+ <developerConnection>scm:svn:svn+ssh://tchemit@labs.libre-entreprise.org/svnroot/buix/lutinjaxx/trunk/jaxx-example/Counter</developerConnection>
+ <url>http://labs.libre-entreprise.org/plugins/scmsvn/viewcvs.php/lutinjaxx/trunk…</url>
</scm>
</project>
\ No newline at end of file
Modified: lutinjaxx/trunk/jaxx-example/LabelStyle/pom.xml
===================================================================
--- lutinjaxx/trunk/jaxx-example/LabelStyle/pom.xml 2008-10-21 07:31:05 UTC (rev 990)
+++ lutinjaxx/trunk/jaxx-example/LabelStyle/pom.xml 2008-10-21 07:31:16 UTC (rev 991)
@@ -9,7 +9,7 @@
<parent>
<groupId>org.codelutin</groupId>
<artifactId>jaxx-example</artifactId>
- <version>0.5</version>
+ <version>0.6-SNAPSHOT</version>
</parent>
<groupId>org.codelutin.jaxx-example</groupId>
@@ -31,8 +31,8 @@
<!-- *** Build Environment ************************************** -->
<!-- ************************************************************* -->
<scm>
- <connection>scm:svn:svn://anonymous@labs.libre-entreprise.org/svnroot/buix/lutinjaxx/tags/0.5/jaxx-example/LabelStyle</connection>
- <developerConnection>scm:svn:svn+ssh://tchemit@labs.libre-entreprise.org/svnroot/buix/lutinjaxx/tags/0.5/jaxx-example/LabelStyle</developerConnection>
- <url>http://labs.libre-entreprise.org/plugins/scmsvn/viewcvs.php/lutinjaxx/tags/…</url>
+ <connection>scm:svn:svn://anonymous@labs.libre-entreprise.org/svnroot/buix/lutinjaxx/trunk/jaxx-example/LabelStyle</connection>
+ <developerConnection>scm:svn:svn+ssh://tchemit@labs.libre-entreprise.org/svnroot/buix/lutinjaxx/trunk/jaxx-example/LabelStyle</developerConnection>
+ <url>http://labs.libre-entreprise.org/plugins/scmsvn/viewcvs.php/lutinjaxx/trunk…</url>
</scm>
</project>
\ No newline at end of file
Modified: lutinjaxx/trunk/jaxx-example/Validation/pom.xml
===================================================================
--- lutinjaxx/trunk/jaxx-example/Validation/pom.xml 2008-10-21 07:31:05 UTC (rev 990)
+++ lutinjaxx/trunk/jaxx-example/Validation/pom.xml 2008-10-21 07:31:16 UTC (rev 991)
@@ -9,7 +9,7 @@
<parent>
<groupId>org.codelutin</groupId>
<artifactId>jaxx-example</artifactId>
- <version>0.5</version>
+ <version>0.6-SNAPSHOT</version>
</parent>
<groupId>org.codelutin.jaxx-example</groupId>
@@ -31,8 +31,8 @@
<!-- *** Build Environment ************************************** -->
<!-- ************************************************************* -->
<scm>
- <connection>scm:svn:svn://anonymous@labs.libre-entreprise.org/svnroot/buix/lutinjaxx/tags/0.5/jaxx-example/Validation</connection>
- <developerConnection>scm:svn:svn+ssh://tchemit@labs.libre-entreprise.org/svnroot/buix/lutinjaxx/tags/0.5/jaxx-example/Validation</developerConnection>
- <url>http://labs.libre-entreprise.org/plugins/scmsvn/viewcvs.php/lutinjaxx/tags/…</url>
+ <connection>scm:svn:svn://anonymous@labs.libre-entreprise.org/svnroot/buix/lutinjaxx/trunk/jaxx-example/Validation</connection>
+ <developerConnection>scm:svn:svn+ssh://tchemit@labs.libre-entreprise.org/svnroot/buix/lutinjaxx/trunk/jaxx-example/Validation</developerConnection>
+ <url>http://labs.libre-entreprise.org/plugins/scmsvn/viewcvs.php/lutinjaxx/trunk…</url>
</scm>
</project>
\ No newline at end of file
Modified: lutinjaxx/trunk/jaxx-example/pom.xml
===================================================================
--- lutinjaxx/trunk/jaxx-example/pom.xml 2008-10-21 07:31:05 UTC (rev 990)
+++ lutinjaxx/trunk/jaxx-example/pom.xml 2008-10-21 07:31:16 UTC (rev 991)
@@ -9,7 +9,7 @@
<parent>
<groupId>org.codelutin</groupId>
<artifactId>lutinjaxx</artifactId>
- <version>0.5</version>
+ <version>0.6-SNAPSHOT</version>
</parent>
<artifactId>jaxx-example</artifactId>
@@ -76,9 +76,9 @@
<!-- *** Build Environment ************************************** -->
<!-- ************************************************************* -->
<scm>
- <connection>scm:svn:svn://anonymous@labs.libre-entreprise.org/svnroot/buix/lutinjaxx/tags/0.5/jaxx-example</connection>
- <developerConnection>scm:svn:svn+ssh://tchemit@labs.libre-entreprise.org/svnroot/buix/lutinjaxx/tags/0.5/jaxx-example</developerConnection>
- <url>http://labs.libre-entreprise.org/plugins/scmsvn/viewcvs.php/lutinjaxx/tags/…</url>
+ <connection>scm:svn:svn://anonymous@labs.libre-entreprise.org/svnroot/buix/lutinjaxx/trunk/jaxx-example</connection>
+ <developerConnection>scm:svn:svn+ssh://tchemit@labs.libre-entreprise.org/svnroot/buix/lutinjaxx/trunk/jaxx-example</developerConnection>
+ <url>http://labs.libre-entreprise.org/plugins/scmsvn/viewcvs.php/lutinjaxx/trunk…</url>
</scm>
<build>
@@ -140,7 +140,7 @@
<plugin>
<groupId>org.codelutin</groupId>
<artifactId>maven-jaxx-plugin</artifactId>
- <version>0.5</version>
+ <version>0.6-SNAPSHOT</version>
<configuration>
<src>${basedir}/src/main/java</src>
<force>true</force>
Modified: lutinjaxx/trunk/jaxx-swing-action/pom.xml
===================================================================
--- lutinjaxx/trunk/jaxx-swing-action/pom.xml 2008-10-21 07:31:05 UTC (rev 990)
+++ lutinjaxx/trunk/jaxx-swing-action/pom.xml 2008-10-21 07:31:16 UTC (rev 991)
@@ -11,7 +11,7 @@
<parent>
<groupId>org.codelutin</groupId>
<artifactId>lutinjaxx</artifactId>
- <version>0.5</version>
+ <version>0.6-SNAPSHOT</version>
</parent>
<artifactId>jaxx-swing-action</artifactId>
@@ -66,9 +66,9 @@
<!-- *** Build Environment ************************************** -->
<!-- ************************************************************* -->
<scm>
- <connection>scm:svn:svn://anonymous@labs.libre-entreprise.org/svnroot/buix/lutinjaxx/tags/0.5/jaxx-swing-action</connection>
- <developerConnection>scm:svn:svn+ssh://tchemit@labs.libre-entreprise.org/svnroot/buix/lutinjaxx/tags/0.5/jaxx-swing-action</developerConnection>
- <url>http://labs.libre-entreprise.org/plugins/scmsvn/viewcvs.php/lutinjaxx/tags/…</url>
+ <connection>scm:svn:svn://anonymous@labs.libre-entreprise.org/svnroot/buix/lutinjaxx/trunk/jaxx-swing-action</connection>
+ <developerConnection>scm:svn:svn+ssh://tchemit@labs.libre-entreprise.org/svnroot/buix/lutinjaxx/trunk/jaxx-swing-action</developerConnection>
+ <url>http://labs.libre-entreprise.org/plugins/scmsvn/viewcvs.php/lutinjaxx/trunk…</url>
</scm>
</project>
Modified: lutinjaxx/trunk/jaxx-util/pom.xml
===================================================================
--- lutinjaxx/trunk/jaxx-util/pom.xml 2008-10-21 07:31:05 UTC (rev 990)
+++ lutinjaxx/trunk/jaxx-util/pom.xml 2008-10-21 07:31:16 UTC (rev 991)
@@ -9,7 +9,7 @@
<parent>
<groupId>org.codelutin</groupId>
<artifactId>lutinjaxx</artifactId>
- <version>0.5</version>
+ <version>0.6-SNAPSHOT</version>
</parent>
<artifactId>jaxx-util</artifactId>
@@ -38,8 +38,8 @@
<!-- *** Build Environment ************************************** -->
<!-- ************************************************************* -->
<scm>
- <connection>scm:svn:svn://anonymous@labs.libre-entreprise.org/svnroot/buix/lutinjaxx/tags/0.5/jaxx-util</connection>
- <developerConnection>scm:svn:svn+ssh://tchemit@labs.libre-entreprise.org/svnroot/buix/lutinjaxx/tags/0.5/jaxx-util</developerConnection>
- <url>http://labs.libre-entreprise.org/plugins/scmsvn/viewcvs.php/lutinjaxx/tags/…</url>
+ <connection>scm:svn:svn://anonymous@labs.libre-entreprise.org/svnroot/buix/lutinjaxx/trunk/jaxx-util</connection>
+ <developerConnection>scm:svn:svn+ssh://tchemit@labs.libre-entreprise.org/svnroot/buix/lutinjaxx/trunk/jaxx-util</developerConnection>
+ <url>http://labs.libre-entreprise.org/plugins/scmsvn/viewcvs.php/lutinjaxx/trunk…</url>
</scm>
</project>
Modified: lutinjaxx/trunk/maven-jaxx-plugin/pom.xml
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/pom.xml 2008-10-21 07:31:05 UTC (rev 990)
+++ lutinjaxx/trunk/maven-jaxx-plugin/pom.xml 2008-10-21 07:31:16 UTC (rev 991)
@@ -9,7 +9,7 @@
<parent>
<groupId>org.codelutin</groupId>
<artifactId>lutinjaxx</artifactId>
- <version>0.5</version>
+ <version>0.6-SNAPSHOT</version>
</parent>
<artifactId>maven-jaxx-plugin</artifactId>
@@ -119,9 +119,9 @@
<!-- *** Build Environment ************************************** -->
<!-- ************************************************************* -->
<scm>
- <connection>scm:svn:svn://anonymous@labs.libre-entreprise.org/svnroot/buix/lutinjaxx/tags/0.5/maven-jaxx-plugin</connection>
- <developerConnection>scm:svn:svn+ssh://tchemit@labs.libre-entreprise.org/svnroot/buix/lutinjaxx/tags/0.5/maven-jaxx-plugin</developerConnection>
- <url>http://labs.libre-entreprise.org/plugins/scmsvn/viewcvs.php/lutinjaxx/tags/…</url>
+ <connection>scm:svn:svn://anonymous@labs.libre-entreprise.org/svnroot/buix/lutinjaxx/trunk/maven-jaxx-plugin</connection>
+ <developerConnection>scm:svn:svn+ssh://tchemit@labs.libre-entreprise.org/svnroot/buix/lutinjaxx/trunk/maven-jaxx-plugin</developerConnection>
+ <url>http://labs.libre-entreprise.org/plugins/scmsvn/viewcvs.php/lutinjaxx/trunk…</url>
</scm>
Modified: lutinjaxx/trunk/pom.xml
===================================================================
--- lutinjaxx/trunk/pom.xml 2008-10-21 07:31:05 UTC (rev 990)
+++ lutinjaxx/trunk/pom.xml 2008-10-21 07:31:16 UTC (rev 991)
@@ -33,7 +33,7 @@
<!-- *** Project Information ************************************* -->
<!-- ************************************************************* -->
<name>lutinjaxx</name>
- <version>0.5</version>
+ <version>0.6-SNAPSHOT</version>
<description>Jaxx lutin library main pom</description>
<inceptionYear>2008</inceptionYear>
@@ -119,23 +119,23 @@
<dependency>
<groupId>org.codelutin</groupId>
<artifactId>jaxx-util</artifactId>
- <version>0.5</version>
+ <version>0.6-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.codelutin</groupId>
<artifactId>jaxx-core</artifactId>
- <version>0.5</version>
+ <version>0.6-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.codelutin</groupId>
<artifactId>jaxx-swing-action</artifactId>
- <version>0.5</version>
+ <version>0.6-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.codelutin</groupId>
<artifactId>jaxx-example</artifactId>
- <version>0.5</version>
+ <version>0.6-SNAPSHOT</version>
</dependency>
<dependency>
@@ -193,9 +193,9 @@
<!-- *** Build Environment ************************************** -->
<!-- ************************************************************* -->
<scm>
- <connection>scm:svn:svn://anonymous@labs.libre-entreprise.org/svnroot/buix/lutinjaxx/tags/0.5</connection>
- <developerConnection>scm:svn:svn+ssh://tchemit@labs.libre-entreprise.org/svnroot/buix/lutinjaxx/tags/0.5</developerConnection>
- <url>http://labs.libre-entreprise.org/plugins/scmsvn/viewcvs.php/lutinjaxx/tags/…</url>
+ <connection>scm:svn:svn://anonymous@labs.libre-entreprise.org/svnroot/buix/lutinjaxx/trunk</connection>
+ <developerConnection>scm:svn:svn+ssh://tchemit@labs.libre-entreprise.org/svnroot/buix/lutinjaxx/trunk</developerConnection>
+ <url>http://labs.libre-entreprise.org/plugins/scmsvn/viewcvs.php/lutinjaxx/trunk…</url>
</scm>
<profiles>
1
0