Author: tchemit Date: 2008-10-25 19:47:06 +0000 (Sat, 25 Oct 2008) New Revision: 996 Added: lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/errors/UnfoundErrorList.jaxx Modified: lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/CompilerTest.java lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/errors/UnfoundErrorListModel.jaxx Log: add a errorList attribute for set a ErrorListMouseListener on the errorList Modified: lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/CompilerTest.java =================================================================== --- lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/CompilerTest.java 2008-10-25 19:46:47 UTC (rev 995) +++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/CompilerTest.java 2008-10-25 19:47:06 UTC (rev 996) @@ -186,7 +186,7 @@ // init mojo to get alls files to treate mojo.init(); String[] files = mojo.getFiles(); - assertEquals(16, mojo.getFiles().length); + assertEquals(17, mojo.getFiles().length); mojo.setLog(new SystemStreamLog() { @Override public boolean isErrorEnabled() { Copied: lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/errors/UnfoundErrorList.jaxx (from rev 968, lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/errors/UnfoundErrorListModel.jaxx) =================================================================== --- lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/errors/UnfoundErrorList.jaxx (rev 0) +++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/errors/UnfoundErrorList.jaxx 2008-10-25 19:47:06 UTC (rev 996) @@ -0,0 +1,85 @@ +<Application title="Validation.jaxx"> + + <!-- models --> + <Model id='model'/> + + <jaxx.runtime.validator.BeanValidatorErrorListModel id='errors'/> + + <!-- validators --> + <BeanValidator id='validator' bean='model' errorList='fake'> + <field name="text"/> + <field name="text2"/> + <field name="ratio"/> + </BeanValidator> + <Table fill='both'> + <row> + <cell weightx='1' weighty='1' insets='6, 3, 0, 0'> + <JPanel border='{BorderFactory.createTitledBorder("Form")}' + layout='{new GridLayout()}' width='250' height='120'> + <Table anchor='west' fill='both'> + <row> + <cell> + <JLabel text='Text:'/> + </cell> + <cell weightx='1'> + <JTextField id='text' text='{model.getText()}' + onKeyReleased='model.setText(text.getText())'/> + </cell> + </row> + <row> + <cell> + <JLabel text='Text2:'/> + </cell> + <cell weightx='1'> + <JTextField id='text2' text='{model.getText2()}' + onKeyReleased='model.setText2(text2.getText())'/> + </cell> + </row> + + <row> + <cell> + <JLabel text='Ratio:'/> + </cell> + <cell> + <JSlider id='ratio' minimum='0' maximum='100' value='{model.getRatio()}' + onStateChanged='model.setRatio(ratio.getValue())'/> + </cell> + </row> + </Table> + </JPanel> + </cell> + <cell weightx='1' weighty='1' insets='6, 3, 0, 0'> + <JPanel border='{BorderFactory.createTitledBorder("Model")}' + layout='{new GridLayout()}' width='250' height='120'> + <Table anchor='west' fill='both'> + <row> + <cell> + <JLabel text='Text:'/> + </cell> + <cell weightx='1'> + <JLabel text='{model.getText()}'/> + </cell> + </row> + <row> + <cell> + <JLabel text='Text2:'/> + </cell> + <cell weightx='1'> + <JLabel text='{model.getText2()}'/> + </cell> + </row> + + <row> + <cell> + <JLabel text='Ratio:'/> + </cell> + <cell> + <JLabel text='{model.getRatio()}'/> + </cell> + </row> + </Table> + </JPanel> + </cell> + </row> + </Table> +</Application> Property changes on: lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/errors/UnfoundErrorList.jaxx ___________________________________________________________________ Name: svn:mergeinfo + Modified: lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/errors/UnfoundErrorListModel.jaxx =================================================================== --- lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/errors/UnfoundErrorListModel.jaxx 2008-10-25 19:46:47 UTC (rev 995) +++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/validator/errors/UnfoundErrorListModel.jaxx 2008-10-25 19:47:06 UTC (rev 996) @@ -2,23 +2,13 @@ <!-- models --> <Model id='model'/> - <Model id='model2'/> - <!-- errors model --> - <jaxx.runtime.validator.BeanValidatorErrorListModel id='errors' onContentsChanged='ok.setEnabled(errors.size()==0)'/> - <!-- validators --> <BeanValidator id='validator' bean='model' errorListModel='fake'> <field name="text"/> <field name="text2"/> <field name="ratio"/> </BeanValidator> - <BeanValidator id='validator2' bean='model2' errorListModel='errors' uiClass="jaxx.runtime.validator.ui.IconValidationUI"> - <field name="text" component="_text"/> - <field name="text2" component="_text2"/> - <field name="ratio" component="_ratio"/> - </BeanValidator> - <Table fill='both'> <row> <cell weightx='1' weighty='1' insets='6, 3, 0, 0'> @@ -89,178 +79,5 @@ </JPanel> </cell> </row> - <row> - <cell weightx='1' weighty='1' insets='6, 3, 0, 0'> - <JPanel border='{BorderFactory.createTitledBorder("Form2")}' - layout='{new GridLayout()}' width='250' height='120'> - <Table anchor='west' fill='both'> - <row> - <cell> - <JLabel text='Text:'/> - </cell> - <cell weightx='1'> - <JTextField id='_text' text='{model2.getText()}' - onKeyReleased='model2.setText(_text.getText())'/> - </cell> - </row> - <row> - <cell> - <JLabel text='Text2:'/> - </cell> - <cell weightx='1'> - <JTextField id='_text2' text='{model2.getText2()}' - onKeyReleased='model2.setText2(_text2.getText())'/> - </cell> - </row> - - <row> - <cell> - <JLabel text='Ratio:'/> - </cell> - <cell> - <JSlider id='_ratio' minimum='0' maximum='100' value='{model2.getRatio()}' - onStateChanged='model2.setRatio(_ratio.getValue())'/> - </cell> - </row> - </Table> - </JPanel> - </cell> - <cell weightx='1' weighty='1' insets='6, 3, 0, 0'> - <JPanel border='{BorderFactory.createTitledBorder("Model2")}' - layout='{new GridLayout()}' width='250' height='120'> - <Table anchor='west' fill='both'> - <row> - <cell> - <JLabel text='Text:'/> - </cell> - <cell weightx='1'> - <JLabel text='{model2.getText()}'/> - </cell> - </row> - <row> - <cell> - <JLabel text='Text2:'/> - </cell> - <cell weightx='1'> - <JLabel text='{model2.getText2()}'/> - </cell> - </row> - - <row> - <cell> - <JLabel text='Ratio:'/> - </cell> - <cell> - <JLabel text='{model2.getRatio()}'/> - </cell> - </row> - </Table> - </JPanel> - </cell> - </row> - <row> - <cell weightx='1' weighty='1' insets='6, 3, 0, 0'> - <JPanel border='{BorderFactory.createTitledBorder("Identify Form")}' - layout='{new GridLayout()}' width='250' height='140'> - <Table anchor='west' fill='both'> - <row> - <cell> - <JLabel text='FirstName:'/> - </cell> - <cell weightx='1'> - <JTextField id='firstName' text='{identity.getFirstName()}' - onKeyReleased='identity.setFirstName(firstName.getText())'/> - </cell> - </row> - <row> - <cell> - <JLabel text='LastName:'/> - </cell> - <cell weightx='1'> - <JTextField id='lastName' text='{identity.getLastName()}' - onKeyReleased='identity.setLastName(lastName.getText())'/> - </cell> - </row> - <row> - <cell> - <JLabel text='Email:'/> - </cell> - <cell weightx='1'> - <JTextField id='email2' text='{identity.getEmail()}' - onKeyReleased='identity.setEmail(email2.getText())'/> - </cell> - </row> - - <row> - <cell> - <JLabel text='Age:'/> - </cell> - <cell> - <JSlider id='age' minimum='0' maximum='100' value='{identity.getAge()}' - onStateChanged='identity.setAge(age.getValue())'/> - </cell> - </row> - </Table> - </JPanel> - </cell> - <cell weightx='1' weighty='1' insets='6, 3, 0, 0'> - <JPanel border='{BorderFactory.createTitledBorder("Identity Model")}' - layout='{new GridLayout()}' width='250' height='120'> - <Table anchor='west' fill='both'> - <row> - <cell> - <JLabel text='FirstName:'/> - </cell> - <cell weightx='1'> - <JLabel text='{identity.getFirstName()}'/> - </cell> - </row> - <row> - <cell> - <JLabel text='LastName:'/> - </cell> - <cell weightx='1'> - <JLabel text='{identity.getLastName()}'/> - </cell> - </row> - <row> - <cell> - <JLabel text='Email:'/> - </cell> - <cell weightx='1'> - <JLabel text='{identity.getEmail()}'/> - </cell> - </row> - - <row> - <cell> - <JLabel text='Age:'/> - </cell> - <cell> - <JLabel text='{identity.getAge()}'/> - </cell> - </row> - </Table> - </JPanel> - </cell> - </row> - <row> - <cell columns='2' fill="both"> - <JPanel border='{BorderFactory.createTitledBorder("Errors")}' layout='{new GridLayout()}' height='200' width='500'> - <JScrollPane> - <JList model='{errors}'/> - </JScrollPane> - </JPanel> - </cell> - </row> - <row> - <cell columns='2' fill="both"> - <JPanel layout='{new GridLayout(1,2,0,0)}'> - <JButton text='cancel' onActionPerformed='dispose()'/> - <JButton id='ok' text='valid' onActionPerformed='dispose()'/> - </JPanel> - </cell> - </row> - </Table> </Application>