knguyen     2005/05/03 11:59:04 CEST

  Modified files:        (Branch: JAHIA-4-1-BRANCH)
    src/java/org/jahia/engines/validation JahiaFieldChecks.java 
  Log:
  - fix problems in getting the languages for a PAGE field.
  - Improvement (or bugfix) to allow a combination of standard and "Jahia 
multilanguage" checks.
  
  Revision  Changes    Path
  1.1.2.3   +16 -3     
jahia/src/java/org/jahia/engines/validation/JahiaFieldChecks.java
http://jahia.mine.nu:8080/cgi-bin/cvsweb.cgi/jahia/src/java/org/jahia/engines/validation/JahiaFieldChecks.java.diff?r1=1.1.2.2&r2=1.1.2.3&f=h
  
  
  
  Index: JahiaFieldChecks.java
  ===================================================================
  RCS file: 
/home/cvs/repository/jahia/src/java/org/jahia/engines/validation/Attic/JahiaFieldChecks.java,v
  retrieving revision 1.1.2.2
  retrieving revision 1.1.2.3
  diff -u -r1.1.2.2 -r1.1.2.3
  --- JahiaFieldChecks.java     2 Mar 2005 14:31:23 -0000       1.1.2.2
  +++ JahiaFieldChecks.java     3 May 2005 09:59:04 -0000       1.1.2.3
  @@ -44,6 +44,7 @@
   import javax.servlet.http.HttpServletRequest;
   
   import org.apache.commons.beanutils.PropertyUtils;
  +import org.apache.commons.validator.*;
   import org.apache.commons.validator.Field;
   import org.apache.commons.validator.ValidatorAction;
   import org.apache.struts.action.ActionMessages;
  @@ -87,7 +88,11 @@
           Field field,
           ActionMessages errors,
           HttpServletRequest request) {
  -        Object value = getPropertyValue(bean, field.getProperty());
  +            
  +        Arg mltProperty = field.getArg("mltProperty", 0);
  +        Object value = getPropertyValue(bean, 
  +            mltProperty != null && 
"mltProperty".equals(mltProperty.getName())? 
  +                mltProperty.getKey()  : field.getProperty());
   
           if (!(value instanceof JahiaMltHelper)) {
               if (value != null) {
  @@ -124,7 +129,11 @@
           Field field,
           ActionMessages errors,
           HttpServletRequest request) {
  -        Object value = getPropertyValue(bean, field.getProperty());
  +            
  +        Arg mltProperty = field.getArg("mltProperty", 0);
  +        Object value = getPropertyValue(bean, 
  +            mltProperty != null && 
"mltProperty".equals(mltProperty.getName())? 
  +                mltProperty.getKey()  : field.getProperty());            
   
           if (!(value instanceof JahiaMltHelper)) {
               if (value != null) {
  @@ -166,7 +175,11 @@
           Field field,
           ActionMessages errors,
           HttpServletRequest request) {
  -        Object value = getPropertyValue(bean, field.getProperty());
  +            
  +        Arg mltProperty = field.getArg("mltProperty", 0);
  +        Object value = getPropertyValue(bean, 
  +            mltProperty != null && 
"mltProperty".equals(mltProperty.getName())? 
  +                mltProperty.getKey()  : field.getProperty());
   
           if (!(value instanceof JahiaMltHelper)) {
               if (value != null) {
  

Reply via email to