r2166 - in trunk: jaxx-tutorial-validation/src/main/resources/jaxx/demo/validation/model jaxx-validator/src/main/java/jaxx/runtime/validator/swing/ui
Author: tchemit Date: 2011-01-25 14:26:57 +0100 (Tue, 25 Jan 2011) New Revision: 2166 Url: http://nuiton.org/repositories/revision/jaxx/2166 Log: clean code + improve tutorial rules Modified: trunk/jaxx-tutorial-validation/src/main/resources/jaxx/demo/validation/model/Movie-update-info-validation.xml trunk/jaxx-validator/src/main/java/jaxx/runtime/validator/swing/ui/ImageValidationUI.java Modified: trunk/jaxx-tutorial-validation/src/main/resources/jaxx/demo/validation/model/Movie-update-info-validation.xml =================================================================== --- trunk/jaxx-tutorial-validation/src/main/resources/jaxx/demo/validation/model/Movie-update-info-validation.xml 2011-01-25 13:09:59 UTC (rev 2165) +++ trunk/jaxx-tutorial-validation/src/main/resources/jaxx/demo/validation/model/Movie-update-info-validation.xml 2011-01-25 13:26:57 UTC (rev 2166) @@ -1,27 +1,3 @@ -<!-- - #%L - JAXX :: Tutorial Validation - - $Id$ - $HeadURL$ - %% - Copyright (C) 2008 - 2011 CodeLutin - %% - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as - published by the Free Software Foundation, either version 3 of the - License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Lesser Public License for more details. - - You should have received a copy of the GNU General Lesser Public - License along with this program. If not, see - <http://www.gnu.org/licenses/lgpl-3.0.html>. - #L% - --> <!DOCTYPE validators PUBLIC "-//OpenSymphony Group//XWork Validator 1.0.2//EN" "http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd"> @@ -29,7 +5,7 @@ <field name="title"> <field-validator type="fieldexpression"> <param name="expression"> - <![CDATA[ title == null]]></param> + <![CDATA[ title == null || title.empty ]]></param> <message>Title is filled.</message> </field-validator> </field> Modified: trunk/jaxx-validator/src/main/java/jaxx/runtime/validator/swing/ui/ImageValidationUI.java =================================================================== --- trunk/jaxx-validator/src/main/java/jaxx/runtime/validator/swing/ui/ImageValidationUI.java 2011-01-25 13:09:59 UTC (rev 2165) +++ trunk/jaxx-validator/src/main/java/jaxx/runtime/validator/swing/ui/ImageValidationUI.java 2011-01-25 13:26:57 UTC (rev 2166) @@ -87,23 +87,6 @@ if (scope != null) { BufferedImage icon = icons.get(scope); g2.drawImage(icon, l.getWidth() - icon.getWidth() - 1, 0, null); -// switch (scope) { -// case FATAL: -// icon = fatalIcon; -// break; -// case ERROR: -// icon = errorIcon; -// break; -// case WARNING: -// icon = warningIcon; -// break; -// case INFO: -// icon = infoIcon; -// break; -// } -// if (icon != null) { -// g2.drawImage(icon, l.getWidth() - icon.getWidth() - 1, 0, null); -// } } } }
participants (1)
-
tchemit@users.nuiton.org