knguyen     2004/09/29 14:44:41 CEST

  Modified files:        (Branch: JAHIA-4-0-BRANCH)
    src/views/jsp/jahia/engines/shared smalltext_field.jsp 
  Log:
  - multivalues, jahia expression and tidy issue
  
  Revision  Changes    Path
  1.41.4.4  +17 -10    jahia/src/views/jsp/jahia/engines/shared/smalltext_field.jsp
http://jahia.mine.nu:8080/cgi-bin/cvsweb.cgi/jahia/src/views/jsp/jahia/engines/shared/smalltext_field.jsp.diff?r1=1.41.4.3&r2=1.41.4.4&f=h
  
  
  
  Index: smalltext_field.jsp
  ===================================================================
  RCS file: 
/home/cvs/repository/jahia/src/views/jsp/jahia/engines/shared/Attic/smalltext_field.jsp,v
  retrieving revision 1.41.4.3
  retrieving revision 1.41.4.4
  diff -u -r1.41.4.3 -r1.41.4.4
  --- smalltext_field.jsp       17 Aug 2004 09:59:16 -0000      1.41.4.3
  +++ smalltext_field.jsp       29 Sep 2004 12:44:40 -0000      1.41.4.4
  @@ -2,12 +2,15 @@
   <%@ page import="org.jahia.utils.*" %>
   <%@ page import="org.jahia.data.*" %>
   <%@ page import="org.jahia.data.fields.*" %>
  +<%@ page import="org.jahia.engines.*" %>
   <%@ page import="org.jahia.params.*" %>
   <%@ page import="org.jahia.services.*" %>
  +<%@ page import="org.jahia.services.htmlparser.*" %>
   <%@ page import="org.jahia.services.pages.*" %>
   <%@ page import="org.jahia.registries.*" %>
   <%@ page import="org.jahia.exceptions.*" %>
   <%@ page import="org.jahia.resourcebundle.*" %>
  +<%@ page import="org.jahia.services.sites.*" %>
   <%@ page import="java.util.*" %>
   <%@ taglib uri="JahiaLib" prefix="jahia" %>
   <%@ taglib uri="contentLib" prefix="content" %>
  @@ -178,16 +181,20 @@
       String theNewField = "";
       String strToRemove[] = {"&LT;JAHIA", "_MULTIVALUE", "<_MULTIVALUE", "_SINGLE", 
"_MULTIPLE"};
   
  -    for (int i = 0; i < strToRemove.length; i++) {
  -        String upperCaseField = theSelectedField.toUpperCase();
  -        int index = upperCaseField.indexOf(strToRemove[i]);
  -        if (index != -1) {
  -            theNewField = theSelectedField.substring(0, index) +
  -                          theSelectedField.substring(index + 
strToRemove[i].length(), theSelectedField.length());
  -            theSelectedField = theNewField;
  -        }
  -    }
  -        //System.out.println("smalltext_field.jsp: theSelectedField = " + 
theSelectedField);
  +     if ( theSelectedField != null
  +              && !theSelectedField.toUpperCase().startsWith("&LT;JAHIA-RESOURCE")
  +              && !theSelectedField.toUpperCase().startsWith("&LT;JAHIA-EXPRESSION") 
){
  +         for (int i = 0; i < strToRemove.length; i++) {
  +             String upperCaseField = theSelectedField.toUpperCase();
  +             int index = upperCaseField.indexOf(strToRemove[i]);
  +             if (index != -1) {
  +                 theNewField = theSelectedField.substring(0, index) +
  +                               theSelectedField.substring(index + 
strToRemove[i].length(), theSelectedField.length());
  +                 theSelectedField = theNewField;
  +             }
  +         }
  +     }
  +     //System.out.println("smalltext_field.jsp: theSelectedField = " + 
theSelectedField);
   
       if (theSelectedField.indexOf("[") != -1) {
           int startStr    = theSelectedField.indexOf("[");
  

Reply via email to