diff -ur --exclude=.svn trunk/build.xml branch/build.xml --- trunk/build.xml 2010-06-14 10:24:51.816931012 -0400 +++ branch/build.xml 2010-06-14 10:20:50.540957607 -0400 @@ -3,7 +3,7 @@ - + diff -ur --exclude=.svn trunk/metadata/api/hibernate/org/openmrs/api/db/hibernate/ConceptClass.hbm.xml branch/metadata/api/hibernate/org/openmrs/api/db/hibernate/ConceptClass.hbm.xml --- trunk/metadata/api/hibernate/org/openmrs/api/db/hibernate/ConceptClass.hbm.xml 2010-06-14 10:21:36.160930457 -0400 +++ branch/metadata/api/hibernate/org/openmrs/api/db/hibernate/ConceptClass.hbm.xml 2010-06-14 10:18:08.072431996 -0400 @@ -17,8 +17,8 @@ - + - + - + - + message_state IN (0,1) + + + + Change the width of name column to varchar(50) + + + + + + + Change the width of name column to varchar(50) + + + + + + + Change the width of name column to varchar(50) + + + + + + + Change the width of name column to varchar(50) + + + + \ No newline at end of file diff -ur --exclude=.svn trunk/.project branch/.project --- trunk/.project 2010-06-14 10:24:51.800931701 -0400 +++ branch/.project 2010-06-14 10:20:50.536961220 -0400 @@ -1,6 +1,6 @@ - openmrs-trunk + metadata-localization diff -ur --exclude=.svn trunk/src/api/org/openmrs/api/db/hibernate/HibernateConceptDAO.java branch/src/api/org/openmrs/api/db/hibernate/HibernateConceptDAO.java --- trunk/src/api/org/openmrs/api/db/hibernate/HibernateConceptDAO.java 2010-06-14 10:24:30.384432612 -0400 +++ branch/src/api/org/openmrs/api/db/hibernate/HibernateConceptDAO.java 2010-06-14 10:20:33.004430899 -0400 @@ -16,6 +16,7 @@ import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.SQLException; +import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; import java.util.HashSet; @@ -29,6 +30,7 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.hibernate.Criteria; +import org.hibernate.Hibernate; import org.hibernate.NonUniqueObjectException; import org.hibernate.Query; import org.hibernate.SQLQuery; @@ -64,6 +66,7 @@ import org.openmrs.api.context.Context; import org.openmrs.api.db.ConceptDAO; import org.openmrs.api.db.DAOException; +import org.openmrs.util.LocalizedStringUtil; import org.openmrs.util.OpenmrsConstants; /** @@ -377,7 +380,7 @@ else sql += " asc"; Query query = sessionFactory.getCurrentSession().createQuery(sql); - return (List) query.list(); + return query.list(); } /** @@ -407,7 +410,7 @@ searchCriteria.add(Expression.eq("drug.concept", concept)); if (drugName != null) searchCriteria.add(Expression.eq("drug.name", drugName)); - return (List) searchCriteria.list(); + return searchCriteria.list(); } /** @@ -450,10 +453,19 @@ */ @SuppressWarnings("unchecked") public List getConceptClasses(String name) throws DAOException { + List ccList = new ArrayList(); Criteria crit = sessionFactory.getCurrentSession().createCriteria(ConceptClass.class); - if (name != null) - crit.add(Expression.eq("name", name)); - return crit.list(); + if (name != null) { + // firstly, search in those conceptClasses which haven't been localized + crit.add(Expression.sql("name = ?", LocalizedStringUtil.escapeDelimiter(name), Hibernate.STRING)); + ccList = crit.list(); + + // secondly, search in those conceptClasses which have been localized + ccList.addAll(HibernateUtil.findMetadatasExactlyByLocalizedColumn(name, "name", true, ConceptClass.class, + sessionFactory)); + } + + return ccList; } /** diff -ur --exclude=.svn trunk/src/api/org/openmrs/api/db/hibernate/HibernateEncounterDAO.java branch/src/api/org/openmrs/api/db/hibernate/HibernateEncounterDAO.java --- trunk/src/api/org/openmrs/api/db/hibernate/HibernateEncounterDAO.java 2010-06-14 10:24:30.384432612 -0400 +++ branch/src/api/org/openmrs/api/db/hibernate/HibernateEncounterDAO.java 2010-06-14 10:20:33.008431827 -0400 @@ -15,16 +15,18 @@ import java.util.ArrayList; import java.util.Collection; +import java.util.Collections; +import java.util.Comparator; import java.util.Date; import java.util.List; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.hibernate.Criteria; +import org.hibernate.Hibernate; import org.hibernate.SQLQuery; import org.hibernate.SessionFactory; import org.hibernate.criterion.Expression; -import org.hibernate.criterion.MatchMode; import org.hibernate.criterion.Order; import org.openmrs.Encounter; import org.openmrs.EncounterType; @@ -36,6 +38,7 @@ import org.openmrs.api.EncounterService; import org.openmrs.api.db.DAOException; import org.openmrs.api.db.EncounterDAO; +import org.openmrs.util.LocalizedStringUtil; /** * Hibernate specific dao for the {@link EncounterService} All calls should be made on the @@ -162,9 +165,13 @@ public EncounterType getEncounterType(String name) throws DAOException { Criteria crit = sessionFactory.getCurrentSession().createCriteria(EncounterType.class); crit.add(Expression.eq("retired", false)); - crit.add(Expression.eq("name", name)); + crit.add(Expression.sql("name = ?", LocalizedStringUtil.escapeDelimiter(name), Hibernate.STRING)); EncounterType encounterType = (EncounterType) crit.uniqueResult(); + if (encounterType == null) //search in those localized encounterTypes + encounterType = HibernateUtil.getUniqueMetadataByLocalizedColumn(name, "name", false, EncounterType.class, + sessionFactory); + return encounterType; } @@ -173,15 +180,20 @@ */ @SuppressWarnings("unchecked") public List getAllEncounterTypes(Boolean includeRetired) throws DAOException { - Criteria criteria = sessionFactory.getCurrentSession().createCriteria(EncounterType.class); - - criteria.addOrder(Order.asc("name")); - if (includeRetired == false) criteria.add(Expression.eq("retired", false)); + List results = criteria.list(); - return criteria.list(); + // do java sorting on the return value of "getName()", + // because maybe both unlocalized and localized encounterTypes are in "results" list + Collections.sort(results, new Comparator() { + @Override + public int compare(EncounterType left, EncounterType right) { + return left.getName().compareTo(right.getName()); + } + }); + return results; } /** @@ -189,10 +201,34 @@ */ @SuppressWarnings("unchecked") public List findEncounterTypes(String name) throws DAOException { - return sessionFactory.getCurrentSession().createCriteria(EncounterType.class) - // 'ilike' case insensitive search - .add(Expression.ilike("name", name, MatchMode.START)).addOrder(Order.asc("name")).addOrder( - Order.asc("retired")).list(); + List results = null; + + // firstly, search in those unlocalized encounterTypes + Criteria crit = sessionFactory.getCurrentSession().createCriteria(EncounterType.class); + crit.add(Expression.sql("UPPER(name) like ?", LocalizedStringUtil.escapeDelimiter(name).toUpperCase() + "%", + Hibernate.STRING)); + results = crit.addOrder(Order.asc("localizedName")).addOrder(Order.asc("retired")).list(); + + // secondly, search in those localized encounterTypes + List temp = HibernateUtil.findMetadatasFuzzilyByLocalizedColumn(name, "name", true, false, + EncounterType.class, sessionFactory); + + // only when there exist localized encounterTypes which match the passed name, + // then do java sorting on the orderBy fields, this is for the quick speed of query. + if (!temp.isEmpty()) { + results.addAll(temp); + Collections.sort(results, new Comparator() { + @Override + public int compare(EncounterType left, EncounterType right) { + int res = left.getName().compareTo(right.getName()); + if (res == 0) + res = left.isRetired().compareTo(right.isRetired()); + return res; + } + }); + } + + return results; } /** diff -ur --exclude=.svn trunk/src/api/org/openmrs/api/db/hibernate/HibernateUtil.java branch/src/api/org/openmrs/api/db/hibernate/HibernateUtil.java --- trunk/src/api/org/openmrs/api/db/hibernate/HibernateUtil.java 2010-06-14 10:24:30.380431964 -0400 +++ branch/src/api/org/openmrs/api/db/hibernate/HibernateUtil.java 2010-06-14 10:20:33.004430899 -0400 @@ -14,15 +14,23 @@ package org.openmrs.api.db.hibernate; import java.sql.SQLException; +import java.util.ArrayList; +import java.util.List; import org.apache.commons.lang.StringUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; +import org.hibernate.Criteria; +import org.hibernate.Hibernate; import org.hibernate.HibernateException; import org.hibernate.SessionFactory; +import org.hibernate.criterion.Expression; import org.hibernate.dialect.Dialect; import org.hibernate.dialect.HSQLDialect; import org.hibernate.engine.SessionFactoryImplementor; +import org.openmrs.BaseOpenmrsMetadata; +import org.openmrs.serialization.LocalizedStringSerializer; +import org.openmrs.util.LocalizedStringUtil; /** * This class holds common methods and utilities that are used across the hibernate related classes @@ -99,7 +107,7 @@ log.warn("Error generated", e); } - //insert an escape character before each sql wildcard in the search phrase + //insert an escape character before each sql wildcard in the search phrase return StringUtils.replaceEach(oldString, new String[] { "%", "_", "*" }, new String[] { escapeCharacter + "%", escapeCharacter + "_", escapeCharacter + "*" }); } else @@ -107,4 +115,136 @@ } + /** + * Find metadatas (return a list in one time) by exactly searching the localized database field + * which is specified by given columnName. + *

+ * Note: + *

    + *
  1. The search range is just those metadatas which's name property has been localized + *
  2. This method returns a list because of some metadatas allow duplicated values in one + * field(e.g, {@link org.openmrs.Form} allows duplicated names)
  3. + *
  4. The search logic in this method doesn't have order by option
  5. + *
      + * + * @param + * @param value - value to match + * @param columnName - column to match in + * @param includeRetired - if includeRetired is true, also get retired metadatas. + * @param searchClazz - the class related to the searched database table + * @param sessionFactory - SessionFactory to create Criteria from + * @return A object extends {@link BaseOpenmrsMetadata} if exist, otherwise null + */ + @SuppressWarnings("unchecked") + public static List findMetadatasExactlyByLocalizedColumn( + String value, + String columnName, + boolean includeRetired, + Class searchClazz, + SessionFactory sessionFactory) { + List results = new ArrayList(); + + if (value != null) { + // Search in those metadatas have been localized + Criteria crit = sessionFactory.getCurrentSession().createCriteria(searchClazz); + if (includeRetired == false) + crit.add(Expression.eq("retired", false)); + crit.add(Expression.sql(columnName + " like ?", "%" + LocalizedStringSerializer.PARTITION + + LocalizedStringUtil.escapeDelimiter(value) + LocalizedStringSerializer.SPLITTER + "%", + Hibernate.STRING)); + results = crit.list(); + } + + return results; + } + + /** + * Get the unique metadata object by searching the localized database field which is specified + * by given columnName. + *

      + * Note: The search range is just those metadatas which's name property has been localized + * + * @param + * @param value - value to match + * @param columnName - column to match in + * @param includeRetired - if includeRetired is true, also get retired metadatas. + * @param searchClazz - the class related to the searched database table + * @param sessionFactory - SessionFactory to create Criteria from + * @return A object extends {@link BaseOpenmrsMetadata} if exist, otherwise null + * @see HibernateUtil#findMetadatasExactlyByLocalizedColumn(String, String, boolean, Class, + * SessionFactory) + */ + public static T getUniqueMetadataByLocalizedColumn(String value, String columnName, + boolean includeRetired, + Class searchClazz, + SessionFactory sessionFactory) { + List results = findMetadatasExactlyByLocalizedColumn(value, columnName, includeRetired, searchClazz, + sessionFactory); + + if (results == null || results.isEmpty()) + return null; + if (results.size() == 1) + return results.get(0); + else { + // this is a less-frequent use case, more than one records are found + // and we should return the record which's name match within user's current locale firstly if exist + // , otherwise return the first found one + for (T tt : results) { + if (value.equals(tt.getName())) + return tt; + } + + // if no record matches user's current locale, then return the first found one + return results.get(0); + } + } + + /** + * Find metadatas (return a list in one time) by fuzzily searching the localized database field + * which is specified by given columnName. + *

      + * Note: + *

        + *
      • The search logic in this method doesn't have order by option
      • + *
      • The search range is just those metadatas which's name property has been localized
      • + *
      + * + * @param + * @param value - value to match + * @param columnName - column to match in + * @param includeRetired - if includeRetired is true, also get retired metadatas. + * @param caseSensitive - if caseSensitive is false, do sql query similar to hibernate's "ilike" + * @param searchClazz - the class related to the searched database table + * @param sessionFactory - SessionFactory to create Criteria from + * @return A list of objects extend {@link BaseOpenmrsMetadata} if exist, otherwise null + */ + @SuppressWarnings("unchecked") + public static List findMetadatasFuzzilyByLocalizedColumn( + String value, + String columnName, + boolean includeRetired, + boolean caseSensitive, + Class searchClazz, + SessionFactory sessionFactory) { + Criteria crit = sessionFactory.getCurrentSession().createCriteria(searchClazz); + + // search those metadatas have been localized + if (includeRetired == false) + crit.add(Expression.eq("retired", false)); + + String queryStr = ""; + String queryValue = ""; + if (caseSensitive == false) { + queryStr = "UPPER(" + columnName + ") like ?"; + queryValue = "%" + LocalizedStringSerializer.PARTITION + + LocalizedStringUtil.escapeDelimiter(value).toUpperCase() + "%"; + } else { + queryStr = columnName + " like ?"; + queryValue = "%" + LocalizedStringSerializer.PARTITION + LocalizedStringUtil.escapeDelimiter(value) + "%"; + } + crit.add(Expression.sql(queryStr, queryValue, Hibernate.STRING)); + + return crit.list(); + } + } Only in branch/src/api/org/openmrs/api/db/hibernate: LocalizedStringType.java diff -ur --exclude=.svn trunk/src/api/org/openmrs/ConceptClass.java branch/src/api/org/openmrs/ConceptClass.java --- trunk/src/api/org/openmrs/ConceptClass.java 2010-06-14 10:24:33.276931025 -0400 +++ branch/src/api/org/openmrs/ConceptClass.java 2010-06-14 10:20:38.136432791 -0400 @@ -28,6 +28,8 @@ private Integer conceptClassId; + private LocalizedString localizedName; + // Constructors /** default constructor */ @@ -39,7 +41,8 @@ this.conceptClassId = conceptClassId; } - public boolean equals(Object obj) { + @Override + public boolean equals(Object obj) { if (obj instanceof ConceptClass) { ConceptClass c = (ConceptClass) obj; return (this.conceptClassId.equals(c.getConceptClassId())); @@ -47,7 +50,8 @@ return false; } - public int hashCode() { + @Override + public int hashCode() { if (this.getConceptClassId() == null) return super.hashCode(); return this.getConceptClassId().hashCode(); @@ -85,4 +89,40 @@ } + /** + * @return the localizedName + */ + public LocalizedString getLocalizedName() { + if (localizedName == null) + localizedName = new LocalizedString(); + return localizedName; + } + + /** + * @param localizedName the localizedName to set + */ + public void setLocalizedName(LocalizedString localizedName) { + this.localizedName = localizedName; + } + + /** + * @return the name + * @see LocalizedString#getValue() + * @should return unlocalized name when no localization is added + */ + @Override + public String getName() { + return getLocalizedName().getValue(); + } + + /** + * @param name the name to set + * @see LocalizedString#setUnlocalizedValue(String) + * @should set unlocalized name correctly + */ + @Override + public void setName(String name) { + getLocalizedName().setUnlocalizedValue(name); + } + } diff -ur --exclude=.svn trunk/src/api/org/openmrs/EncounterType.java branch/src/api/org/openmrs/EncounterType.java --- trunk/src/api/org/openmrs/EncounterType.java 2010-06-14 10:24:33.244930797 -0400 +++ branch/src/api/org/openmrs/EncounterType.java 2010-06-14 10:20:38.112431001 -0400 @@ -13,6 +13,7 @@ */ package org.openmrs; + /** * An EncounterType defines how a certain kind of {@link Encounter}. * @@ -24,6 +25,8 @@ private Integer encounterTypeId; + private LocalizedString localizedName; + // Constructors /** default constructor */ @@ -61,7 +64,8 @@ * @should have equal encounter type objects with no encounterTypeId * @should not have equal encounter type objects when one has null encounterTypeId */ - public boolean equals(Object obj) { + @Override + public boolean equals(Object obj) { if (obj == null || !(obj instanceof EncounterType)) return false; @@ -76,7 +80,8 @@ * @see java.lang.Object#hashCode() * @should get hashCode even with null attributes */ - public int hashCode() { + @Override + public int hashCode() { if (this.getEncounterTypeId() == null) return super.hashCode(); return this.getEncounterTypeId().hashCode(); @@ -115,4 +120,39 @@ } + /** + * @return the localizedName + */ + public LocalizedString getLocalizedName() { + if (localizedName == null) + localizedName = new LocalizedString(); + return localizedName; + } + + /** + * @param localizedName the localizedName to set + */ + public void setLocalizedName(LocalizedString localizedName) { + this.localizedName = localizedName; + } + + /** + * @return the name + * @see LocalizedString#getValue() + * @should return unlocalized name when no localization is added + */ + @Override + public String getName() { + return getLocalizedName().getValue(); + } + + /** + * @param name the name to set + * @see LocalizedString#setUnlocalizedValue(String) + * @should set unlocalized name correctly + */ + @Override + public void setName(String name) { + getLocalizedName().setUnlocalizedValue(name); + } } diff -ur --exclude=.svn trunk/src/api/org/openmrs/FieldType.java branch/src/api/org/openmrs/FieldType.java --- trunk/src/api/org/openmrs/FieldType.java 2010-06-14 10:24:33.276931025 -0400 +++ branch/src/api/org/openmrs/FieldType.java 2010-06-14 10:20:38.148432500 -0400 @@ -26,6 +26,8 @@ private Boolean isSet = false; + private LocalizedString localizedName; + // Constructors /** default constructor */ @@ -43,7 +45,8 @@ * @param obj * @return boolean true/false whether or not they are the same objects */ - public boolean equals(Object obj) { + @Override + public boolean equals(Object obj) { if (obj instanceof FieldType) { FieldType f = (FieldType) obj; return (fieldTypeId.equals(f.getFieldTypeId())); @@ -51,7 +54,8 @@ return false; } - public int hashCode() { + @Override + public int hashCode() { if (this.getFieldTypeId() == null) return super.hashCode(); return this.getFieldTypeId().hashCode(); @@ -105,4 +109,40 @@ } + /** + * @return the localizedName + */ + public LocalizedString getLocalizedName() { + if (localizedName == null) + localizedName = new LocalizedString(); + return localizedName; + } + + /** + * @param localizedName the localizedName to set + */ + public void setLocalizedName(LocalizedString localizedName) { + this.localizedName = localizedName; + } + + /** + * @return the name + * @see LocalizedString#getValue() + * @should return unlocalized name when no localization is added + */ + @Override + public String getName() { + return getLocalizedName().getValue(); + } + + /** + * @param name the name to set + * @see LocalizedString#setUnlocalizedValue(String) + * @should set unlocalized name correctly + */ + @Override + public void setName(String name) { + getLocalizedName().setUnlocalizedValue(name); + } + } Only in branch/src/api/org/openmrs: LocalizedString.java diff -ur --exclude=.svn trunk/src/api/org/openmrs/OrderType.java branch/src/api/org/openmrs/OrderType.java --- trunk/src/api/org/openmrs/OrderType.java 2010-06-14 10:24:33.256931485 -0400 +++ branch/src/api/org/openmrs/OrderType.java 2010-06-14 10:20:38.116432137 -0400 @@ -26,6 +26,8 @@ private Integer orderTypeId; + private LocalizedString localizedName; + // Constructors /** default constructor */ @@ -52,7 +54,8 @@ /** * @see java.lang.Object#equals(java.lang.Object) */ - public boolean equals(Object obj) { + @Override + public boolean equals(Object obj) { if (obj instanceof OrderType) { OrderType o = (OrderType) obj; if (o != null) @@ -64,7 +67,8 @@ /** * @see java.lang.Object#hashCode() */ - public int hashCode() { + @Override + public int hashCode() { if (this.getOrderTypeId() == null) return super.hashCode(); return this.getOrderTypeId().hashCode(); @@ -103,4 +107,40 @@ } + /** + * @return the localizedName + */ + public LocalizedString getLocalizedName() { + if (localizedName == null) + localizedName = new LocalizedString(); + return localizedName; + } + + /** + * @param localizedName the localizedName to set + */ + public void setLocalizedName(LocalizedString localizedName) { + this.localizedName = localizedName; + } + + /** + * @return the name + * @see LocalizedString#getValue() + * @should return unlocalized name when no localization is added + */ + @Override + public String getName() { + return getLocalizedName().getValue(); + } + + /** + * @param name the name to set + * @see LocalizedString#setUnlocalizedValue(String) + * @should set unlocalized name correctly + */ + @Override + public void setName(String name) { + getLocalizedName().setUnlocalizedValue(name); + } + } Only in branch/src/api/org/openmrs/propertyeditor: LocalizedStringEditor.java Only in branch/src/api/org/openmrs/serialization: LocalizedStringSerializer.java Only in branch/src/api/org/openmrs/util: LocalizedStringUtil.java diff -ur --exclude=.svn trunk/src/api/org/openmrs/validator/ConceptClassValidator.java branch/src/api/org/openmrs/validator/ConceptClassValidator.java --- trunk/src/api/org/openmrs/validator/ConceptClassValidator.java 2010-06-14 10:24:21.704432003 -0400 +++ branch/src/api/org/openmrs/validator/ConceptClassValidator.java 2010-06-14 10:20:28.184930921 -0400 @@ -47,7 +47,7 @@ * * @see org.springframework.validation.Validator#validate(java.lang.Object, * org.springframework.validation.Errors) - * @should fail validation if user is null or empty or whitespace + * @should fail validation if unlocalized name is null or empty or whitespace * @should fail validation if description is null or empty or whitespace * @should pass validation if all required fields have proper values */ @@ -56,7 +56,8 @@ if (cc == null) { errors.rejectValue("conceptClass", "error.general"); } else { - ValidationUtils.rejectIfEmptyOrWhitespace(errors, "name", "error.name"); + ValidationUtils.rejectIfEmptyOrWhitespace(errors, "localizedName.unlocalizedValue", + "LocalizedName.unlocalizedName.empty"); ValidationUtils.rejectIfEmptyOrWhitespace(errors, "description", "error.description"); } } diff -ur --exclude=.svn trunk/src/api/org/openmrs/validator/EncounterTypeValidator.java branch/src/api/org/openmrs/validator/EncounterTypeValidator.java --- trunk/src/api/org/openmrs/validator/EncounterTypeValidator.java 2010-06-14 10:24:21.700432122 -0400 +++ branch/src/api/org/openmrs/validator/EncounterTypeValidator.java 2010-06-14 10:20:28.168930844 -0400 @@ -47,7 +47,7 @@ * * @see org.springframework.validation.Validator#validate(java.lang.Object, * org.springframework.validation.Errors) - * @should fail validation if name is null or empty or whitespace + * @should fail validation if unlocalized name is null or empty or whitespace * @should fail validation if description is null or empty or whitespace * @should pass validation if all required fields have proper values */ @@ -56,7 +56,8 @@ if (encounterType == null) { errors.rejectValue("encounterType", "error.general"); } else { - ValidationUtils.rejectIfEmptyOrWhitespace(errors, "name", "error.name"); + ValidationUtils.rejectIfEmptyOrWhitespace(errors, "localizedName.unlocalizedValue", + "LocalizedName.unlocalizedName.empty"); ValidationUtils.rejectIfEmptyOrWhitespace(errors, "description", "error.description"); } } diff -ur --exclude=.svn trunk/src/api/org/openmrs/validator/FieldTypeValidator.java branch/src/api/org/openmrs/validator/FieldTypeValidator.java --- trunk/src/api/org/openmrs/validator/FieldTypeValidator.java 2010-06-14 10:24:21.704432003 -0400 +++ branch/src/api/org/openmrs/validator/FieldTypeValidator.java 2010-06-14 10:20:28.184930921 -0400 @@ -47,7 +47,7 @@ * * @see org.springframework.validation.Validator#validate(java.lang.Object, * org.springframework.validation.Errors) - * @should fail validation if name is null or empty or whitespace + * @should fail validation if unlocalized name is null or empty or whitespace * @should pass validation if all required fields have proper values */ public void validate(Object obj, Errors errors) { @@ -55,7 +55,8 @@ if (fieldType == null) { errors.rejectValue("fieldType", "error.general"); } else { - ValidationUtils.rejectIfEmptyOrWhitespace(errors, "name", "error.name"); + ValidationUtils.rejectIfEmptyOrWhitespace(errors, "localizedName.unlocalizedValue", + "LocalizedName.unlocalizedName.empty"); } } diff -ur --exclude=.svn trunk/src/api/org/openmrs/validator/OrderTypeValidator.java branch/src/api/org/openmrs/validator/OrderTypeValidator.java --- trunk/src/api/org/openmrs/validator/OrderTypeValidator.java 2010-06-14 10:24:21.704432003 -0400 +++ branch/src/api/org/openmrs/validator/OrderTypeValidator.java 2010-06-14 10:20:28.184930921 -0400 @@ -47,7 +47,7 @@ * * @see org.springframework.validation.Validator#validate(java.lang.Object, * org.springframework.validation.Errors) - * @should fail validation if name is null or empty or whitespace + * @should fail validation if unlocalized name is null or empty or whitespace * @should fail validation if description is null or empty or whitespace * @should pass validation if all required fields have proper values */ @@ -56,7 +56,8 @@ if (orderType == null) { errors.rejectValue("orderType", "error.general"); } else { - ValidationUtils.rejectIfEmptyOrWhitespace(errors, "name", "error.name"); + ValidationUtils.rejectIfEmptyOrWhitespace(errors, "localizedName.unlocalizedValue", + "LocalizedName.unlocalizedName.empty"); ValidationUtils.rejectIfEmptyOrWhitespace(errors, "description", "error.description"); } //log.debug("errors: " + errors.getAllErrors().toString()); diff -ur --exclude=.svn trunk/src/web/org/openmrs/web/controller/concept/ConceptClassFormController.java branch/src/web/org/openmrs/web/controller/concept/ConceptClassFormController.java --- trunk/src/web/org/openmrs/web/controller/concept/ConceptClassFormController.java 2010-06-14 10:24:35.536932375 -0400 +++ branch/src/web/org/openmrs/web/controller/concept/ConceptClassFormController.java 2010-06-14 10:20:38.880431335 -0400 @@ -23,6 +23,7 @@ import org.openmrs.ConceptClass; import org.openmrs.api.ConceptService; import org.openmrs.api.context.Context; +import org.openmrs.propertyeditor.LocalizedStringEditor; import org.openmrs.web.WebConstants; import org.springframework.beans.propertyeditors.CustomNumberEditor; import org.springframework.validation.BindException; @@ -43,10 +44,12 @@ * @see org.springframework.web.servlet.mvc.BaseCommandController#initBinder(javax.servlet.http.HttpServletRequest, * org.springframework.web.bind.ServletRequestDataBinder) */ - protected void initBinder(HttpServletRequest request, ServletRequestDataBinder binder) throws Exception { + @Override + protected void initBinder(HttpServletRequest request, ServletRequestDataBinder binder) throws Exception { super.initBinder(request, binder); //NumberFormat nf = NumberFormat.getInstance(new Locale("en_US")); binder.registerCustomEditor(java.lang.Integer.class, new CustomNumberEditor(java.lang.Integer.class, true)); + binder.registerCustomEditor(org.openmrs.LocalizedString.class, new LocalizedStringEditor()); } /** @@ -57,7 +60,8 @@ * javax.servlet.http.HttpServletResponse, java.lang.Object, * org.springframework.validation.BindException) */ - protected ModelAndView onSubmit(HttpServletRequest request, HttpServletResponse response, Object obj, + @Override + protected ModelAndView onSubmit(HttpServletRequest request, HttpServletResponse response, Object obj, BindException errors) throws Exception { HttpSession httpSession = request.getSession(); @@ -80,7 +84,8 @@ * * @see org.springframework.web.servlet.mvc.AbstractFormController#formBackingObject(javax.servlet.http.HttpServletRequest) */ - protected Object formBackingObject(HttpServletRequest request) throws ServletException { + @Override + protected Object formBackingObject(HttpServletRequest request) throws ServletException { ConceptClass conceptClass = null; diff -ur --exclude=.svn trunk/src/web/org/openmrs/web/controller/encounter/EncounterTypeFormController.java branch/src/web/org/openmrs/web/controller/encounter/EncounterTypeFormController.java --- trunk/src/web/org/openmrs/web/controller/encounter/EncounterTypeFormController.java 2010-06-14 10:24:35.024934412 -0400 +++ branch/src/web/org/openmrs/web/controller/encounter/EncounterTypeFormController.java 2010-06-14 10:20:38.724432800 -0400 @@ -24,6 +24,7 @@ import org.openmrs.api.APIException; import org.openmrs.api.EncounterService; import org.openmrs.api.context.Context; +import org.openmrs.propertyeditor.LocalizedStringEditor; import org.openmrs.web.WebConstants; import org.springframework.beans.propertyeditors.CustomNumberEditor; import org.springframework.dao.DataIntegrityViolationException; @@ -46,10 +47,12 @@ * @see org.springframework.web.servlet.mvc.BaseCommandController#initBinder(javax.servlet.http.HttpServletRequest, * org.springframework.web.bind.ServletRequestDataBinder) */ - protected void initBinder(HttpServletRequest request, ServletRequestDataBinder binder) throws Exception { + @Override + protected void initBinder(HttpServletRequest request, ServletRequestDataBinder binder) throws Exception { super.initBinder(request, binder); //NumberFormat nf = NumberFormat.getInstance(new Locale("en_US")); binder.registerCustomEditor(java.lang.Integer.class, new CustomNumberEditor(java.lang.Integer.class, true)); + binder.registerCustomEditor(org.openmrs.LocalizedString.class, new LocalizedStringEditor()); } /** @@ -60,7 +63,8 @@ * javax.servlet.http.HttpServletResponse, java.lang.Object, * org.springframework.validation.BindException) */ - protected ModelAndView onSubmit(HttpServletRequest request, HttpServletResponse response, Object obj, + @Override + protected ModelAndView onSubmit(HttpServletRequest request, HttpServletResponse response, Object obj, BindException errors) throws Exception { HttpSession httpSession = request.getSession(); @@ -120,7 +124,8 @@ * * @see org.springframework.web.servlet.mvc.AbstractFormController#formBackingObject(javax.servlet.http.HttpServletRequest) */ - protected Object formBackingObject(HttpServletRequest request) throws ServletException { + @Override + protected Object formBackingObject(HttpServletRequest request) throws ServletException { EncounterType encounterType = null; diff -ur --exclude=.svn trunk/src/web/org/openmrs/web/controller/form/FieldTypeFormController.java branch/src/web/org/openmrs/web/controller/form/FieldTypeFormController.java --- trunk/src/web/org/openmrs/web/controller/form/FieldTypeFormController.java 2010-06-14 10:24:35.640932524 -0400 +++ branch/src/web/org/openmrs/web/controller/form/FieldTypeFormController.java 2010-06-14 10:20:38.920431045 -0400 @@ -23,8 +23,10 @@ import org.openmrs.FieldType; import org.openmrs.api.FormService; import org.openmrs.api.context.Context; +import org.openmrs.propertyeditor.LocalizedStringEditor; import org.openmrs.web.WebConstants; import org.springframework.validation.BindException; +import org.springframework.web.bind.ServletRequestDataBinder; import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.mvc.SimpleFormController; import org.springframework.web.servlet.view.RedirectView; @@ -35,6 +37,19 @@ protected final Log log = LogFactory.getLog(getClass()); /** + * Register {@link LocalizedStringEditor} to transform between request parameters and + * LocalizedString object + * + * @see org.springframework.web.servlet.mvc.BaseCommandController#initBinder(javax.servlet.http.HttpServletRequest, + * org.springframework.web.bind.ServletRequestDataBinder) + */ + @Override + protected void initBinder(HttpServletRequest request, ServletRequestDataBinder binder) throws Exception { + super.initBinder(request, binder); + binder.registerCustomEditor(org.openmrs.LocalizedString.class, new LocalizedStringEditor()); + } + + /** * The onSubmit function receives the form/command object that was modified by the input form * and saves it to the db * @@ -42,7 +57,8 @@ * javax.servlet.http.HttpServletResponse, java.lang.Object, * org.springframework.validation.BindException) */ - protected ModelAndView onSubmit(HttpServletRequest request, HttpServletResponse response, Object obj, + @Override + protected ModelAndView onSubmit(HttpServletRequest request, HttpServletResponse response, Object obj, BindException errors) throws Exception { HttpSession httpSession = request.getSession(); @@ -65,7 +81,8 @@ * * @see org.springframework.web.servlet.mvc.AbstractFormController#formBackingObject(javax.servlet.http.HttpServletRequest) */ - protected Object formBackingObject(HttpServletRequest request) throws ServletException { + @Override + protected Object formBackingObject(HttpServletRequest request) throws ServletException { FieldType fieldType = null; diff -ur --exclude=.svn trunk/src/web/org/openmrs/web/controller/order/OrderTypeFormController.java branch/src/web/org/openmrs/web/controller/order/OrderTypeFormController.java --- trunk/src/web/org/openmrs/web/controller/order/OrderTypeFormController.java 2010-06-14 10:24:36.344931498 -0400 +++ branch/src/web/org/openmrs/web/controller/order/OrderTypeFormController.java 2010-06-14 10:20:39.112431141 -0400 @@ -23,6 +23,7 @@ import org.openmrs.OrderType; import org.openmrs.api.OrderService; import org.openmrs.api.context.Context; +import org.openmrs.propertyeditor.LocalizedStringEditor; import org.openmrs.web.WebConstants; import org.springframework.beans.propertyeditors.CustomNumberEditor; import org.springframework.validation.BindException; @@ -43,10 +44,12 @@ * @see org.springframework.web.servlet.mvc.BaseCommandController#initBinder(javax.servlet.http.HttpServletRequest, * org.springframework.web.bind.ServletRequestDataBinder) */ - protected void initBinder(HttpServletRequest request, ServletRequestDataBinder binder) throws Exception { + @Override + protected void initBinder(HttpServletRequest request, ServletRequestDataBinder binder) throws Exception { super.initBinder(request, binder); //NumberFormat nf = NumberFormat.getInstance(new Locale("en_US")); binder.registerCustomEditor(java.lang.Integer.class, new CustomNumberEditor(java.lang.Integer.class, true)); + binder.registerCustomEditor(org.openmrs.LocalizedString.class, new LocalizedStringEditor()); } /** @@ -57,7 +60,8 @@ * javax.servlet.http.HttpServletResponse, java.lang.Object, * org.springframework.validation.BindException) */ - protected ModelAndView onSubmit(HttpServletRequest request, HttpServletResponse response, Object obj, + @Override + protected ModelAndView onSubmit(HttpServletRequest request, HttpServletResponse response, Object obj, BindException errors) throws Exception { HttpSession httpSession = request.getSession(); @@ -80,7 +84,8 @@ * * @see org.springframework.web.servlet.mvc.AbstractFormController#formBackingObject(javax.servlet.http.HttpServletRequest) */ - protected Object formBackingObject(HttpServletRequest request) throws ServletException { + @Override + protected Object formBackingObject(HttpServletRequest request) throws ServletException { OrderType orderType = null; diff -ur --exclude=.svn trunk/src/web/org/openmrs/web/taglib/ForEachRecordTag.java branch/src/web/org/openmrs/web/taglib/ForEachRecordTag.java --- trunk/src/web/org/openmrs/web/taglib/ForEachRecordTag.java 2010-06-14 10:24:34.692931169 -0400 +++ branch/src/web/org/openmrs/web/taglib/ForEachRecordTag.java 2010-06-14 10:20:38.612431560 -0400 @@ -34,6 +34,7 @@ import org.openmrs.Form; import org.openmrs.ProgramWorkflowState; import org.openmrs.Role; +import org.openmrs.api.AdministrationService; import org.openmrs.api.ConceptService; import org.openmrs.api.EncounterService; import org.openmrs.api.LocationService; @@ -61,7 +62,8 @@ private Iterator records; - public int doStartTag() { + @Override + public int doStartTag() { records = null; @@ -137,6 +139,9 @@ records = c.getAnswers().iterator(); else records = new ArrayList().iterator(); + } else if (name.equals("allowedLocale")) { + AdministrationService as = Context.getAdministrationService(); + records = as.getAllowedLocales().iterator(); } else { try { Class cls = Context.loadClass(name); @@ -161,7 +166,8 @@ /** * @see javax.servlet.jsp.tagext.BodyTag#doInitBody() */ - public void doInitBody() throws JspException { + @Override + public void doInitBody() throws JspException { if (records.hasNext()) { Object obj = records.next(); iterate(obj); @@ -171,7 +177,8 @@ /** * @see javax.servlet.jsp.tagext.IterationTag#doAfterBody() */ - public int doAfterBody() throws JspException { + @Override + public int doAfterBody() throws JspException { if (records.hasNext()) { Object obj = records.next(); iterate(obj); @@ -203,7 +210,8 @@ /** * @see javax.servlet.jsp.tagext.Tag#doEndTag() */ - public int doEndTag() throws JspException { + @Override + public int doEndTag() throws JspException { try { if (getBodyContent() != null && records != null) getBodyContent().writeOut(getBodyContent().getEnclosingWriter()); diff -ur --exclude=.svn trunk/test/api/org/openmrs/api/EncounterServiceTest.java branch/test/api/org/openmrs/api/EncounterServiceTest.java --- trunk/test/api/org/openmrs/api/EncounterServiceTest.java 2010-06-14 10:21:33.452431623 -0400 +++ branch/test/api/org/openmrs/api/EncounterServiceTest.java 2010-06-14 10:18:04.284431001 -0400 @@ -1292,5 +1292,5 @@ List encounters = encounterService.getEncountersByPatient("12345"); assertEquals(3, encounters.size()); } - + } diff -ur --exclude=.svn trunk/test/api/org/openmrs/api/include/EncounterServiceTest-initialData.xml branch/test/api/org/openmrs/api/include/EncounterServiceTest-initialData.xml --- trunk/test/api/org/openmrs/api/include/EncounterServiceTest-initialData.xml 2010-06-14 10:21:31.932931308 -0400 +++ branch/test/api/org/openmrs/api/include/EncounterServiceTest-initialData.xml 2010-06-14 10:18:03.384430587 -0400 @@ -30,7 +30,7 @@ - + Only in branch/test/api/org/openmrs: ConceptClassTest.java diff -ur --exclude=.svn trunk/test/api/org/openmrs/EncounterTypeTest.java branch/test/api/org/openmrs/EncounterTypeTest.java --- trunk/test/api/org/openmrs/EncounterTypeTest.java 2010-06-14 10:21:33.588930949 -0400 +++ branch/test/api/org/openmrs/EncounterTypeTest.java 2010-06-14 10:18:04.404431664 -0400 @@ -15,6 +15,8 @@ import org.junit.Assert; import org.junit.Test; +import org.openmrs.serialization.LocalizedStringSerializer; +import org.openmrs.serialization.OpenmrsSerializer; import org.openmrs.test.Verifies; /** @@ -117,5 +119,33 @@ public void hashCode_shouldGetHashCodeEvenWithNullAttributes() throws Exception { new EncounterType().hashCode(); } + + /** + * @see {@link EncounterType#getName()} + * + */ + @Test + @Verifies(value = "should return unlocalized name when no localization is added", method = "getName()") + public void getName_shouldReturnUnlocalizedNameWhenNoLocalizationIsAdded() throws Exception { + EncounterType type = new EncounterType(); + String expected = "Favorite Color"; + OpenmrsSerializer serializer = new LocalizedStringSerializer(); + LocalizedString ls = serializer.deserialize(expected, LocalizedString.class); + type.setLocalizedName(ls); + Assert.assertEquals(expected, type.getName()); + } + + /** + * @see {@link EncounterType#setName(String)} + * + */ + @Test + @Verifies(value = "should set unlocalized name correctly", method = "setName(String)") + public void setName_shouldSetUnlocalizedNameCorrectly() throws Exception { + EncounterType type = new EncounterType(); + String name = "Favorite Color"; + type.setName(name); + Assert.assertEquals(name, type.getLocalizedName().getUnlocalizedValue()); + } } Only in branch/test/api/org/openmrs: FieldTypeTest.java Only in branch/test/api/org/openmrs: LocalizedStringTest.java Only in branch/test/api/org/openmrs: OrderTypeTest.java Only in branch/test/api/org/openmrs/propertyeditor: LocalizedStringEditorTest.java Only in branch/test/api/org/openmrs: serialization diff -ur --exclude=.svn trunk/test/api/org/openmrs/validator/ConceptClassValidatorTest.java branch/test/api/org/openmrs/validator/ConceptClassValidatorTest.java --- trunk/test/api/org/openmrs/validator/ConceptClassValidatorTest.java 2010-06-14 10:21:24.504431388 -0400 +++ branch/test/api/org/openmrs/validator/ConceptClassValidatorTest.java 2010-06-14 10:17:55.544430605 -0400 @@ -16,25 +16,25 @@ * @see {@link ConceptClassValidator#validate(Object,Errors)} */ @Test - @Verifies(value = "should fail validation if user is null or empty or whitespace", method = "validate(Object,Errors)") - public void validate_shouldFailValidationIfUserIsNullOrEmptyOrWhitespace() throws Exception { + @Verifies(value = "should fail validation if unlocalized name is null or empty or whitespace", method = "validate(Object,Errors)") + public void validate_shouldFailValidationIfUnlocalizedNameIsNullOrEmptyOrWhitespace() throws Exception { ConceptClass cc = new ConceptClass(); cc.setName(null); cc.setDescription("some text"); Errors errors = new BindException(cc, "cc"); new ConceptClassValidator().validate(cc, errors); - Assert.assertTrue(errors.hasFieldErrors("name")); + Assert.assertTrue(errors.hasFieldErrors("localizedName.unlocalizedValue")); cc.setName(""); errors = new BindException(cc, "cc"); new ConceptClassValidator().validate(cc, errors); - Assert.assertTrue(errors.hasFieldErrors("name")); + Assert.assertTrue(errors.hasFieldErrors("localizedName.unlocalizedValue")); cc.setName(" "); errors = new BindException(cc, "cc"); new ConceptClassValidator().validate(cc, errors); - Assert.assertTrue(errors.hasFieldErrors("name")); + Assert.assertTrue(errors.hasFieldErrors("localizedName.unlocalizedValue")); } /** diff -ur --exclude=.svn trunk/test/api/org/openmrs/validator/EncounterTypeValidatorTest.java branch/test/api/org/openmrs/validator/EncounterTypeValidatorTest.java --- trunk/test/api/org/openmrs/validator/EncounterTypeValidatorTest.java 2010-06-14 10:21:24.500431439 -0400 +++ branch/test/api/org/openmrs/validator/EncounterTypeValidatorTest.java 2010-06-14 10:17:55.540432052 -0400 @@ -16,25 +16,25 @@ * @see {@link EncounterTypeValidator#validate(Object,Errors)} */ @Test - @Verifies(value = "should fail validation if name is null or empty or whitespace", method = "validate(Object,Errors)") - public void validate_shouldFailValidationIfNameIsNullOrEmptyOrWhitespace() throws Exception { + @Verifies(value = "should fail validation if unlocalized name is null or empty or whitespace", method = "validate(Object,Errors)") + public void validate_shouldFailValidationIfUnlocalizedNameIsNullOrEmptyOrWhitespace() throws Exception { EncounterType type = new EncounterType(); type.setName(null); type.setDescription("Aaaaah"); Errors errors = new BindException(type, "type"); new EncounterTypeValidator().validate(type, errors); - Assert.assertTrue(errors.hasFieldErrors("name")); + Assert.assertTrue(errors.hasFieldErrors("localizedName.unlocalizedValue")); type.setName(""); errors = new BindException(type, "type"); new EncounterTypeValidator().validate(type, errors); - Assert.assertTrue(errors.hasFieldErrors("name")); + Assert.assertTrue(errors.hasFieldErrors("localizedName.unlocalizedValue")); type.setName(" "); errors = new BindException(type, "type"); new EncounterTypeValidator().validate(type, errors); - Assert.assertTrue(errors.hasFieldErrors("name")); + Assert.assertTrue(errors.hasFieldErrors("localizedName.unlocalizedValue")); } /** diff -ur --exclude=.svn trunk/test/api/org/openmrs/validator/FieldTypeValidatorTest.java branch/test/api/org/openmrs/validator/FieldTypeValidatorTest.java --- trunk/test/api/org/openmrs/validator/FieldTypeValidatorTest.java 2010-06-14 10:21:24.504431388 -0400 +++ branch/test/api/org/openmrs/validator/FieldTypeValidatorTest.java 2010-06-14 10:17:55.544430605 -0400 @@ -25,17 +25,17 @@ Errors errors = new BindException(type, "type"); new FieldTypeValidator().validate(type, errors); - Assert.assertTrue(errors.hasFieldErrors("name")); + Assert.assertTrue(errors.hasFieldErrors("localizedName.unlocalizedValue")); type.setName(""); errors = new BindException(type, "type"); new FieldTypeValidator().validate(type, errors); - Assert.assertTrue(errors.hasFieldErrors("name")); + Assert.assertTrue(errors.hasFieldErrors("localizedName.unlocalizedValue")); type.setName(" "); errors = new BindException(type, "type"); new FieldTypeValidator().validate(type, errors); - Assert.assertTrue(errors.hasFieldErrors("name")); + Assert.assertTrue(errors.hasFieldErrors("localizedName.unlocalizedValue")); } /** diff -ur --exclude=.svn trunk/test/api/org/openmrs/validator/OrderTypeValidatorTest.java branch/test/api/org/openmrs/validator/OrderTypeValidatorTest.java --- trunk/test/api/org/openmrs/validator/OrderTypeValidatorTest.java 2010-06-14 10:21:24.504431388 -0400 +++ branch/test/api/org/openmrs/validator/OrderTypeValidatorTest.java 2010-06-14 10:17:55.544430605 -0400 @@ -16,8 +16,8 @@ * */ @Test - @Verifies(value = "should fail validation if name is null or empty or whitespace", method = "validate(Object,Errors)") - public void validate_shouldFailValidationIfNameIsNullOrEmptyOrWhitespace() + @Verifies(value = "should fail validation if unlocalized name is null or empty or whitespace", method = "validate(Object,Errors)") + public void validate_shouldFailValidationIfUnlocalizedNameIsNullOrEmptyOrWhitespace() throws Exception { OrderType type = new OrderType(); type.setName(null); @@ -25,17 +25,17 @@ Errors errors = new BindException(type, "type"); new OrderTypeValidator().validate(type, errors); - Assert.assertTrue(errors.hasFieldErrors("name")); + Assert.assertTrue(errors.hasFieldErrors("localizedName.unlocalizedValue")); type.setName(""); errors = new BindException(type, "type"); new OrderTypeValidator().validate(type, errors); - Assert.assertTrue(errors.hasFieldErrors("name")); + Assert.assertTrue(errors.hasFieldErrors("localizedName.unlocalizedValue")); type.setName(" "); errors = new BindException(type, "type"); new OrderTypeValidator().validate(type, errors); - Assert.assertTrue(errors.hasFieldErrors("name")); + Assert.assertTrue(errors.hasFieldErrors("localizedName.unlocalizedValue")); } /** diff -ur --exclude=.svn trunk/web/WEB-INF/messages.properties branch/web/WEB-INF/messages.properties --- trunk/web/WEB-INF/messages.properties 2010-06-14 10:24:51.436434337 -0400 +++ branch/web/WEB-INF/messages.properties 2010-06-14 10:20:50.188431086 -0400 @@ -178,6 +178,7 @@ general.error.nameAlreadyInUse=The name you entered is already in use, please enter a unique name. general.invalid=Invalid general.properties=Properties +general.language=Language #### JSP page messages ###### @@ -1819,3 +1820,8 @@ FormEntry.fillOutForm=Enter Form FormEntry.noModulesInstalled=Your administrator has not installed an updated form entry module error.name.max.length=The {0} value is too long. The maximum length is {1}. + +LocalizedName.add=Add Language +LocalizedName.title=Translated Name +LocalizedName.unlocalizedName.empty=Default unlocalized name cannot be empty +LocalizedName.locale.duplicate=Only one name can be defined in a locale, there is already one name defined in selected locale \ No newline at end of file diff -ur --exclude=.svn trunk/web/WEB-INF/view/admin/concepts/conceptClassForm.jsp branch/web/WEB-INF/view/admin/concepts/conceptClassForm.jsp --- trunk/web/WEB-INF/view/admin/concepts/conceptClassForm.jsp 2010-06-14 10:24:50.304431169 -0400 +++ branch/web/WEB-INF/view/admin/concepts/conceptClassForm.jsp 2010-06-14 10:20:49.384433590 -0400 @@ -11,15 +11,9 @@
      - - - - + + +
      - - - ${status.errorMessage} - -
      diff -ur --exclude=.svn trunk/web/WEB-INF/view/admin/encounters/encounterTypeForm.jsp branch/web/WEB-INF/view/admin/encounters/encounterTypeForm.jsp --- trunk/web/WEB-INF/view/admin/encounters/encounterTypeForm.jsp 2010-06-14 10:24:49.380431685 -0400 +++ branch/web/WEB-INF/view/admin/encounters/encounterTypeForm.jsp 2010-06-14 10:20:48.860431445 -0400 @@ -36,15 +36,9 @@
      - - - - + + +
      - - - ${status.errorMessage} - -
      diff -ur --exclude=.svn trunk/web/WEB-INF/view/admin/forms/fieldTypeForm.jsp branch/web/WEB-INF/view/admin/forms/fieldTypeForm.jsp --- trunk/web/WEB-INF/view/admin/forms/fieldTypeForm.jsp 2010-06-14 10:24:49.512431497 -0400 +++ branch/web/WEB-INF/view/admin/forms/fieldTypeForm.jsp 2010-06-14 10:20:48.960431452 -0400 @@ -9,10 +9,9 @@ - - - - + + + diff -ur --exclude=.svn trunk/web/WEB-INF/view/admin/orders/orderTypeForm.jsp branch/web/WEB-INF/view/admin/orders/orderTypeForm.jsp --- trunk/web/WEB-INF/view/admin/orders/orderTypeForm.jsp 2010-06-14 10:24:50.488430961 -0400 +++ branch/web/WEB-INF/view/admin/orders/orderTypeForm.jsp 2010-06-14 10:20:49.484431360 -0400 @@ -13,15 +13,9 @@
      - - - - + + +
      - - - ${status.errorMessage} - -
      Only in branch/web/WEB-INF/view/portlets: localizedName.jsp