Author: chatellier Date: 2011-04-15 16:41:27 +0000 (Fri, 15 Apr 2011) New Revision: 3255 Log: Fix validation Added: isis-fish/branches/3.3.1/src/main/resources/fr/ifremer/isisfish/entities/Strategy-basics-error-validation.xml Modified: isis-fish/branches/3.3.1/src/main/java/fr/ifremer/isisfish/ui/input/PortUI.jaxx isis-fish/branches/3.3.1/src/main/java/fr/ifremer/isisfish/ui/input/ZoneUI.jaxx isis-fish/branches/3.3.1/src/main/resources/fr/ifremer/isisfish/entities/Port-error-validation.xml isis-fish/branches/3.3.1/src/main/resources/fr/ifremer/isisfish/entities/Port-warning-validation.xml Modified: isis-fish/branches/3.3.1/src/main/java/fr/ifremer/isisfish/ui/input/PortUI.jaxx =================================================================== --- isis-fish/branches/3.3.1/src/main/java/fr/ifremer/isisfish/ui/input/PortUI.jaxx 2011-04-15 16:11:41 UTC (rev 3254) +++ isis-fish/branches/3.3.1/src/main/java/fr/ifremer/isisfish/ui/input/PortUI.jaxx 2011-04-15 16:41:27 UTC (rev 3255) @@ -44,7 +44,7 @@ bean='{getBean()}' beanClass='fr.ifremer.isisfish.entities.Port' uiClass="jaxx.runtime.validator.swing.ui.ImageValidationUI"> <field name="name" component="fieldPortName" /> - <field name="cell" component="portCell" /> + <field name="cell" component="spPortCell" /> </jaxx.runtime.validator.swing.SwingValidator> <script><![CDATA[ @@ -142,7 +142,7 @@ </row> <row> <cell columns='2' fill='both' weighty='0.7' weightx='1.0'> - <JScrollPane> + <JScrollPane id="spPortCell"> <JAXXList id="portCell" selectedValue='{getBean().getCell()}' selectionMode="0" onMouseClicked='portChanged()' enabled='{isActive()}' decorator='boxed' /> </JScrollPane> </cell> Modified: isis-fish/branches/3.3.1/src/main/java/fr/ifremer/isisfish/ui/input/ZoneUI.jaxx =================================================================== --- isis-fish/branches/3.3.1/src/main/java/fr/ifremer/isisfish/ui/input/ZoneUI.jaxx 2011-04-15 16:11:41 UTC (rev 3254) +++ isis-fish/branches/3.3.1/src/main/java/fr/ifremer/isisfish/ui/input/ZoneUI.jaxx 2011-04-15 16:41:27 UTC (rev 3255) @@ -48,7 +48,7 @@ bean='{getBean()}' beanClass='fr.ifremer.isisfish.entities.Zone' uiClass="jaxx.runtime.validator.swing.ui.ImageValidationUI"> <field name="name" component="fieldZoneName" /> - <field name="cell" component="zoneCells" /> + <field name="cell" component="spZoneCells" /> </jaxx.runtime.validator.swing.SwingValidator> <script><![CDATA[ @@ -156,7 +156,7 @@ </row> <row> <cell columns='2' fill='both' weighty='0.7' weightx='1.0'> - <JScrollPane> + <JScrollPane id="spZoneCells"> <!-- FIXME le binding genere un tas d'envenement multiples ! --> <JAXXList id="zoneCells" enabled='{isActive()}' selectedValues='{getBean().getCell() == null ? null : getBean().getCell().toArray()}' onValueChanged='zoneCellsChange(event)' decorator='boxed'/> Modified: isis-fish/branches/3.3.1/src/main/resources/fr/ifremer/isisfish/entities/Port-error-validation.xml =================================================================== --- isis-fish/branches/3.3.1/src/main/resources/fr/ifremer/isisfish/entities/Port-error-validation.xml 2011-04-15 16:11:41 UTC (rev 3254) +++ isis-fish/branches/3.3.1/src/main/resources/fr/ifremer/isisfish/entities/Port-error-validation.xml 2011-04-15 16:41:27 UTC (rev 3255) @@ -24,10 +24,10 @@ "-//OpenSymphony Group//XWork Validator 1.0.2//EN" "http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd"> <validators> - <field name="cell"> - <field-validator type="fieldexpression"> - <param name="expression"><![CDATA[ cell != null ]]></param> - <message>No port cell</message> + <field name="name"> + <field-validator type="requiredstring"> + <param name="trim">true</param> + <message>Missing name</message> </field-validator> </field> </validators> Modified: isis-fish/branches/3.3.1/src/main/resources/fr/ifremer/isisfish/entities/Port-warning-validation.xml =================================================================== --- isis-fish/branches/3.3.1/src/main/resources/fr/ifremer/isisfish/entities/Port-warning-validation.xml 2011-04-15 16:11:41 UTC (rev 3254) +++ isis-fish/branches/3.3.1/src/main/resources/fr/ifremer/isisfish/entities/Port-warning-validation.xml 2011-04-15 16:41:27 UTC (rev 3255) @@ -24,10 +24,10 @@ "-//OpenSymphony Group//XWork Validator 1.0.2//EN" "http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd"> <validators> - <field name="name"> - <field-validator type="requiredstring"> - <param name="trim">true</param> - <message>Missing name</message> + <field name="cell"> + <field-validator type="fieldexpression"> + <param name="expression"><![CDATA[ cell != null ]]></param> + <message>No port cell</message> </field-validator> </field> </validators> Added: isis-fish/branches/3.3.1/src/main/resources/fr/ifremer/isisfish/entities/Strategy-basics-error-validation.xml =================================================================== --- isis-fish/branches/3.3.1/src/main/resources/fr/ifremer/isisfish/entities/Strategy-basics-error-validation.xml (rev 0) +++ isis-fish/branches/3.3.1/src/main/resources/fr/ifremer/isisfish/entities/Strategy-basics-error-validation.xml 2011-04-15 16:41:27 UTC (rev 3255) @@ -0,0 +1,33 @@ +<!-- + #%L + $Id$ + $HeadURL$ + %% + Copyright (C) 2011 Ifremer, Codelutin, Chatellier Eric + %% + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as + published by the Free Software Foundation, either version 2 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 Public License for more details. + + You should have received a copy of the GNU General Public + License along with this program. If not, see + <http://www.gnu.org/licenses/gpl-2.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"> +<validators> + <field name="name"> + <field-validator type="requiredstring"> + <param name="trim">true</param> + <message>Missing name</message> + </field-validator> + </field> +</validators>