Jaxx-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
[Buix-commits] r970 - lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx
by tchemit@users.labs.libre-entreprise.org 18 Oct '08
by tchemit@users.labs.libre-entreprise.org 18 Oct '08
18 Oct '08
Author: tchemit
Date: 2008-10-18 11:25:38 +0000 (Sat, 18 Oct 2008)
New Revision: 970
Modified:
lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/CompilerTest.java
Log:
add test cases for validator + improve test of errors
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-18 11:25:15 UTC (rev 969)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/CompilerTest.java 2008-10-18 11:25:38 UTC (rev 970)
@@ -1,16 +1,18 @@
package org.codelutin.jaxx;
+import jaxx.compiler.JAXXCompiler;
import org.apache.maven.plugin.MojoExecutionException;
-import org.apache.maven.plugin.MojoFailureException;
import org.apache.maven.plugin.logging.SystemStreamLog;
import java.io.File;
+import java.lang.reflect.Field;
+import java.util.Map;
public class CompilerTest extends JaxxBaseTest {
- protected String prefix = "src" + File.separator + "test" + File.separator + "resources" + File.separator + "testcases" + File.separator;
+ protected String prefix = "src" + File.separator + "test" + File.separator + "resources" + File.separator + "testcases" + File.separator;
- public String getPrefix() {
+ public String getPrefix() {
return prefix;
}
@@ -65,34 +67,51 @@
// init mojo to get alls files to treate
mojo.init();
String[] files = mojo.getFiles();
+ assertEquals(34, mojo.getFiles().length);
+ mojo.setLog(new SystemStreamLog() {
+ @Override
+ public boolean isErrorEnabled() {
+ return false;
+ }
+
+ @Override
+ public void error(Throwable error) {
+ //do nothing
+ }
+
+ @Override
+ public void error(CharSequence content) {
+ //do nothing
+ }
+
+ @Override
+ public void error(CharSequence content, Throwable error) {
+ //do nothing
+ }
+ });
+ Field fieldCompilers = JAXXCompiler.class.getDeclaredField("compilers");
+ Field fieldErrorCount = JAXXCompiler.class.getDeclaredField("errorCount");
+
+ fieldCompilers.setAccessible(true);
+ fieldErrorCount.setAccessible(true);
+
// execute mjo on each jaxx file to produce the error
for (String file : files) {
- getLog().info("test bad file "+file);
+ getLog().info("test bad file " + file);
mojo.setFiles(new String[]{file});
try {
- mojo.setLog(new SystemStreamLog() {
- public boolean isErrorEnabled() {
- return false;
- }
-
- public void error(Throwable error) {
- //do nothing
- }
-
- public void error(CharSequence content) {
- //do nothing
- }
-
- public void error(CharSequence content, Throwable error) {
- //do nothing
- }
- });
mojo.doAction();
// should never pass
fail();
} catch (MojoExecutionException e) {
// ok jaxx compiler failed
assertTrue(true);
+
+ Map<String, JAXXCompiler> compilers = (Map<String, JAXXCompiler>) fieldCompilers.get(null);
+ assertEquals(1, compilers.size());
+ JAXXCompiler compiler = compilers.values().iterator().next();
+ Integer nberrors = (Integer) fieldErrorCount.get(compiler);
+ assertTrue(nberrors > 0);
}
}
}
@@ -155,4 +174,64 @@
assertEquals(1, files.length);
assertTrue(mojo.getUpdater().getMirrorFile(srcFile).lastModified() > oldTime);
}
+
+ public void testValidatorOk() throws Exception {
+ mojo.execute();
+ assertEquals(1, mojo.getFiles().length);
+
+ }
+
+ public void testValidatorErrors() throws Exception {
+ // init mojo to get alls files to treate
+ mojo.init();
+ String[] files = mojo.getFiles();
+ assertEquals(16, mojo.getFiles().length);
+ mojo.setLog(new SystemStreamLog() {
+ @Override
+ public boolean isErrorEnabled() {
+ return false;
+ }
+
+ @Override
+ public void error(Throwable error) {
+ //do nothing
+ }
+
+ @Override
+ public void error(CharSequence content) {
+ //do nothing
+ }
+
+ @Override
+ public void error(CharSequence content, Throwable error) {
+ //do nothing
+ }
+ });
+ Field fieldCompilers = JAXXCompiler.class.getDeclaredField("compilers");
+ Field fieldErrorCount = JAXXCompiler.class.getDeclaredField("errorCount");
+
+ fieldCompilers.setAccessible(true);
+ fieldErrorCount.setAccessible(true);
+
+ // execute mjo on each jaxx file to produce the error
+ for (String file : files) {
+ getLog().info("test bad file " + file);
+ mojo.setFiles(new String[]{file});
+ try {
+ mojo.doAction();
+ // should never pass
+ fail();
+ } catch (MojoExecutionException e) {
+ // ok jaxx compiler failed
+ assertTrue(true);
+
+ Map<String, JAXXCompiler> compilers = (Map<String, JAXXCompiler>) fieldCompilers.get(null);
+ assertEquals(1, compilers.size());
+ JAXXCompiler compiler = compilers.values().iterator().next();
+ Integer nberrors = (Integer) fieldErrorCount.get(compiler);
+ assertEquals(1, nberrors.intValue());
+ }
+ }
+ }
+
}
\ No newline at end of file
1
0
[Buix-commits] r969 - lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx
by tchemit@users.labs.libre-entreprise.org 18 Oct '08
by tchemit@users.labs.libre-entreprise.org 18 Oct '08
18 Oct '08
Author: tchemit
Date: 2008-10-18 11:25:15 +0000 (Sat, 18 Oct 2008)
New Revision: 969
Modified:
lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/BuildExamples.java
Log:
deprecated test
Modified: lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/BuildExamples.java
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/BuildExamples.java 2008-10-18 11:25:03 UTC (rev 968)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/BuildExamples.java 2008-10-18 11:25:15 UTC (rev 969)
@@ -3,8 +3,8 @@
import junit.framework.TestCase;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.apache.maven.it.VerificationException;
import org.apache.maven.it.Verifier;
-import org.apache.maven.it.VerificationException;
import org.codehaus.plexus.util.FileUtils;
import java.io.File;
@@ -13,8 +13,11 @@
import java.util.Arrays;
import java.util.List;
-/** @author chemit */
-public class BuildExamples extends TestCase {
+/**
+ * @author chemit
+ * @deprecated This goal is not ny longer used : we have specific maven modules to build examples...
+ */
+public abstract class BuildExamples extends TestCase {
protected static final Log log = LogFactory.getLog(BuildExamples.class);
@@ -95,8 +98,8 @@
protected void buildExample() throws VerificationException, IOException {
verifier.executeGoals(Arrays.asList("jaxx:generate", "package"));
verifier.verifyErrorFreeLog();
- FileUtils.copyDirectory(new File(siteDir, "lib"), new File(siteDestDir,"lib"));
- FileUtils.copyDirectory(siteDir, siteDestDir,"*.jnlp","");
+ FileUtils.copyDirectory(new File(siteDir, "lib"), new File(siteDestDir, "lib"));
+ FileUtils.copyDirectory(siteDir, siteDestDir, "*.jnlp", "");
}
1
0
[Buix-commits] r968 - in lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases: . validator validator/errors validator/ok
by tchemit@users.labs.libre-entreprise.org 18 Oct '08
by tchemit@users.labs.libre-entreprise.org 18 Oct '08
18 Oct '08
Author: tchemit
Date: 2008-10-18 11:25:03 +0000 (Sat, 18 Oct 2008)
New Revision: 968
Added:
lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/ValidatorErrors.xml
lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/ValidatorOk.xml
lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/
lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/errors/
lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/errors/AutoFieldComponentNotFound.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/errors/DuplicatedBean.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/errors/DuplicatedBean2.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/errors/DuplicatedErrorListModel.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/errors/DuplicatedFieldInOtherValidator.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/errors/DuplicatedFieldInSameValidator.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/errors/FieldBeanPropertyNotFound.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/errors/FieldComponentDuplicated.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/errors/FieldComponentDuplicated2.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/errors/FieldComponentNotFound.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/errors/FieldComponentNotFound2.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/errors/FieldNoName.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/errors/FieldNoName2.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/errors/Model.java
lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/errors/NoBean.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/errors/UnfoundBean.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/errors/UnfoundErrorListModel.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/ok/
lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/ok/Identity.java
lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/ok/Model.java
lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/ok/Validation.jaxx
Modified:
lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/Errors.xml
Log:
add test cases for validator
Modified: lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/Errors.xml
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/Errors.xml 2008-10-18 02:09:55 UTC (rev 967)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/Errors.xml 2008-10-18 11:25:03 UTC (rev 968)
@@ -15,6 +15,9 @@
<includes>
<value>**/errors/*.jaxx</value>
</includes>
+ <excludes>
+ <value>**/validator/errors/*.jaxx</value>
+ </excludes>
</configuration>
</plugin>
</plugins>
Copied: lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/ValidatorErrors.xml (from rev 948, lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/Errors.xml)
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/ValidatorErrors.xml (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/ValidatorErrors.xml 2008-10-18 11:25:03 UTC (rev 968)
@@ -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>**/validator/errors/*.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/ValidatorErrors.xml
___________________________________________________________________
Name: svn:mergeinfo
+
Added: lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/ValidatorOk.xml
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/ValidatorOk.xml (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/ValidatorOk.xml 2008-10-18 11:25:03 UTC (rev 968)
@@ -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>**/validator/ok/*.jaxx</value>
+ </includes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
Added: lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/errors/AutoFieldComponentNotFound.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/errors/AutoFieldComponentNotFound.jaxx (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/errors/AutoFieldComponentNotFound.jaxx 2008-10-18 11:25:03 UTC (rev 968)
@@ -0,0 +1,263 @@
+<Application title="Validation.jaxx">
+
+ <!-- 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' autoField='true' strictMode='true' errorListModel='errors'/>
+
+ <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'>
+ <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='textFake' text='{model.getText()}'
+ onKeyReleased='model.setText(textFake.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>
+ <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>
Added: lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/errors/DuplicatedBean.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/errors/DuplicatedBean.jaxx (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/errors/DuplicatedBean.jaxx 2008-10-18 11:25:03 UTC (rev 968)
@@ -0,0 +1,266 @@
+<Application title="Validation.jaxx">
+
+ <!-- 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='errors' bean='yo'>
+ <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'>
+ <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>
+ <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>
Added: lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/errors/DuplicatedBean2.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/errors/DuplicatedBean2.jaxx (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/errors/DuplicatedBean2.jaxx 2008-10-18 11:25:03 UTC (rev 968)
@@ -0,0 +1,266 @@
+<Application title="Validation.jaxx">
+
+ <!-- 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='errors'>
+ <field name="text"/>
+ <field name="text2"/>
+ <field name="ratio"/>
+ </BeanValidator>
+ <BeanValidator id='validator2' bean='model' 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'>
+ <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>
+ <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>
Added: lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/errors/DuplicatedErrorListModel.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/errors/DuplicatedErrorListModel.jaxx (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/errors/DuplicatedErrorListModel.jaxx 2008-10-18 11:25:03 UTC (rev 968)
@@ -0,0 +1,266 @@
+<Application title="Validation.jaxx">
+
+ <!-- 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='errors' errorListModel='yo'>
+ <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'>
+ <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>
+ <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>
Added: lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/errors/DuplicatedFieldInOtherValidator.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/errors/DuplicatedFieldInOtherValidator.jaxx (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/errors/DuplicatedFieldInOtherValidator.jaxx 2008-10-18 11:25:03 UTC (rev 968)
@@ -0,0 +1,266 @@
+<Application title="Validation.jaxx">
+
+ <!-- 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='errors'>
+ <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'>
+ <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>
+ <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>
Added: lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/errors/DuplicatedFieldInSameValidator.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/errors/DuplicatedFieldInSameValidator.jaxx (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/errors/DuplicatedFieldInSameValidator.jaxx 2008-10-18 11:25:03 UTC (rev 968)
@@ -0,0 +1,267 @@
+<Application title="Validation.jaxx">
+
+ <!-- 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='errors'>
+ <field name="text"/>
+ <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'>
+ <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>
+ <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>
Added: lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/errors/FieldBeanPropertyNotFound.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/errors/FieldBeanPropertyNotFound.jaxx (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/errors/FieldBeanPropertyNotFound.jaxx 2008-10-18 11:25:03 UTC (rev 968)
@@ -0,0 +1,266 @@
+<Application title="Validation.jaxx">
+
+ <!-- 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' errorListModel='errors' bean="model">
+ <field name="fake" component="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'>
+ <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>
+ <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>
Added: lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/errors/FieldComponentDuplicated.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/errors/FieldComponentDuplicated.jaxx (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/errors/FieldComponentDuplicated.jaxx 2008-10-18 11:25:03 UTC (rev 968)
@@ -0,0 +1,266 @@
+<Application title="Validation.jaxx">
+
+ <!-- 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' errorListModel='errors' bean="model">
+ <field name="text2" component="text"/>
+ <field name="text" component="text"/>
+ <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'>
+ <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>
+ <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>
Added: lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/errors/FieldComponentDuplicated2.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/errors/FieldComponentDuplicated2.jaxx (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/errors/FieldComponentDuplicated2.jaxx 2008-10-18 11:25:03 UTC (rev 968)
@@ -0,0 +1,266 @@
+<Application title="Validation.jaxx">
+
+ <!-- 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' errorListModel='errors' bean="model">
+ <field name="text" component="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'>
+ <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>
+ <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>
Added: lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/errors/FieldComponentNotFound.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/errors/FieldComponentNotFound.jaxx (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/errors/FieldComponentNotFound.jaxx 2008-10-18 11:25:03 UTC (rev 968)
@@ -0,0 +1,266 @@
+<Application title="Validation.jaxx">
+
+ <!-- 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' errorListModel='errors' bean="model">
+ <field name="text2" component="fake"/>
+ <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'>
+ <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>
+ <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>
Added: lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/errors/FieldComponentNotFound2.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/errors/FieldComponentNotFound2.jaxx (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/errors/FieldComponentNotFound2.jaxx 2008-10-18 11:25:03 UTC (rev 968)
@@ -0,0 +1,266 @@
+<Application title="Validation.jaxx">
+
+ <!-- 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' errorListModel='errors' bean="model">
+ <field name="fake"/>
+ <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'>
+ <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>
+ <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>
Added: lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/errors/FieldNoName.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/errors/FieldNoName.jaxx (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/errors/FieldNoName.jaxx 2008-10-18 11:25:03 UTC (rev 968)
@@ -0,0 +1,266 @@
+<Application title="Validation.jaxx">
+
+ <!-- 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' errorListModel='errors' bean="model">
+ <field />
+ <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'>
+ <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>
+ <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>
Added: lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/errors/FieldNoName2.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/errors/FieldNoName2.jaxx (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/errors/FieldNoName2.jaxx 2008-10-18 11:25:03 UTC (rev 968)
@@ -0,0 +1,266 @@
+<Application title="Validation.jaxx">
+
+ <!-- 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' errorListModel='errors' bean="model">
+ <field component="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'>
+ <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>
+ <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>
Added: lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/errors/Model.java
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/errors/Model.java (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/errors/Model.java 2008-10-18 11:25:03 UTC (rev 968)
@@ -0,0 +1,66 @@
+package testcases.validator.errors;
+
+import java.beans.*;
+
+public class Model {
+
+ protected String text = "text";
+
+ protected String text2 = "text2";
+
+ protected int ratio = 51;
+
+
+ PropertyChangeSupport p;
+
+ public Model() {
+ p = new PropertyChangeSupport(this);
+ }
+
+ public void addPropertyChangeListener(PropertyChangeListener listener) {
+ p.addPropertyChangeListener(listener);
+ }
+
+ public void addPropertyChangeListener(String propertyName, PropertyChangeListener listener) {
+ p.addPropertyChangeListener(propertyName, listener);
+ }
+
+ public void removePropertyChangeListener(PropertyChangeListener listener) {
+ p.removePropertyChangeListener(listener);
+ }
+
+ public void removePropertyChangeListener(String propertyName, PropertyChangeListener listener) {
+ p.removePropertyChangeListener(propertyName, listener);
+ }
+
+
+ public String getText() {
+ return text;
+ }
+
+ public String getText2() {
+ return text2;
+ }
+
+ public int getRatio() {
+ return ratio;
+ }
+
+ public void setText(String text) {
+ String oldText = this.text;
+ this.text = text;
+ p.firePropertyChange("text", oldText, text);
+ }
+
+ public void setText2(String text2) {
+ String oldText2 = this.text2;
+ this.text2 = text2;
+ p.firePropertyChange("text2", oldText2, text2);
+ }
+
+ public void setRatio(int ratio) {
+ int oldRatio = this.ratio;
+ this.ratio = ratio;
+ p.firePropertyChange("ratio",oldRatio, ratio);
+ }
+}
\ No newline at end of file
Added: lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/errors/NoBean.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/errors/NoBean.jaxx (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/errors/NoBean.jaxx 2008-10-18 11:25:03 UTC (rev 968)
@@ -0,0 +1,266 @@
+<Application title="Validation.jaxx">
+
+ <!-- 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' errorListModel='errors'>
+ <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'>
+ <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>
+ <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>
Added: lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/errors/UnfoundBean.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/errors/UnfoundBean.jaxx (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/errors/UnfoundBean.jaxx 2008-10-18 11:25:03 UTC (rev 968)
@@ -0,0 +1,266 @@
+<Application title="Validation.jaxx">
+
+ <!-- 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='fake' errorListModel='errors'>
+ <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'>
+ <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>
+ <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>
Added: 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 (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/errors/UnfoundErrorListModel.jaxx 2008-10-18 11:25:03 UTC (rev 968)
@@ -0,0 +1,266 @@
+<Application title="Validation.jaxx">
+
+ <!-- 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'>
+ <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>
+ <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>
Added: lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/ok/Identity.java
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/ok/Identity.java (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/ok/Identity.java 2008-10-18 11:25:03 UTC (rev 968)
@@ -0,0 +1,79 @@
+package testcases.validator.ok;
+
+import java.beans.PropertyChangeListener;
+import java.beans.PropertyChangeSupport;
+
+public class Identity {
+
+ protected String firstName = "";
+
+ protected String lastName = "";
+
+ protected String email = "dummy(a)codelutin.com";
+
+ protected int age = 51;
+
+
+ PropertyChangeSupport p;
+
+ public Identity() {
+ p = new PropertyChangeSupport(this);
+ }
+
+ public void addPropertyChangeListener(PropertyChangeListener listener) {
+ p.addPropertyChangeListener(listener);
+ }
+
+ public void addPropertyChangeListener(String propertyName, PropertyChangeListener listener) {
+ p.addPropertyChangeListener(propertyName, listener);
+ }
+
+ public void removePropertyChangeListener(PropertyChangeListener listener) {
+ p.removePropertyChangeListener(listener);
+ }
+
+ public void removePropertyChangeListener(String propertyName, PropertyChangeListener listener) {
+ p.removePropertyChangeListener(propertyName, listener);
+ }
+
+
+ public String getFirstName() {
+ return firstName;
+ }
+
+ public String getLastName() {
+ return lastName;
+ }
+
+ public String getEmail() {
+ return email;
+ }
+
+ public int getAge() {
+ return age;
+ }
+
+ public void setFirstName(String firstName) {
+ String oldFirstName = this.firstName;
+ this.firstName = firstName;
+ p.firePropertyChange("firstName", oldFirstName, firstName);
+ }
+
+ public void setLastName(String lastName) {
+ String oldLastName = this.lastName;
+ this.lastName = lastName;
+ p.firePropertyChange("lastName", oldLastName, lastName);
+ }
+
+ public void setEmail(String email) {
+ String oldEmail =this.email;
+ this.email = email;
+ p.firePropertyChange("email", oldEmail, email);
+ }
+
+ public void setAge(int age) {
+ int oldAge = this.age;
+ this.age = age;
+ p.firePropertyChange("age", oldAge, age);
+ }
+}
\ No newline at end of file
Added: lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/ok/Model.java
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/ok/Model.java (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/ok/Model.java 2008-10-18 11:25:03 UTC (rev 968)
@@ -0,0 +1,66 @@
+package testcases.validator.ok;
+
+import java.beans.*;
+
+public class Model {
+
+ protected String text = "text";
+
+ protected String text2 = "text2";
+
+ protected int ratio = 51;
+
+
+ PropertyChangeSupport p;
+
+ public Model() {
+ p = new PropertyChangeSupport(this);
+ }
+
+ public void addPropertyChangeListener(PropertyChangeListener listener) {
+ p.addPropertyChangeListener(listener);
+ }
+
+ public void addPropertyChangeListener(String propertyName, PropertyChangeListener listener) {
+ p.addPropertyChangeListener(propertyName, listener);
+ }
+
+ public void removePropertyChangeListener(PropertyChangeListener listener) {
+ p.removePropertyChangeListener(listener);
+ }
+
+ public void removePropertyChangeListener(String propertyName, PropertyChangeListener listener) {
+ p.removePropertyChangeListener(propertyName, listener);
+ }
+
+
+ public String getText() {
+ return text;
+ }
+
+ public String getText2() {
+ return text2;
+ }
+
+ public int getRatio() {
+ return ratio;
+ }
+
+ public void setText(String text) {
+ String oldText = this.text;
+ this.text = text;
+ p.firePropertyChange("text", oldText, text);
+ }
+
+ public void setText2(String text2) {
+ String oldText2 = this.text2;
+ this.text2 = text2;
+ p.firePropertyChange("text2", oldText2, text2);
+ }
+
+ public void setRatio(int ratio) {
+ int oldRatio = this.ratio;
+ this.ratio = ratio;
+ p.firePropertyChange("ratio",oldRatio, ratio);
+ }
+}
\ No newline at end of file
Added: lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/ok/Validation.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/ok/Validation.jaxx (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/ok/Validation.jaxx 2008-10-18 11:25:03 UTC (rev 968)
@@ -0,0 +1,270 @@
+<Application title="Validation.jaxx">
+
+ <!-- models -->
+ <Model id='model'/>
+ <Model id='model2'/>
+ <Identity id='identity'/>
+
+ <!-- errors model -->
+ <jaxx.runtime.validator.BeanValidatorErrorListModel id='errors' onContentsChanged='ok.setEnabled(errors.size()==0)'/>
+
+ <!-- validators -->
+ <BeanValidator id='validator' bean='model' errorListModel='errors'>
+ <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>
+ <BeanValidator id='validator3' autoField='true' bean='identity' errorListModel='errors' uiClass="jaxx.runtime.validator.ui.TranslucentValidationUI">
+ <field name="email" component="email2"/>
+ </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>
+ <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
[Buix-commits] r967 - in lutinjaxx/trunk/maven-jaxx-plugin/src: main/java/org/codelutin/jaxx test/java/org/codelutin/jaxx
by tchemit@users.labs.libre-entreprise.org 18 Oct '08
by tchemit@users.labs.libre-entreprise.org 18 Oct '08
18 Oct '08
Author: tchemit
Date: 2008-10-18 02:09:55 +0000 (Sat, 18 Oct 2008)
New Revision: 967
Modified:
lutinjaxx/trunk/maven-jaxx-plugin/src/main/java/org/codelutin/jaxx/JaxxGeneratorMojo.java
lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/CompilerTest.java
Log:
minimize logging when testing errors and do not test n times the same files :)
Modified: lutinjaxx/trunk/maven-jaxx-plugin/src/main/java/org/codelutin/jaxx/JaxxGeneratorMojo.java
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/main/java/org/codelutin/jaxx/JaxxGeneratorMojo.java 2008-10-18 02:02:29 UTC (rev 966)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/main/java/org/codelutin/jaxx/JaxxGeneratorMojo.java 2008-10-18 02:09:55 UTC (rev 967)
@@ -250,6 +250,11 @@
return;
}
+ doAction();
+
+ }
+
+ public void doAction() throws MojoExecutionException {
getLog().info("jaxx - will generate " + this.files.length + " jaxx file(s). ");
try {
@@ -271,7 +276,6 @@
throw new MojoExecutionException(e.getMessage(), e);
}
-
}
protected void fixCompileSourceRoots() {
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-18 02:02:29 UTC (rev 966)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/CompilerTest.java 2008-10-18 02:09:55 UTC (rev 967)
@@ -67,6 +67,7 @@
String[] files = mojo.getFiles();
// execute mjo on each jaxx file to produce the error
for (String file : files) {
+ getLog().info("test bad file "+file);
mojo.setFiles(new String[]{file});
try {
mojo.setLog(new SystemStreamLog() {
@@ -86,15 +87,12 @@
//do nothing
}
});
- mojo.execute();
+ mojo.doAction();
// should never pass
fail();
} catch (MojoExecutionException e) {
// ok jaxx compiler failed
assertTrue(true);
- } catch (MojoFailureException e) {
- // this exception should not appear
- fail();
}
}
}
1
0
[Buix-commits] r966 - lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx
by tchemit@users.labs.libre-entreprise.org 18 Oct '08
by tchemit@users.labs.libre-entreprise.org 18 Oct '08
18 Oct '08
Author: tchemit
Date: 2008-10-18 02:02:29 +0000 (Sat, 18 Oct 2008)
New Revision: 966
Modified:
lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/CompilerTest.java
Log:
minimize logging when testing errors
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-18 02:02:02 UTC (rev 965)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/CompilerTest.java 2008-10-18 02:02:29 UTC (rev 966)
@@ -2,6 +2,7 @@
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
+import org.apache.maven.plugin.logging.SystemStreamLog;
import java.io.File;
@@ -68,6 +69,23 @@
for (String file : files) {
mojo.setFiles(new String[]{file});
try {
+ mojo.setLog(new SystemStreamLog() {
+ public boolean isErrorEnabled() {
+ return false;
+ }
+
+ public void error(Throwable error) {
+ //do nothing
+ }
+
+ public void error(CharSequence content) {
+ //do nothing
+ }
+
+ public void error(CharSequence content, Throwable error) {
+ //do nothing
+ }
+ });
mojo.execute();
// should never pass
fail();
1
0
[Buix-commits] r965 - lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/tags
by tchemit@users.labs.libre-entreprise.org 18 Oct '08
by tchemit@users.labs.libre-entreprise.org 18 Oct '08
18 Oct '08
Author: tchemit
Date: 2008-10-18 02:02:02 +0000 (Sat, 18 Oct 2008)
New Revision: 965
Modified:
lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/tags/StyleHandler.java
Log:
do not throw an error when css parsing has failed... just an exception
Modified: lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/tags/StyleHandler.java
===================================================================
--- lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/tags/StyleHandler.java 2008-10-18 01:35:48 UTC (rev 964)
+++ lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/tags/StyleHandler.java 2008-10-18 02:02:02 UTC (rev 965)
@@ -14,6 +14,7 @@
import jaxx.css.Selector;
import jaxx.css.SimpleNode;
import jaxx.css.Stylesheet;
+import jaxx.css.ParseException;
import org.w3c.dom.Attr;
import org.w3c.dom.Element;
import org.w3c.dom.NamedNodeMap;
@@ -161,7 +162,12 @@
protected Stylesheet processStylesheet(String stylesheetText) throws CompilerException {
CSSParser p = new CSSParser(new StringReader(stylesheetText));
- SimpleNode node = p.Stylesheet();
+ SimpleNode node;
+ try {
+ node = p.Stylesheet();
+ } catch (Error e) {
+ throw new CompilerException(e);
+ }
List<Rule> rules = new ArrayList<Rule>();
for (int i = 0; i < node.jjtGetNumChildren(); i++) {
SimpleNode ruleNode = node.getChild(i);
1
0
[Buix-commits] r964 - in lutinjaxx/trunk/jaxx-example: . Calculator Components Counter LabelStyle Validation
by tchemit@users.labs.libre-entreprise.org 18 Oct '08
by tchemit@users.labs.libre-entreprise.org 18 Oct '08
18 Oct '08
Author: tchemit
Date: 2008-10-18 01:35:48 +0000 (Sat, 18 Oct 2008)
New Revision: 964
Modified:
lutinjaxx/trunk/jaxx-example/Calculator/pom.xml
lutinjaxx/trunk/jaxx-example/Components/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
Log:
using webstart plugin 1.0-alpha-2-cl_20081018 :
will not execute this goal form a pom module, so no more need to add in build cycle the webstart plugin on each example (directly in jaxx-example pom)
Modified: lutinjaxx/trunk/jaxx-example/Calculator/pom.xml
===================================================================
--- lutinjaxx/trunk/jaxx-example/Calculator/pom.xml 2008-10-18 01:34:21 UTC (rev 963)
+++ lutinjaxx/trunk/jaxx-example/Calculator/pom.xml 2008-10-18 01:35:48 UTC (rev 964)
@@ -30,15 +30,6 @@
<packaging>jar</packaging>
- <build>
- <plugins>
- <plugin>
- <groupId>org.codehaus.mojo.webstart</groupId>
- <artifactId>webstart-maven-plugin</artifactId>
- </plugin>
- </plugins>
- </build>
-
<!-- ************************************************************* -->
<!-- *** Build Environment ************************************** -->
<!-- ************************************************************* -->
Modified: lutinjaxx/trunk/jaxx-example/Components/pom.xml
===================================================================
--- lutinjaxx/trunk/jaxx-example/Components/pom.xml 2008-10-18 01:34:21 UTC (rev 963)
+++ lutinjaxx/trunk/jaxx-example/Components/pom.xml 2008-10-18 01:35:48 UTC (rev 964)
@@ -22,8 +22,6 @@
<!-- *** Project Information ************************************* -->
<!-- ************************************************************* -->
<name>Components example</name>
- <version>0.5-SNAPSHOT</version>
- <inceptionYear>2008</inceptionYear>
<description>Jaxx Components example</description>
<!-- ************************************************************* -->
@@ -32,12 +30,12 @@
<packaging>jar</packaging>
- <build>
- <plugins>
- <plugin>
- <groupId>org.codehaus.mojo.webstart</groupId>
- <artifactId>webstart-maven-plugin</artifactId>
- </plugin>
- </plugins>
- </build>
+ <!-- ************************************************************* -->
+ <!-- *** Build Environment ************************************** -->
+ <!-- ************************************************************* -->
+ <scm>
+ <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-18 01:34:21 UTC (rev 963)
+++ lutinjaxx/trunk/jaxx-example/Counter/pom.xml 2008-10-18 01:35:48 UTC (rev 964)
@@ -30,15 +30,6 @@
<packaging>jar</packaging>
- <build>
- <plugins>
- <plugin>
- <groupId>org.codehaus.mojo.webstart</groupId>
- <artifactId>webstart-maven-plugin</artifactId>
- </plugin>
- </plugins>
- </build>
-
<!-- ************************************************************* -->
<!-- *** Build Environment ************************************** -->
<!-- ************************************************************* -->
Modified: lutinjaxx/trunk/jaxx-example/LabelStyle/pom.xml
===================================================================
--- lutinjaxx/trunk/jaxx-example/LabelStyle/pom.xml 2008-10-18 01:34:21 UTC (rev 963)
+++ lutinjaxx/trunk/jaxx-example/LabelStyle/pom.xml 2008-10-18 01:35:48 UTC (rev 964)
@@ -30,15 +30,6 @@
<packaging>jar</packaging>
- <build>
- <plugins>
- <plugin>
- <groupId>org.codehaus.mojo.webstart</groupId>
- <artifactId>webstart-maven-plugin</artifactId>
- </plugin>
- </plugins>
- </build>
-
<!-- ************************************************************* -->
<!-- *** Build Environment ************************************** -->
<!-- ************************************************************* -->
Modified: lutinjaxx/trunk/jaxx-example/Validation/pom.xml
===================================================================
--- lutinjaxx/trunk/jaxx-example/Validation/pom.xml 2008-10-18 01:34:21 UTC (rev 963)
+++ lutinjaxx/trunk/jaxx-example/Validation/pom.xml 2008-10-18 01:35:48 UTC (rev 964)
@@ -30,15 +30,6 @@
<packaging>jar</packaging>
- <build>
- <plugins>
- <plugin>
- <groupId>org.codehaus.mojo.webstart</groupId>
- <artifactId>webstart-maven-plugin</artifactId>
- </plugin>
- </plugins>
- </build>
-
<!-- ************************************************************* -->
<!-- *** Build Environment ************************************** -->
<!-- ************************************************************* -->
Modified: lutinjaxx/trunk/jaxx-example/pom.xml
===================================================================
--- lutinjaxx/trunk/jaxx-example/pom.xml 2008-10-18 01:34:21 UTC (rev 963)
+++ lutinjaxx/trunk/jaxx-example/pom.xml 2008-10-18 01:35:48 UTC (rev 964)
@@ -152,7 +152,7 @@
<plugin>
<groupId>org.codelutin</groupId>
<artifactId>maven-jaxx-plugin</artifactId>
- <version>0.5-SNAPSHOT</version>
+ <version>${current.version}</version>
<configuration>
<src>${basedir}/src/main/java</src>
<force>true</force>
@@ -192,7 +192,7 @@
<plugin>
<groupId>org.codehaus.mojo.webstart</groupId>
<artifactId>webstart-maven-plugin</artifactId>
- <version>1.0-alpha-2-cl_20081016</version>
+ <version>1.0-alpha-2-cl_20081018</version>
<executions>
<execution>
<phase>package</phase>
@@ -202,6 +202,7 @@
</execution>
</executions>
<configuration>
+ <force>false</force>
<dependencies>
<excludes>
<exclude>javax.help:javahelp</exclude>
@@ -262,6 +263,11 @@
<artifactId>maven-dependency-plugin</artifactId>
</plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo.webstart</groupId>
+ <artifactId>webstart-maven-plugin</artifactId>
+ </plugin>
+
</plugins>
</build>
1
0
[Buix-commits] r963 - lutinjaxx/trunk/jaxx-example/Validation/src/main/java/examples/Validation
by tchemit@users.labs.libre-entreprise.org 18 Oct '08
by tchemit@users.labs.libre-entreprise.org 18 Oct '08
18 Oct '08
Author: tchemit
Date: 2008-10-18 01:34:21 +0000 (Sat, 18 Oct 2008)
New Revision: 963
Modified:
lutinjaxx/trunk/jaxx-example/Validation/src/main/java/examples/Validation/Validation.jaxx
Log:
validation example with all new stuff (auto JXLayer boxing, uiClass)
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-18 01:33:05 UTC (rev 962)
+++ lutinjaxx/trunk/jaxx-example/Validation/src/main/java/examples/Validation/Validation.jaxx 2008-10-18 01:34:21 UTC (rev 963)
@@ -7,7 +7,7 @@
<Identity id='identity'/>
<!-- errors model -->
- <DefaultListModel id='errors' onIntervalAdded='ok.setEnabled(errors.size()==0)' onIntervalRemoved='ok.setEnabled(errors.size()==0)'/>
+ <jaxx.runtime.validator.BeanValidatorErrorListModel id='errors' onContentsChanged='ok.setEnabled(errors.size()==0)'/>
<!-- validators -->
<BeanValidator id='validator' bean='model' errorListModel='errors'>
@@ -15,12 +15,12 @@
<field name="text2"/>
<field name="ratio"/>
</BeanValidator>
- <BeanValidator id='validator2' bean='model2' errorListModel='errors'>
+ <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>
- <BeanValidator id='validator3' autoField='true' bean='identity' errorListModel='errors'>
+ <BeanValidator id='validator3' autoField='true' bean='identity' errorListModel='errors' uiClass="jaxx.runtime.validator.ui.TranslucentValidationUI">
<field name="email" component="email2"/>
</BeanValidator>
@@ -35,10 +35,8 @@
<JLabel text='Text:'/>
</cell>
<cell weightx='1'>
- <org.jdesktop.jxlayer.JXLayer>
<JTextField id='text' text='{model.getText()}'
onKeyReleased='model.setText(text.getText())'/>
- </org.jdesktop.jxlayer.JXLayer>
</cell>
</row>
<row>
@@ -46,10 +44,8 @@
<JLabel text='Text2:'/>
</cell>
<cell weightx='1'>
- <org.jdesktop.jxlayer.JXLayer>
<JTextField id='text2' text='{model.getText2()}'
onKeyReleased='model.setText2(text2.getText())'/>
- </org.jdesktop.jxlayer.JXLayer>
</cell>
</row>
@@ -58,10 +54,8 @@
<JLabel text='Ratio:'/>
</cell>
<cell>
- <org.jdesktop.jxlayer.JXLayer>
<JSlider id='ratio' minimum='0' maximum='100' value='{model.getRatio()}'
onStateChanged='model.setRatio(ratio.getValue())'/>
- </org.jdesktop.jxlayer.JXLayer>
</cell>
</row>
</Table>
@@ -110,10 +104,8 @@
<JLabel text='Text:'/>
</cell>
<cell weightx='1'>
- <org.jdesktop.jxlayer.JXLayer>
<JTextField id='_text' text='{model2.getText()}'
onKeyReleased='model2.setText(_text.getText())'/>
- </org.jdesktop.jxlayer.JXLayer>
</cell>
</row>
<row>
@@ -121,10 +113,8 @@
<JLabel text='Text2:'/>
</cell>
<cell weightx='1'>
- <org.jdesktop.jxlayer.JXLayer>
<JTextField id='_text2' text='{model2.getText2()}'
onKeyReleased='model2.setText2(_text2.getText())'/>
- </org.jdesktop.jxlayer.JXLayer>
</cell>
</row>
@@ -133,10 +123,8 @@
<JLabel text='Ratio:'/>
</cell>
<cell>
- <org.jdesktop.jxlayer.JXLayer>
<JSlider id='_ratio' minimum='0' maximum='100' value='{model2.getRatio()}'
onStateChanged='model2.setRatio(_ratio.getValue())'/>
- </org.jdesktop.jxlayer.JXLayer>
</cell>
</row>
</Table>
@@ -185,10 +173,8 @@
<JLabel text='FirstName:'/>
</cell>
<cell weightx='1'>
- <org.jdesktop.jxlayer.JXLayer>
<JTextField id='firstName' text='{identity.getFirstName()}'
onKeyReleased='identity.setFirstName(firstName.getText())'/>
- </org.jdesktop.jxlayer.JXLayer>
</cell>
</row>
<row>
@@ -196,10 +182,8 @@
<JLabel text='LastName:'/>
</cell>
<cell weightx='1'>
- <org.jdesktop.jxlayer.JXLayer>
<JTextField id='lastName' text='{identity.getLastName()}'
onKeyReleased='identity.setLastName(lastName.getText())'/>
- </org.jdesktop.jxlayer.JXLayer>
</cell>
</row>
<row>
@@ -207,10 +191,8 @@
<JLabel text='Email:'/>
</cell>
<cell weightx='1'>
- <org.jdesktop.jxlayer.JXLayer>
<JTextField id='email2' text='{identity.getEmail()}'
onKeyReleased='identity.setEmail(email2.getText())'/>
- </org.jdesktop.jxlayer.JXLayer>
</cell>
</row>
@@ -219,10 +201,8 @@
<JLabel text='Age:'/>
</cell>
<cell>
- <org.jdesktop.jxlayer.JXLayer>
<JSlider id='age' minimum='0' maximum='100' value='{identity.getAge()}'
onStateChanged='identity.setAge(age.getValue())'/>
- </org.jdesktop.jxlayer.JXLayer>
</cell>
</row>
</Table>
1
0
[Buix-commits] r962 - lutinjaxx/trunk/jaxx-core/src/main/resources
by tchemit@users.labs.libre-entreprise.org 18 Oct '08
by tchemit@users.labs.libre-entreprise.org 18 Oct '08
18 Oct '08
Author: tchemit
Date: 2008-10-18 01:33:05 +0000 (Sat, 18 Oct 2008)
New Revision: 962
Removed:
lutinjaxx/trunk/jaxx-core/src/main/resources/example.jnlp
lutinjaxx/trunk/jaxx-core/src/main/resources/manifest.mf
Log:
not used (see jaxx-examples for jnlp building of examples)
Deleted: lutinjaxx/trunk/jaxx-core/src/main/resources/example.jnlp
===================================================================
--- lutinjaxx/trunk/jaxx-core/src/main/resources/example.jnlp 2008-10-18 00:56:40 UTC (rev 961)
+++ lutinjaxx/trunk/jaxx-core/src/main/resources/example.jnlp 2008-10-18 01:33:05 UTC (rev 962)
@@ -1,16 +0,0 @@
-<jnlp spec="1.0+" codebase="http://www.jaxxframework.org/examples/@name@" href="@name@.jnlp">
- <information>
- <title>@name@.jaxx</title>
- <vendor>jaxxframework.org</vendor>
- <offline-allowed/>
- </information>
-
- <resources>
- <j2se version="1.4.0+" href="http://java.sun.com/products/autodl/j2se"/>
- <jar href="@name@.jar"/>
- <jar href="../jaxx-runtime.jar"/>
- </resources>
-
- <application-desc main-class="examples.@name@.@name@"/>
-</jnlp>
-
Deleted: lutinjaxx/trunk/jaxx-core/src/main/resources/manifest.mf
===================================================================
--- lutinjaxx/trunk/jaxx-core/src/main/resources/manifest.mf 2008-10-18 00:56:40 UTC (rev 961)
+++ lutinjaxx/trunk/jaxx-core/src/main/resources/manifest.mf 2008-10-18 01:33:05 UTC (rev 962)
@@ -1,4 +0,0 @@
-Manifest-Version: 1.0
-Class-Path: ../jaxx-runtime.jar
-Main-Class: @class@
-
1
0
[Buix-commits] r961 - in lutinjaxx/trunk/jaxx-core/src/main/java/jaxx: compiler runtime tags/validator
by tchemit@users.labs.libre-entreprise.org 18 Oct '08
by tchemit@users.labs.libre-entreprise.org 18 Oct '08
18 Oct '08
Author: tchemit
Date: 2008-10-18 00:56:40 +0000 (Sat, 18 Oct 2008)
New Revision: 961
Modified:
lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/compiler/CompiledObject.java
lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/compiler/JAXXCompiler.java
lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/runtime/Util.java
lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/tags/validator/BeanValidatorHandler.java
Log:
automatic boxing by a JXLayer for any component attached toa validator
Modified: lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/compiler/CompiledObject.java
===================================================================
--- lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/compiler/CompiledObject.java 2008-10-18 00:53:46 UTC (rev 960)
+++ lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/compiler/CompiledObject.java 2008-10-18 00:56:40 UTC (rev 961)
@@ -133,8 +133,9 @@
public static boolean isValidID(String id) {
boolean valid = true;
- if (id.length() == 0)
+ if (id.length() == 0) {
valid = false;
+ }
if (valid) {
if (!Character.isJavaIdentifierStart(id.charAt(0))) {
valid = false;
@@ -467,13 +468,21 @@
String delegateCode = containerDelegate != null ? "." + containerDelegate + "()" : "";
child.setParent(this);
+ String javaCode = child.getJavaCode();
+ if (compiler.hasValidator()) {
+ // some validators are defined on this object
+ boolean found = compiler.isComponentUsedByValidator(child.getId());
+ if (found) {
+ // box the child component in a JxLayer
+ javaCode = "jaxx.runtime.Util.boxComponentWithJxLayer(" + javaCode + ")";
+ }
+ }
if (constraints != null) {
- appendAdditionCode(getJavaCode() + delegateCode + ".add(" + child.getJavaCode() + ", " + constraints + ");");
+ appendAdditionCode(getJavaCode() + delegateCode + ".add(" + javaCode + ", " + constraints + ");");
+ } else {
+ appendAdditionCode(getJavaCode() + delegateCode + ".add(" + javaCode + ");");
}
- else {
- appendAdditionCode(getJavaCode() + delegateCode + ".add(" + child.getJavaCode() + ");");
- }
}
}
@@ -487,8 +496,9 @@
compiler.registerDataBinding(src, getId() + "." + property, assignment);
}
+ /** @return the array of generic types of the compiled object, or a empty array if none defined */
public ClassDescriptor[] getGenericTypes() {
- if (genericTypes==null) {
+ if (genericTypes == null) {
return new ClassDescriptor[0];
}
try {
Modified: lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/compiler/JAXXCompiler.java
===================================================================
--- lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/compiler/JAXXCompiler.java 2008-10-18 00:53:46 UTC (rev 960)
+++ lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/compiler/JAXXCompiler.java 2008-10-18 00:56:40 UTC (rev 961)
@@ -181,6 +181,9 @@
/** list of validators */
protected List<CompiledBeanValidator> validators = new ArrayList<CompiledBeanValidator>();
+ /** list of objectId attached to a validator * */
+ protected List<String> validatedComponents = new ArrayList<String>();
+
private SymbolTable symbolTable = new SymbolTable();
// TODO: replace these public StringBuffers with something a little less stupid
@@ -2181,15 +2184,32 @@
this.failed = failed;
}
+ /**
+ * Register in this compiler a new compiled validator.
+ *
+ * @param validator the compiled validator to register
+ */
public void registerValidator(CompiledBeanValidator validator) {
validators.add(validator);
+ validatedComponents.addAll(validator.getFields().values());
}
+ /** @return <code>true</code> if some validators were detected, <code>false</code> otherwise */
public boolean hasValidator() {
return !validators.isEmpty();
}
/**
+ * Test if a given CompiledObject is attached to a validator.
+ *
+ * @param componentId the compiled object to test
+ * @return <code>true</code> if the given compiled object is attached to a validator, <code>false</code> otherwise
+ */
+ public boolean isComponentUsedByValidator(String componentId) {
+ return validatedComponents.contains(componentId);
+ }
+
+ /**
* Check that a reference exists in symbol table on second compil pass
*
* @param tag the current tag
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-18 00:53:46 UTC (rev 960)
+++ lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/runtime/Util.java 2008-10-18 00:56:40 UTC (rev 961)
@@ -2,6 +2,7 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.jdesktop.jxlayer.JXLayer;
import javax.swing.JComponent;
import java.awt.Component;
@@ -282,7 +283,7 @@
*
* @param clazz la classe ou recherche les champs
* @param container le container ou rechercher les composants d'edition
- * @return
+ * @return le dictionnaire des composants recherches.
*/
public static Map<String, JComponent> lookingForEditor(Class clazz, Container container) {
Map<String, JComponent> result = new HashMap<String, JComponent>();
@@ -331,4 +332,15 @@
return result;
}
+ /**
+ * Box a component in a {@link org.jdesktop.jxlayer.JXLayer}.
+ *
+ * @param component the component to box
+ * @return the {@link org.jdesktop.jxlayer.JXLayer} boxing the component
+ */
+ public static JXLayer boxComponentWithJxLayer(JComponent component) {
+ JXLayer layer = new org.jdesktop.jxlayer.JXLayer();
+ layer.add(component);
+ return layer;
+ }
}
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-18 00:53:46 UTC (rev 960)
+++ lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/tags/validator/BeanValidatorHandler.java 2008-10-18 00:56:40 UTC (rev 961)
@@ -176,6 +176,11 @@
// 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 + ");");
1
0