Modified: ofbiz/branches/multitenant20100310/framework/base/src/org/ofbiz/base/json/JSONWriter.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/multitenant20100310/framework/base/src/org/ofbiz/base/json/JSONWriter.java?rev=926987&r1=926986&r2=926987&view=diff ============================================================================== --- ofbiz/branches/multitenant20100310/framework/base/src/org/ofbiz/base/json/JSONWriter.java (original) +++ ofbiz/branches/multitenant20100310/framework/base/src/org/ofbiz/base/json/JSONWriter.java Wed Mar 24 09:23:07 2010 @@ -25,10 +25,12 @@ import java.util.Collection; import java.util.Iterator; import java.util.Map; +import org.ofbiz.base.lang.SourceMonitor; import org.ofbiz.base.util.IndentingWriter; import org.ofbiz.base.util.UtilGenerics; import org.ofbiz.base.util.UtilIO; +@SourceMonitor("Adam Heath") public class JSONWriter { private final IndentingWriter writer; private final FallbackHandler fallbackHandler; @@ -43,11 +45,11 @@ public class JSONWriter { } public JSONWriter(Writer writer) { - this(writer instanceof IndentingWriter ? (IndentingWriter) writer : new IndentingWriter(writer)); + this(IndentingWriter.makeIndentingWriter(writer)); } public JSONWriter(Writer writer, FallbackHandler fallbackHandler) { - this(writer instanceof IndentingWriter ? (IndentingWriter) writer : new IndentingWriter(writer), fallbackHandler); + this(IndentingWriter.makeIndentingWriter(writer), fallbackHandler); } public IndentingWriter getWriter() { @@ -108,13 +110,13 @@ public class JSONWriter { case '\r': writer.write("\\r"); continue; case '\t': writer.write("\\t"); continue; } - if (32 <= c && c >= 256) { + if (c >= 32 && c < 256) { + writer.write(c); + } else { writer.write("\\u"); String n = Integer.toString((int) c, 16); for (int j = 4 - n.length(); j > 0; j--) writer.write('0'); writer.write(n); - } else { - writer.write(c); } } writer.write('"'); Modified: ofbiz/branches/multitenant20100310/framework/base/src/org/ofbiz/base/json/test/JSONTests.java URL: http://svn.apache.org/viewvc/ofbiz/branches/multitenant20100310/framework/base/src/org/ofbiz/base/json/test/JSONTests.java?rev=926987&r1=926986&r2=926987&view=diff ============================================================================== --- ofbiz/branches/multitenant20100310/framework/base/src/org/ofbiz/base/json/test/JSONTests.java (original) +++ ofbiz/branches/multitenant20100310/framework/base/src/org/ofbiz/base/json/test/JSONTests.java Wed Mar 24 09:23:07 2010 @@ -19,8 +19,10 @@ package org.ofbiz.base.json.test; import java.io.IOException; +import java.io.ByteArrayOutputStream; import java.io.StringReader; import java.io.StringWriter; +import java.io.OutputStreamWriter; import java.net.URL; import java.util.ArrayList; import java.util.HashMap; @@ -31,8 +33,11 @@ import org.ofbiz.base.json.JSONWriter; import org.ofbiz.base.json.ParseException; import org.ofbiz.base.json.Token; import org.ofbiz.base.json.TokenMgrError; +import org.ofbiz.base.lang.SourceMonitor; import org.ofbiz.base.test.GenericTestCaseBase; +import org.ofbiz.base.util.IndentingWriter; +@SourceMonitor("Adam Heath") public class JSONTests extends GenericTestCaseBase { public JSONTests(String name) { super(name); @@ -58,6 +63,7 @@ public class JSONTests extends GenericTe } else { jsonWriter = new JSONWriter(writer); }; + assertTrue("writer is IndentingWriter", jsonWriter.getWriter() instanceof IndentingWriter); jsonWriter.write(object); return writer.toString(); } @@ -104,6 +110,54 @@ public class JSONTests extends GenericTe assertEquals("parse " + type, obj, parseJSON(json, true)); } + public void testClose() throws Exception { + JSONWriter writer = new JSONWriter(new OutputStreamWriter(new ByteArrayOutputStream())); + writer.close(); + IOException caught = null; + try { + writer.write(""); + } catch (IOException e) { + caught = e; + } finally { + assertNotNull("write after close", caught); + } + } + + public void testString() throws Exception { + StringBuilder wanted = new StringBuilder(); + StringBuilder json = new StringBuilder().append('"'); + for (int i = 0; i < 5120; i++) { + wanted.append((char) i); + if (i == '\b') { + json.append("\\b"); + } else if (i == '\f') { + json.append("\\f"); + } else if (i == '\t') { + json.append("\\t"); + } else if (i == '\n') { + json.append("\\n"); + } else if (i == '\r') { + json.append("\\r"); + } else if (i == '"') { + json.append("\\\""); + } else if (i == '\\') { + json.append("\\\\"); + } else if (i == '/') { + json.append("\\/"); + } else if (i < 32 || i >= 256) { + json.append("\\u"); + if (i < 16) json.append('0'); + if (i < 256) json.append('0'); + if (i < 4096) json.append('0'); + json.append(Integer.toString(i, 16)); + } else { + json.append((char) i); + } + } + json.append('"'); + assertSimpleJSON("string", wanted.toString(), json.toString()); + } + public void testParseBasicTypes() throws Exception { assertSimpleJSON("character", new Character('c'), "\"c\"", "c"); assertSimpleJSON("false", Boolean.FALSE, "false"); @@ -187,53 +241,34 @@ public class JSONTests extends GenericTe public void testParseErrors() throws Exception { for (char c = 1; c < 1024; c++) { - switch (c) { - case '[': - doParseExceptionTest("[:", JSONConstants.KEY_SEP); - break; - case ']': - doParseExceptionTest("]", JSONConstants.ARRAY_END); - break; - case '{': - doParseExceptionTest("{:", JSONConstants.KEY_SEP); - break; - case '}': - doParseExceptionTest("}", JSONConstants.OBJECT_END); - break; - case ':': - doParseExceptionTest(":", JSONConstants.KEY_SEP); - break; - case ',': - doParseExceptionTest(",", JSONConstants.ITEM_SEP); - break; - case '"': - doParseExceptionTest("\"", JSONConstants.EOF); - break; - case 't': - doParseExceptionTest("true:", JSONConstants.KEY_SEP); - break; - case 'f': - doParseExceptionTest("false:", JSONConstants.KEY_SEP); - break; - case 'n': - doParseExceptionTest("null:", JSONConstants.KEY_SEP); - break; - case '-': // numbers - case '.': - case '0': case '1': case '2': case '3': case '4': - case '5': case '6': case '7': case '8': case '9': - break; - case '\t': - doWhitespaceExceptionTest(Character.toString(c), 8); - break; - case '\n': - case '\r': - case ' ': - doWhitespaceExceptionTest(Character.toString(c), 1); - break; - default: - doTokenMgrErrorTest(c); - break; + if (c == '\t') { + doWhitespaceExceptionTest(Character.toString(c), 8); + } else if (c == '\n' || c == '\r' || c == ' ') { + doWhitespaceExceptionTest(Character.toString(c), 1); + } else if (c == '"') { + doParseExceptionTest("\"", JSONConstants.EOF); + } else if (c == ',') { + doParseExceptionTest(",", JSONConstants.ITEM_SEP); + } else if (c == '-' || c == '.' || (c >= '0' && c <= '9')) { + // numbers + } else if (c == ':') { + doParseExceptionTest(":", JSONConstants.KEY_SEP); + } else if (c == '[') { + doParseExceptionTest("[:", JSONConstants.KEY_SEP); + } else if (c == ']') { + doParseExceptionTest("]", JSONConstants.ARRAY_END); + } else if (c == 't') { + doParseExceptionTest("true:", JSONConstants.KEY_SEP); + } else if (c == 'f') { + doParseExceptionTest("false:", JSONConstants.KEY_SEP); + } else if (c == 'n') { + doParseExceptionTest("null:", JSONConstants.KEY_SEP); + } else if (c == '{') { + doParseExceptionTest("{:", JSONConstants.KEY_SEP); + } else if (c == '}') { + doParseExceptionTest("}", JSONConstants.OBJECT_END); + } else { + doTokenMgrErrorTest(c); } } } @@ -285,5 +320,13 @@ public class JSONTests extends GenericTe public void testResolve() throws Exception { assertResolveJSON("url", new URL("http://ofbiz.apache.org"), "resolve(\"java.net.URL:http:\\/\\/ofbiz.apache.org\")"); + IOException caught = null; + try { + getJSON(new URL("http://ofbiz.apache.org"), false); + } catch (IOException e) { + caught = e; + } finally { + assertNotNull("url not allowed", caught); + } } } Modified: ofbiz/branches/multitenant20100310/framework/base/src/org/ofbiz/base/lang/ComparableRange.java URL: http://svn.apache.org/viewvc/ofbiz/branches/multitenant20100310/framework/base/src/org/ofbiz/base/lang/ComparableRange.java?rev=926987&r1=926986&r2=926987&view=diff ============================================================================== --- ofbiz/branches/multitenant20100310/framework/base/src/org/ofbiz/base/lang/ComparableRange.java (original) +++ ofbiz/branches/multitenant20100310/framework/base/src/org/ofbiz/base/lang/ComparableRange.java Wed Mar 24 09:23:07 2010 @@ -19,6 +19,7 @@ package org.ofbiz.base.lang; /** An immutable range of values. */ +@SourceMonitor("Adam Heath") public class ComparableRange<T extends Comparable<T>> implements Range<T> { protected final T start; Modified: ofbiz/branches/multitenant20100310/framework/base/src/org/ofbiz/base/lang/test/ComparableRangeTests.java URL: http://svn.apache.org/viewvc/ofbiz/branches/multitenant20100310/framework/base/src/org/ofbiz/base/lang/test/ComparableRangeTests.java?rev=926987&r1=926986&r2=926987&view=diff ============================================================================== --- ofbiz/branches/multitenant20100310/framework/base/src/org/ofbiz/base/lang/test/ComparableRangeTests.java (original) +++ ofbiz/branches/multitenant20100310/framework/base/src/org/ofbiz/base/lang/test/ComparableRangeTests.java Wed Mar 24 09:23:07 2010 @@ -20,7 +20,9 @@ package org.ofbiz.base.lang.test; import org.ofbiz.base.test.GenericTestCaseBase; import org.ofbiz.base.lang.ComparableRange; +import org.ofbiz.base.lang.SourceMonitor; +@SourceMonitor("Adam Heath") public class ComparableRangeTests extends GenericTestCaseBase { public ComparableRangeTests(String name) { Modified: ofbiz/branches/multitenant20100310/framework/base/src/org/ofbiz/base/util/GroovyUtil.java URL: http://svn.apache.org/viewvc/ofbiz/branches/multitenant20100310/framework/base/src/org/ofbiz/base/util/GroovyUtil.java?rev=926987&r1=926986&r2=926987&view=diff ============================================================================== --- ofbiz/branches/multitenant20100310/framework/base/src/org/ofbiz/base/util/GroovyUtil.java (original) +++ ofbiz/branches/multitenant20100310/framework/base/src/org/ofbiz/base/util/GroovyUtil.java Wed Mar 24 09:23:07 2010 @@ -18,21 +18,20 @@ */ package org.ofbiz.base.util; -import java.io.InputStream; import java.io.IOException; -import java.net.MalformedURLException; +import java.io.InputStream; import java.net.URL; import java.util.Map; import java.util.Set; -import org.ofbiz.base.location.FlexibleLocation; -import org.ofbiz.base.util.cache.UtilCache; - import groovy.lang.Binding; import groovy.lang.GroovyClassLoader; import groovy.lang.GroovyShell; + import org.codehaus.groovy.control.CompilationFailedException; import org.codehaus.groovy.runtime.InvokerHelper; +import org.ofbiz.base.location.FlexibleLocation; +import org.ofbiz.base.util.cache.UtilCache; /** * GroovyUtil - Groovy Utilities @@ -131,83 +130,27 @@ public class GroovyUtil { } } - @SuppressWarnings("unchecked") - public static Object runScriptAtLocation(String location, Map<String, Object> context) throws GeneralException { + public static Class<?> getScriptClassFromLocation(String location) throws GeneralException { try { - Class scriptClass = parsedScripts.get(location); + Class<?> scriptClass = parsedScripts.get(location); if (scriptClass == null) { URL scriptUrl = FlexibleLocation.resolveLocation(location); if (scriptUrl == null) { throw new GeneralException("Script not found at location [" + location + "]"); } - scriptClass = parseClass(scriptUrl.openStream(), location); - if (Debug.verboseOn()) Debug.logVerbose("Caching Groovy script at: " + location, module); - parsedScripts.put(location, scriptClass); - } - - return InvokerHelper.createScript(scriptClass, getBinding(context)).run(); - - /* This code is just to test performance of the parsed versus unparsed approaches - long startTimeParsed = System.currentTimeMillis(); - InvokerHelper.createScript(scriptClass, getBinding(context)).run(); - if (Debug.timingOn()) Debug.logTiming("Ran parsed groovy script in [" + (System.currentTimeMillis() - startTimeParsed) + "]ms at: " + location, module); - */ - - /* NOTE DEJ20080526: this approach uses a pre-parsed script but it is not thread safe - * - * the groovy Script object contains both the parsed script AND the context, which is weird when trying to run a cached Script - * there is no available clone() method on the Script object, so we can't clone and set the context/binding to get around thread-safe issues - Script script = parsedScripts.get(location); - if (script == null) { - URL scriptUrl = FlexibleLocation.resolveLocation(location); - if (scriptUrl == null) { - throw new GeneralException("Script not found at location [" + location + "]"); + if (Debug.verboseOn()) { + Debug.logVerbose("Caching Groovy script at: " + location, module); } - - script = emptyGroovyShell.parse(scriptUrl.openStream(), scriptUrl.getFile()); - if (Debug.verboseOn()) Debug.logVerbose("Caching Groovy script at: " + location, module); - parsedScripts.put(location, script); - } - - script.setBinding(getBinding(context)); - return script.run(); - */ - - /* NOTE DEJ20080527: this approach works but only caches script text, not the parsed script - public static UtilCache<String, String> sourceScripts = UtilCache.createUtilCache("script.GroovyLocationSourceCache", 0, 0, false); - - public static GroovyShell emptyGroovyShell = new GroovyShell(); - String scriptString = sourceScripts.get(location); - if (scriptString == null) { - URL scriptUrl = FlexibleLocation.resolveLocation(location); - if (scriptUrl == null) { - throw new GeneralException("Script not found at location [" + location + "]"); - } - - scriptString = UtilURL.readUrlText(scriptUrl); - - if (Debug.verboseOn()) Debug.logVerbose("Caching Groovy script source at: " + location, module); - sourceScripts.put(location, scriptString); + parsedScripts.put(location, scriptClass); } - - long startTime = System.currentTimeMillis(); - Script script = emptyGroovyShell.parse(scriptString, location); - script.setBinding(getBinding(context)); - Object scriptResult = script.run(); - if (Debug.timingOn()) Debug.logTiming("Parsed and ran groovy script in [" + (System.currentTimeMillis() - startTime) + "]ms at: " + location, module); - - return scriptResult; - */ - } catch (MalformedURLException e) { - String errMsg = "Error loading Groovy script at [" + location + "]: " + e.toString(); - throw new GeneralException(errMsg, e); - } catch (IOException e) { - String errMsg = "Error loading Groovy script at [" + location + "]: " + e.toString(); - throw new GeneralException(errMsg, e); - } catch (CompilationFailedException e) { - String errMsg = "Error loading Groovy script at [" + location + "]: " + e.toString(); - throw new GeneralException(errMsg, e); + return scriptClass; + } catch (Exception e) { + throw new GeneralException("Error loading Groovy script at [" + location + "]: ", e); } } + + public static Object runScriptAtLocation(String location, Map<String, Object> context) throws GeneralException { + return InvokerHelper.createScript(getScriptClassFromLocation(location), getBinding(context)).run(); + } } Modified: ofbiz/branches/multitenant20100310/framework/base/src/org/ofbiz/base/util/IndentingWriter.java URL: http://svn.apache.org/viewvc/ofbiz/branches/multitenant20100310/framework/base/src/org/ofbiz/base/util/IndentingWriter.java?rev=926987&r1=926986&r2=926987&view=diff ============================================================================== --- ofbiz/branches/multitenant20100310/framework/base/src/org/ofbiz/base/util/IndentingWriter.java (original) +++ ofbiz/branches/multitenant20100310/framework/base/src/org/ofbiz/base/util/IndentingWriter.java Wed Mar 24 09:23:07 2010 @@ -22,12 +22,19 @@ import java.io.IOException; import java.io.FilterWriter; import java.io.Writer; +import org.ofbiz.base.lang.SourceMonitor; + +@SourceMonitor("Adam Heath") public class IndentingWriter extends FilterWriter { protected final StringBuilder indent = new StringBuilder(); protected final boolean doSpace; protected final boolean doNewline; protected boolean lastWasNewline; + public static IndentingWriter makeIndentingWriter(Writer writer) { + return writer instanceof IndentingWriter ? (IndentingWriter) writer : new IndentingWriter(writer); + } + public IndentingWriter(Writer out, boolean doSpace, boolean doNewline) { super(out); this.doSpace = doSpace; Modified: ofbiz/branches/multitenant20100310/framework/base/src/org/ofbiz/base/util/ObjectType.java URL: http://svn.apache.org/viewvc/ofbiz/branches/multitenant20100310/framework/base/src/org/ofbiz/base/util/ObjectType.java?rev=926987&r1=926986&r2=926987&view=diff ============================================================================== --- ofbiz/branches/multitenant20100310/framework/base/src/org/ofbiz/base/util/ObjectType.java (original) +++ ofbiz/branches/multitenant20100310/framework/base/src/org/ofbiz/base/util/ObjectType.java Wed Mar 24 09:23:07 2010 @@ -18,6 +18,7 @@ *******************************************************************************/ package org.ofbiz.base.util; +import java.io.Serializable; import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; import java.util.Collection; @@ -32,6 +33,7 @@ import org.ofbiz.base.conversion.Convers import org.ofbiz.base.conversion.Converter; import org.ofbiz.base.conversion.Converters; import org.ofbiz.base.conversion.LocalizedConverter; +import org.ofbiz.base.lang.SourceMonitor; import org.w3c.dom.Node; /** @@ -469,6 +471,7 @@ public class ObjectType { * @return the converted value * @throws GeneralException */ + @SourceMonitor("Adam Heath") @SuppressWarnings("unchecked") public static Object simpleTypeConvert(Object obj, String type, String format, TimeZone timeZone, Locale locale, boolean noTypeFail) throws GeneralException { if (obj == null) { @@ -516,7 +519,7 @@ public class ObjectType { LocalizedConverter<Object, Object> localizedConverter = null; try { localizedConverter = (LocalizedConverter) converter; - } catch (Exception e) {} + } catch (ClassCastException e) {} if (localizedConverter != null) { if (timeZone == null) { timeZone = TimeZone.getDefault(); @@ -783,7 +786,7 @@ public class ObjectType { return false; } - public static final class NullObject { + public static final class NullObject implements Serializable { public NullObject() { } @Override @@ -792,6 +795,11 @@ public class ObjectType { } @Override + public int hashCode() { + return toString().hashCode(); + } + + @Override public boolean equals(Object other) { if (other instanceof NullObject) { // should do equality of object? don't think so, just same type Modified: ofbiz/branches/multitenant20100310/framework/base/src/org/ofbiz/base/util/TimeDuration.java URL: http://svn.apache.org/viewvc/ofbiz/branches/multitenant20100310/framework/base/src/org/ofbiz/base/util/TimeDuration.java?rev=926987&r1=926986&r2=926987&view=diff ============================================================================== --- ofbiz/branches/multitenant20100310/framework/base/src/org/ofbiz/base/util/TimeDuration.java (original) +++ ofbiz/branches/multitenant20100310/framework/base/src/org/ofbiz/base/util/TimeDuration.java Wed Mar 24 09:23:07 2010 @@ -21,7 +21,10 @@ package org.ofbiz.base.util; import java.io.Serializable; import com.ibm.icu.util.Calendar; +import org.ofbiz.base.lang.SourceMonitor; + /** An immutable representation of a period of time. */ +@SourceMonitor("Adam Heath") @SuppressWarnings("serial") public class TimeDuration implements Serializable, Comparable<TimeDuration> { /** A <code>TimeDuration</code> instance that represents a zero time duration. */ Modified: ofbiz/branches/multitenant20100310/framework/base/src/org/ofbiz/base/util/UtilObject.java URL: http://svn.apache.org/viewvc/ofbiz/branches/multitenant20100310/framework/base/src/org/ofbiz/base/util/UtilObject.java?rev=926987&r1=926986&r2=926987&view=diff ============================================================================== --- ofbiz/branches/multitenant20100310/framework/base/src/org/ofbiz/base/util/UtilObject.java (original) +++ ofbiz/branches/multitenant20100310/framework/base/src/org/ofbiz/base/util/UtilObject.java Wed Mar 24 09:23:07 2010 @@ -27,10 +27,14 @@ import java.io.InputStream; import java.util.Iterator; import java.util.ServiceLoader; +import org.ofbiz.base.lang.Factory; +import org.ofbiz.base.lang.SourceMonitor; + /** * UtilObject * */ +@SourceMonitor("Adam Heath") public final class UtilObject { private UtilObject() { } Modified: ofbiz/branches/multitenant20100310/framework/base/src/org/ofbiz/base/util/collections/FlexibleMapAccessor.java URL: http://svn.apache.org/viewvc/ofbiz/branches/multitenant20100310/framework/base/src/org/ofbiz/base/util/collections/FlexibleMapAccessor.java?rev=926987&r1=926986&r2=926987&view=diff ============================================================================== --- ofbiz/branches/multitenant20100310/framework/base/src/org/ofbiz/base/util/collections/FlexibleMapAccessor.java (original) +++ ofbiz/branches/multitenant20100310/framework/base/src/org/ofbiz/base/util/collections/FlexibleMapAccessor.java Wed Mar 24 09:23:07 2010 @@ -23,6 +23,7 @@ import java.util.Locale; import java.util.Map; import javax.el.PropertyNotFoundException; +import org.ofbiz.base.lang.SourceMonitor; import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.UtilGenerics; import org.ofbiz.base.util.UtilObject; @@ -36,6 +37,7 @@ import org.ofbiz.base.util.string.UelUti * accessing sub-map values and the "[]" (square bracket) syntax for accessing * list elements. See individual Map operations for more information. */ +@SourceMonitor("Adam Heath") @SuppressWarnings("serial") public class FlexibleMapAccessor<T> implements Serializable { public static final String module = FlexibleMapAccessor.class.getName(); Modified: ofbiz/branches/multitenant20100310/framework/base/src/org/ofbiz/base/util/collections/GenericMap.java URL: http://svn.apache.org/viewvc/ofbiz/branches/multitenant20100310/framework/base/src/org/ofbiz/base/util/collections/GenericMap.java?rev=926987&r1=926986&r2=926987&view=diff ============================================================================== --- ofbiz/branches/multitenant20100310/framework/base/src/org/ofbiz/base/util/collections/GenericMap.java (original) +++ ofbiz/branches/multitenant20100310/framework/base/src/org/ofbiz/base/util/collections/GenericMap.java Wed Mar 24 09:23:07 2010 @@ -223,7 +223,6 @@ public abstract class GenericMap<K, V> i protected abstract <KE extends K, VE extends V> void putAllIterator(Iterator<Map.Entry<KE, VE>> it); public String toString() { - StringBuilder sb = new StringBuilder(); return appendTo(new StringBuilder()).toString(); } Modified: ofbiz/branches/multitenant20100310/framework/base/src/org/ofbiz/base/util/collections/IteratorWrapper.java URL: http://svn.apache.org/viewvc/ofbiz/branches/multitenant20100310/framework/base/src/org/ofbiz/base/util/collections/IteratorWrapper.java?rev=926987&r1=926986&r2=926987&view=diff ============================================================================== --- ofbiz/branches/multitenant20100310/framework/base/src/org/ofbiz/base/util/collections/IteratorWrapper.java (original) +++ ofbiz/branches/multitenant20100310/framework/base/src/org/ofbiz/base/util/collections/IteratorWrapper.java Wed Mar 24 09:23:07 2010 @@ -36,9 +36,10 @@ public abstract class IteratorWrapper<DE if (!it.hasNext()) return false; do { lastSrc = it.next(); - if (isValid(lastSrc)) { + DEST nextDest = convert(lastSrc); + if (isValid(lastSrc, nextDest)) { nextCalled = true; - lastDest = convert(lastSrc); + lastDest = nextDest; return true; } } while (it.hasNext()); @@ -55,8 +56,8 @@ public abstract class IteratorWrapper<DE public void remove() { if (lastSrc != null) { - it.remove(); noteRemoval(lastDest, lastSrc); + it.remove(); lastDest = null; lastSrc = null; } else { @@ -64,7 +65,7 @@ public abstract class IteratorWrapper<DE } } - protected boolean isValid(SRC src) { + protected boolean isValid(SRC src, DEST dest) { return true; } Modified: ofbiz/branches/multitenant20100310/framework/base/src/org/ofbiz/base/util/collections/test/FlexibleMapAccessorTests.java URL: http://svn.apache.org/viewvc/ofbiz/branches/multitenant20100310/framework/base/src/org/ofbiz/base/util/collections/test/FlexibleMapAccessorTests.java?rev=926987&r1=926986&r2=926987&view=diff ============================================================================== --- ofbiz/branches/multitenant20100310/framework/base/src/org/ofbiz/base/util/collections/test/FlexibleMapAccessorTests.java (original) +++ ofbiz/branches/multitenant20100310/framework/base/src/org/ofbiz/base/util/collections/test/FlexibleMapAccessorTests.java Wed Mar 24 09:23:07 2010 @@ -25,11 +25,13 @@ import java.util.Map; import java.util.Set; import java.math.BigDecimal; +import org.ofbiz.base.lang.SourceMonitor; import org.ofbiz.base.test.GenericTestCaseBase; import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.collections.FlexibleMapAccessor; import org.ofbiz.base.util.string.FlexibleStringExpander; +@SourceMonitor("Adam Heath") public class FlexibleMapAccessorTests extends GenericTestCaseBase { private static final Locale localeToTest = new Locale("en", "US"); private static final Locale badLocale = new Locale("fr"); Modified: ofbiz/branches/multitenant20100310/framework/base/src/org/ofbiz/base/util/string/FlexibleStringExpander.java URL: http://svn.apache.org/viewvc/ofbiz/branches/multitenant20100310/framework/base/src/org/ofbiz/base/util/string/FlexibleStringExpander.java?rev=926987&r1=926986&r2=926987&view=diff ============================================================================== --- ofbiz/branches/multitenant20100310/framework/base/src/org/ofbiz/base/util/string/FlexibleStringExpander.java (original) +++ ofbiz/branches/multitenant20100310/framework/base/src/org/ofbiz/base/util/string/FlexibleStringExpander.java Wed Mar 24 09:23:07 2010 @@ -27,6 +27,7 @@ import java.util.TimeZone; import javax.el.PropertyNotFoundException; +import org.ofbiz.base.lang.SourceMonitor; import org.ofbiz.base.util.BshUtil; import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.GroovyUtil; @@ -49,6 +50,7 @@ import bsh.EvalError; * and specified (XXX) currency.<p>This class extends the UEL by allowing * nested expressions.</p> */ +@SourceMonitor("Adam Heath") @SuppressWarnings("serial") public abstract class FlexibleStringExpander implements Serializable { Modified: ofbiz/branches/multitenant20100310/framework/base/src/org/ofbiz/base/util/string/test/FlexibleStringExpanderTests.java URL: http://svn.apache.org/viewvc/ofbiz/branches/multitenant20100310/framework/base/src/org/ofbiz/base/util/string/test/FlexibleStringExpanderTests.java?rev=926987&r1=926986&r2=926987&view=diff ============================================================================== --- ofbiz/branches/multitenant20100310/framework/base/src/org/ofbiz/base/util/string/test/FlexibleStringExpanderTests.java (original) +++ ofbiz/branches/multitenant20100310/framework/base/src/org/ofbiz/base/util/string/test/FlexibleStringExpanderTests.java Wed Mar 24 09:23:07 2010 @@ -28,12 +28,14 @@ import java.util.TimeZone; import junit.framework.TestCase; +import org.ofbiz.base.lang.SourceMonitor; import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.string.FlexibleStringExpander; import org.ofbiz.base.conversion.AbstractConverter; import org.ofbiz.base.conversion.ConversionException; import org.ofbiz.base.conversion.Converters; +@SourceMonitor("Adam Heath") public class FlexibleStringExpanderTests extends TestCase { private static final Locale localeToTest = new Locale("en", "US"); private static final Locale badLocale = new Locale("fr"); Modified: ofbiz/branches/multitenant20100310/framework/base/src/org/ofbiz/base/util/template/FreeMarkerWorker.java URL: http://svn.apache.org/viewvc/ofbiz/branches/multitenant20100310/framework/base/src/org/ofbiz/base/util/template/FreeMarkerWorker.java?rev=926987&r1=926986&r2=926987&view=diff ============================================================================== --- ofbiz/branches/multitenant20100310/framework/base/src/org/ofbiz/base/util/template/FreeMarkerWorker.java (original) +++ ofbiz/branches/multitenant20100310/framework/base/src/org/ofbiz/base/util/template/FreeMarkerWorker.java Wed Mar 24 09:23:07 2010 @@ -652,4 +652,8 @@ public class FreeMarkerWorker { } } } + + public static String encodeDoubleQuotes(String htmlString) { + return htmlString.replaceAll("\"", "\\\\\""); + } } Modified: ofbiz/branches/multitenant20100310/framework/base/src/org/ofbiz/base/util/test/IndentingWriterTests.java URL: http://svn.apache.org/viewvc/ofbiz/branches/multitenant20100310/framework/base/src/org/ofbiz/base/util/test/IndentingWriterTests.java?rev=926987&r1=926986&r2=926987&view=diff ============================================================================== --- ofbiz/branches/multitenant20100310/framework/base/src/org/ofbiz/base/util/test/IndentingWriterTests.java (original) +++ ofbiz/branches/multitenant20100310/framework/base/src/org/ofbiz/base/util/test/IndentingWriterTests.java Wed Mar 24 09:23:07 2010 @@ -20,9 +20,11 @@ package org.ofbiz.base.util.test; import java.io.StringWriter; +import org.ofbiz.base.lang.SourceMonitor; import org.ofbiz.base.util.IndentingWriter; import org.ofbiz.base.test.GenericTestCaseBase; +@SourceMonitor("Adam Heath") public class IndentingWriterTests extends GenericTestCaseBase { public IndentingWriterTests(String name) { super(name); @@ -58,6 +60,9 @@ public class IndentingWriterTests extend } public void testIndentingWriter() throws Exception { + StringWriter sw = new StringWriter(); + IndentingWriter iw = IndentingWriter.makeIndentingWriter(sw); + assertSame("makeIndentingWriter - pass-thru", iw, IndentingWriter.makeIndentingWriter(iw)); doTest("IndentingWriter doSpace:doNewline", true, true, "ab\n m\n 1\n 2 \n e"); doTest("IndentingWriter doNewline", false, true, "ab\nm\n1\n2\ne"); doTest("IndentingWriter doSpace", true, false, "ab\n m 1\n 2 \n e"); Modified: ofbiz/branches/multitenant20100310/framework/base/src/org/ofbiz/base/util/test/ObjectTypeTests.java URL: http://svn.apache.org/viewvc/ofbiz/branches/multitenant20100310/framework/base/src/org/ofbiz/base/util/test/ObjectTypeTests.java?rev=926987&r1=926986&r2=926987&view=diff ============================================================================== --- ofbiz/branches/multitenant20100310/framework/base/src/org/ofbiz/base/util/test/ObjectTypeTests.java (original) +++ ofbiz/branches/multitenant20100310/framework/base/src/org/ofbiz/base/util/test/ObjectTypeTests.java Wed Mar 24 09:23:07 2010 @@ -35,6 +35,7 @@ import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Attr; +import org.ofbiz.base.lang.SourceMonitor; import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.GeneralException; import org.ofbiz.base.util.ObjectType; @@ -44,6 +45,7 @@ import org.ofbiz.base.util.UtilMisc; import org.ofbiz.base.util.UtilXml; import org.ofbiz.base.test.GenericTestCaseBase; +@SourceMonitor("Adam Heath") public class ObjectTypeTests extends GenericTestCaseBase { public static final String module = ObjectTypeTests.class.getName(); private static final LocaleData localeData = new LocaleData("en_US", "Pacific/Wake", "fr", "GMT"); @@ -191,6 +193,17 @@ public class ObjectTypeTests extends Gen assertSame(label + ":to-java.lang.Object", toConvert, simpleTypeConvert(toConvert, "java.lang.Object", null, null, null, true)); } + public void testClassNotFound() { + GeneralException caught = null; + try { + ObjectType.simpleTypeConvert(this, "foobarbaz", null, null, null, false); + } catch (GeneralException e) { + caught = e; + } finally { + assertNotNull("class not found", caught); + } + } + public void testArray() throws GeneralException { simpleTypeConvertTestSingleMulti("Object[]->List", new Object[] {"one", "two", "three"}, new String[] {"List", "java.util.List"}, list); simpleTypeConvertTestSingleMulti("int[]->List", new int[] {1, 2, 3}, new String[] {"List", "java.util.List"}, list(1, 2, 3)); @@ -234,13 +247,13 @@ public class ObjectTypeTests extends Gen simpleTypeConvertTestSingleMulti("String->Timestamp", "01-01-1970 12:00:00/123", new String[] {"Timestamp", "java.sql.Timestamp"}, "dd-MM-yyyy HH:mm:ss/SSS", localeData, ntstmp); simpleTypeConvertTestMultiMulti("String->Timestamp", new String[] {"1970-01-01", "1970-01-01 00:00:00", "1970-01-01 00:00:00.0", "1970-01-01 00:00:00.000"}, new String[] {"Timestamp", "java.sql.Timestamp"}, null, localeData, new Timestamp(-43200000)); simpleTypeConvertTestError("String->error-Timestamp", "o", new String[] {"Timestamp", "java.sql.Timestamp"}); - simpleTypeConvertTestSingleMulti("String->List", "[one, two, three]", new String[] {"List", "java.util.List"}, list); - simpleTypeConvertTestSingleMulti("String->List", "[one, two, three", new String[] {"List", "java.util.List"}, list("[one, two, three")); - simpleTypeConvertTestSingleMulti("String->List", "one, two, three]", new String[] {"List", "java.util.List"}, list("one, two, three]")); - simpleTypeConvertTestSingleMulti("String->Set", "[one, two, three]", new String[] {"Set", "java.util.Set"}, set); - simpleTypeConvertTestSingleMulti("String->Set", "[one, two, three", new String[] {"Set", "java.util.Set"}, set("[one, two, three")); - simpleTypeConvertTestSingleMulti("String->Set", "one, two, three]", new String[] {"Set", "java.util.Set"}, set("one, two, three]")); - simpleTypeConvertTestSingleMulti("String->Map", "{one=1, two=2, three=3}", new String[] {"Map", "java.util.Map"}, map); + simpleTypeConvertTestSingleMulti("String->List", "[one, two, three]", new String[] {"List", "List<java.lang.String>", "java.util.List"}, list); + simpleTypeConvertTestSingleMulti("String->List", "[one, two, three", new String[] {"List", "List<java.lang.String>", "java.util.List"}, list("[one, two, three")); + simpleTypeConvertTestSingleMulti("String->List", "one, two, three]", new String[] {"List", "List<java.lang.String>", "java.util.List"}, list("one, two, three]")); + simpleTypeConvertTestSingleMulti("String->Set", "[one, two, three]", new String[] {"Set", "Set<java.lang.String>", "java.util.Set"}, set); + simpleTypeConvertTestSingleMulti("String->Set", "[one, two, three", new String[] {"Set", "Set<java.lang.String>", "java.util.Set"}, set("[one, two, three")); + simpleTypeConvertTestSingleMulti("String->Set", "one, two, three]", new String[] {"Set", "Set<java.lang.String>", "java.util.Set"}, set("one, two, three]")); + simpleTypeConvertTestSingleMulti("String->Map", "{one=1, two=2, three=3}", new String[] {"Map", "Map<String, String>", "java.util.Map"}, map); simpleTypeConvertTestError("String->Map(error-1)", "{one=1, two=2, three=3", new String[] {"Map", "java.util.Map"}); simpleTypeConvertTestError("String->Map(error-2)", "one=1, two=2, three=3}", new String[] {"Map", "java.util.Map"}); simpleTypeConvertTestSingleMulti("String->TimeDuration(number)", "3,661,001", new String[] {"TimeDuration", "org.ofbiz.base.util.TimeDuration"}, null, localeData, duration); @@ -255,8 +268,8 @@ public class ObjectTypeTests extends Gen simpleTypeConvertTestSingleMulti("Double->Float", dbl, new String[] {"Float", "java.lang.Float"}, flt); simpleTypeConvertTestSingleMulti("Double->Long", dbl, new String[] {"Long", "java.lang.Long"}, lng); simpleTypeConvertTestSingleMulti("Double->Integer", dbl, new String[] {"Integer", "java.lang.Integer"}, intg); - simpleTypeConvertTestSingleMulti("Double->List", dbl, new String[] {"List", "java.util.List"}, list(dbl)); - simpleTypeConvertTestSingleMulti("Double->Set", dbl, new String[] {"Set", "java.util.Set"}, set(dbl)); + simpleTypeConvertTestSingleMulti("Double->List", dbl, new String[] {"List", "List<java.lang.Double>", "java.util.List"}, list(dbl)); + simpleTypeConvertTestSingleMulti("Double->Set", dbl, new String[] {"Set", "Set<java.lang.Double>", "java.util.Set"}, set(dbl)); simpleTypeConvertTestSingleMulti("Double->TimeDuration", Double.valueOf("3661001.25"), new String[] {"TimeDuration", "org.ofbiz.base.util.TimeDuration"}, duration); simpleTypeConvertTestError("Double->error", dbl, new String[] {}); } @@ -269,8 +282,8 @@ public class ObjectTypeTests extends Gen simpleTypeConvertTestSingleMulti("Float->Float", flt, new String[] {"Float", "java.lang.Float"}, new Float("781.25")); simpleTypeConvertTestSingleMulti("Float->Long", flt, new String[] {"Long", "java.lang.Long"}, lng); simpleTypeConvertTestSingleMulti("Float->Integer", flt, new String[] {"Integer", "java.lang.Integer"}, intg); - simpleTypeConvertTestSingleMulti("Float->List", flt, new String[] {"List", "java.util.List"}, list(flt)); - simpleTypeConvertTestSingleMulti("Float->Set", flt, new String[] {"Set", "java.util.Set"}, set(flt)); + simpleTypeConvertTestSingleMulti("Float->List", flt, new String[] {"List", "List<java.lang.Float>", "java.util.List"}, list(flt)); + simpleTypeConvertTestSingleMulti("Float->Set", flt, new String[] {"Set", "Set<java.lang.Float>", "java.util.Set"}, set(flt)); simpleTypeConvertTestSingleMulti("Float->TimeDuration", Float.valueOf("3661001.25"), new String[] {"TimeDuration", "org.ofbiz.base.util.TimeDuration"}, duration); simpleTypeConvertTestError("Float->error", flt, new String[] {}); } @@ -282,8 +295,8 @@ public class ObjectTypeTests extends Gen simpleTypeConvertTestSingleMulti("Long->Float", lng, new String[] {"Float", "java.lang.Float"}, new Float("781")); simpleTypeConvertTestSingleMulti("Long->Long", lng, new String[] {"Long", "java.lang.Long"}, new Long("781")); simpleTypeConvertTestSingleMulti("Long->Integer", lng, new String[] {"Integer", "java.lang.Integer"}, intg); - simpleTypeConvertTestSingleMulti("Long->List", lng, new String[] {"List", "java.util.List"}, list(lng)); - simpleTypeConvertTestSingleMulti("Long->Set", lng, new String[] {"Set", "java.util.Set"}, set(lng)); + simpleTypeConvertTestSingleMulti("Long->List", lng, new String[] {"List", "List<java.lang.Long>", "java.util.List"}, list(lng)); + simpleTypeConvertTestSingleMulti("Long->Set", lng, new String[] {"Set", "Set<java.lang.Long>", "java.util.Set"}, set(lng)); simpleTypeConvertTestSingleMulti("Long->util.Date", 781L, new String[] {"Date", "java.util.Date"}, utlDt); simpleTypeConvertTestSingleMulti("Long->Timestamp", lng, new String[] {"Timestamp", "java.sql.Timestamp"}, tstmp); simpleTypeConvertTestSingleMulti("Long->TimeDuration", Long.valueOf("3661001"), new String[] {"TimeDuration", "org.ofbiz.base.util.TimeDuration"}, duration); @@ -297,8 +310,8 @@ public class ObjectTypeTests extends Gen simpleTypeConvertTestSingleMulti("Integer->Float", intg, new String[] {"Float", "java.lang.Float"}, new Float("781")); simpleTypeConvertTestSingleMulti("Integer->Long", intg, new String[] {"Long", "java.lang.Long"}, lng); simpleTypeConvertTestSingleMulti("Integer->Integer", intg, new String[] {"Integer", "java.lang.Integer"}, new Integer("781")); - simpleTypeConvertTestSingleMulti("Integer->List", intg, new String[] {"List", "java.util.List"}, list(intg)); - simpleTypeConvertTestSingleMulti("Integer->Set", intg, new String[] {"Set", "java.util.Set"}, set(intg)); + simpleTypeConvertTestSingleMulti("Integer->List", intg, new String[] {"List", "List<java.lang.Integer>", "java.util.List"}, list(intg)); + simpleTypeConvertTestSingleMulti("Integer->Set", intg, new String[] {"Set", "Set<java.lang.Integer>", "java.util.Set"}, set(intg)); simpleTypeConvertTestSingleMulti("Integer->TimeDuration", Integer.valueOf("3661001"), new String[] {"TimeDuration", "org.ofbiz.base.util.TimeDuration"}, duration); simpleTypeConvertTestError("Integer->error", intg, new String[] {}); } @@ -310,8 +323,8 @@ public class ObjectTypeTests extends Gen simpleTypeConvertTestSingleMulti("BigDecimal->Float", dcml, new String[] {"Float", "java.lang.Float"}, flt); simpleTypeConvertTestSingleMulti("BigDecimal->Long", dcml, new String[] {"Long", "java.lang.Long"}, lng); simpleTypeConvertTestSingleMulti("BigDecimal->Integer", dcml, new String[] {"Integer", "java.lang.Integer"}, intg); - simpleTypeConvertTestSingleMulti("BigDecimal->List", dcml, new String[] {"List", "java.util.List"}, list(dcml)); - simpleTypeConvertTestSingleMulti("BigDecimal->Set", dcml, new String[] {"Set", "java.util.Set"}, set(dcml)); + simpleTypeConvertTestSingleMulti("BigDecimal->List", dcml, new String[] {"List", "List<java.math.BigDecimal>", "java.util.List"}, list(dcml)); + simpleTypeConvertTestSingleMulti("BigDecimal->Set", dcml, new String[] {"Set", "Set<java.math.BigDecimal>", "java.util.Set"}, set(dcml)); simpleTypeConvertTestSingleMulti("BigDecimal->TimeDuration", new BigDecimal("3661001"), new String[] {"TimeDuration", "org.ofbiz.base.util.TimeDuration"}, duration); simpleTypeConvertTestError("BigDecimal->error", dcml, new String[] {}); } @@ -322,8 +335,8 @@ public class ObjectTypeTests extends Gen simpleTypeConvertTestSingleMulti("SqlDate->String", sqlDt, new String[] {"String", "java.lang.String"}, "dd-MM-yyyy", localeData, "31-12-1969"); simpleTypeConvertTestSingleMulti("SqlDate->SqlDate", sqlDt, new String[] {"Date", "java.sql.Date"}, new java.sql.Date(-129600000)); simpleTypeConvertTestSingleMulti("SqlDate->Timestamp", sqlDt, new String[] {"Timestamp", "java.sql.Timestamp"}, new Timestamp(-129600000)); - simpleTypeConvertTestSingleMulti("SqlDate->List", sqlDt, new String[] {"List", "java.util.List"}, list(sqlDt)); - simpleTypeConvertTestSingleMulti("SqlDate->Set", sqlDt, new String[] {"Set", "java.util.Set"}, set(sqlDt)); + simpleTypeConvertTestSingleMulti("SqlDate->List", sqlDt, new String[] {"List", "List<java.sql.Date>", "java.util.List"}, list(sqlDt)); + simpleTypeConvertTestSingleMulti("SqlDate->Set", sqlDt, new String[] {"Set", "Set<java.sql.Date>", "java.util.Set"}, set(sqlDt)); simpleTypeConvertTestSingleMulti("SqlDate->Long", sqlDt, new String[] {"Long", "java.lang.Long"}, Long.valueOf("-129600000")); simpleTypeConvertTestError("SqlDate->error", sqlDt, new String[] {"Time", "java.sql.Time"}); } @@ -334,8 +347,8 @@ public class ObjectTypeTests extends Gen simpleTypeConvertTestSingleMulti("SqlTime->String", sqlTm, new String[] {"String", "java.lang.String"}, "ss:mm:HH", localeData, "56:34:12"); simpleTypeConvertTestSingleMulti("SqlTime->SqlTime", sqlTm, new String[] {"Time", "java.sql.Time"}, new java.sql.Time(2096000)); simpleTypeConvertTestSingleMulti("SqlTime->Timestamp", sqlTm, new String[] {"Timestamp", "java.sql.Timestamp"}, new Timestamp(2096000)); - simpleTypeConvertTestSingleMulti("SqlTime->List", sqlTm, new String[] {"List", "java.util.List"}, list(sqlTm)); - simpleTypeConvertTestSingleMulti("SqlTime->Set", sqlTm, new String[] {"Set", "java.util.Set"}, set(sqlTm)); + simpleTypeConvertTestSingleMulti("SqlTime->List", sqlTm, new String[] {"List", "List<java.sql.Time>", "java.util.List"}, list(sqlTm)); + simpleTypeConvertTestSingleMulti("SqlTime->Set", sqlTm, new String[] {"Set", "Set<java.sql.Time>", "java.util.Set"}, set(sqlTm)); simpleTypeConvertTestError("SqlTime->error", sqlTm, new String[] {"Date", "java.sql.Date"}); } @@ -346,8 +359,8 @@ public class ObjectTypeTests extends Gen simpleTypeConvertTestSingleMulti("Timestamp->Date", tstmp, new String[] {"Date", "java.sql.Date"}, new java.sql.Date(781)); simpleTypeConvertTestSingleMulti("Timestamp->Time", tstmp, new String[] {"Time", "java.sql.Time"}, new java.sql.Time(781)); simpleTypeConvertTestSingleMulti("Timestamp->Timestamp", tstmp, new String[] {"Timestamp", "java.sql.Timestamp"}, new Timestamp(781)); - simpleTypeConvertTestSingleMulti("Timestamp->List", tstmp, new String[] {"List", "java.util.List"}, list(tstmp)); - simpleTypeConvertTestSingleMulti("Timestamp->Set", tstmp, new String[] {"Set", "java.util.Set"}, set(tstmp)); + simpleTypeConvertTestSingleMulti("Timestamp->List", tstmp, new String[] {"List", "List<java.sql.Timestamp>", "java.util.List"}, list(tstmp)); + simpleTypeConvertTestSingleMulti("Timestamp->Set", tstmp, new String[] {"Set", "Set<java.sql.Timestamp>", "java.util.Set"}, set(tstmp)); simpleTypeConvertTestSingleMulti("Timestamp->Long", tstmp, new String[] {"Long", "java.lang.Long"}, Long.valueOf("781")); simpleTypeConvertTestError("Timestamp->error", tstmp, new String[] {}); } @@ -359,8 +372,8 @@ public class ObjectTypeTests extends Gen simpleTypeConvertTestSingleMulti("Boolean->String", false, new String[] {"String", "java.lang.String"}, "false"); simpleTypeConvertTestSingleMulti("Boolean->Integer", true, new String[] {"Integer", "java.lang.Integer"}, Integer.valueOf("1")); simpleTypeConvertTestSingleMulti("Boolean->Integer", false, new String[] {"Integer", "java.lang.Integer"}, Integer.valueOf("0")); - simpleTypeConvertTestSingleMulti("Boolean->List", true, new String[] {"List", "java.util.List"}, list(true)); - simpleTypeConvertTestSingleMulti("Boolean->Set", true, new String[] {"Set", "java.util.Set"}, set(true)); + simpleTypeConvertTestSingleMulti("Boolean->List", true, new String[] {"List", "List<java.lang.Boolean>", "java.util.List"}, list(true)); + simpleTypeConvertTestSingleMulti("Boolean->Set", true, new String[] {"Set", "Set<java.lang.Boolean>", "java.util.Set"}, set(true)); simpleTypeConvertTestError("Boolean->error", true, new String[] {}); } @@ -381,8 +394,8 @@ public class ObjectTypeTests extends Gen public void testMap() throws GeneralException { simpleTypeConvertTestSingleMulti("Map->Map", map, new String[] {"Map", "java.util.Map"}, map("one", "1", "two", "2", "three", "3")); simpleTypeConvertTestSingleMulti("Map->String", map, new String[] {"String", "java.lang.String"}, "{one=1, two=2, three=3}"); - simpleTypeConvertTestSingleMulti("Map->List", map, new String[] {"List", "java.util.List"}, list(map)); - simpleTypeConvertTestSingleMulti("Map->Set", map, new String[] {"Set", "java.util.Set"}, set(map)); + simpleTypeConvertTestSingleMulti("Map->List", map, new String[] {"List", "List<java.util.Map>", "java.util.List"}, list(map)); + simpleTypeConvertTestSingleMulti("Map->Set", map, new String[] {"Set", "Set<java.util.Map>", "java.util.Set"}, set(map)); simpleTypeConvertTestError("Map->error", map, new String[] {}); } Modified: ofbiz/branches/multitenant20100310/framework/base/src/org/ofbiz/base/util/test/TimeDurationTests.java URL: http://svn.apache.org/viewvc/ofbiz/branches/multitenant20100310/framework/base/src/org/ofbiz/base/util/test/TimeDurationTests.java?rev=926987&r1=926986&r2=926987&view=diff ============================================================================== --- ofbiz/branches/multitenant20100310/framework/base/src/org/ofbiz/base/util/test/TimeDurationTests.java (original) +++ ofbiz/branches/multitenant20100310/framework/base/src/org/ofbiz/base/util/test/TimeDurationTests.java Wed Mar 24 09:23:07 2010 @@ -23,9 +23,11 @@ package org.ofbiz.base.util.test; import com.ibm.icu.util.Calendar; import com.ibm.icu.util.TimeZone; +import org.ofbiz.base.lang.SourceMonitor; import org.ofbiz.base.util.TimeDuration; import org.ofbiz.base.test.GenericTestCaseBase; +@SourceMonitor("Adam Heath") public class TimeDurationTests extends GenericTestCaseBase { private static final Calendar zero = Calendar.getInstance(TimeZone.getTimeZone("GMT")); Modified: ofbiz/branches/multitenant20100310/framework/base/src/org/ofbiz/base/util/test/UtilIOTests.java URL: http://svn.apache.org/viewvc/ofbiz/branches/multitenant20100310/framework/base/src/org/ofbiz/base/util/test/UtilIOTests.java?rev=926987&r1=926986&r2=926987&view=diff ============================================================================== --- ofbiz/branches/multitenant20100310/framework/base/src/org/ofbiz/base/util/test/UtilIOTests.java (original) +++ ofbiz/branches/multitenant20100310/framework/base/src/org/ofbiz/base/util/test/UtilIOTests.java Wed Mar 24 09:23:07 2010 @@ -33,10 +33,12 @@ import java.util.Locale; import java.util.TimeZone; import java.util.UUID; +import org.ofbiz.base.lang.SourceMonitor; import org.ofbiz.base.util.UtilIO; import org.ofbiz.base.util.UtilMisc; import org.ofbiz.base.test.GenericTestCaseBase; +@SourceMonitor("Adam Heath") public class UtilIOTests extends GenericTestCaseBase { private static final byte[] trademarkBytes = new byte[] { (byte) 0xE2, (byte) 0x84, (byte) 0xA2 Modified: ofbiz/branches/multitenant20100310/framework/base/src/org/ofbiz/base/util/test/UtilObjectTests.java URL: http://svn.apache.org/viewvc/ofbiz/branches/multitenant20100310/framework/base/src/org/ofbiz/base/util/test/UtilObjectTests.java?rev=926987&r1=926986&r2=926987&view=diff ============================================================================== --- ofbiz/branches/multitenant20100310/framework/base/src/org/ofbiz/base/util/test/UtilObjectTests.java (original) +++ ofbiz/branches/multitenant20100310/framework/base/src/org/ofbiz/base/util/test/UtilObjectTests.java Wed Mar 24 09:23:07 2010 @@ -29,12 +29,14 @@ import java.io.Serializable; import java.util.HashMap; import java.util.Set; +import org.ofbiz.base.lang.Factory; +import org.ofbiz.base.lang.SourceMonitor; import org.ofbiz.base.util.Debug; -import org.ofbiz.base.util.Factory; import org.ofbiz.base.util.GroovyUtil; import org.ofbiz.base.util.UtilObject; import org.ofbiz.base.test.GenericTestCaseBase; +@SourceMonitor("Adam Heath") public class UtilObjectTests extends GenericTestCaseBase { public UtilObjectTests(String name) { super(name); Modified: ofbiz/branches/multitenant20100310/framework/bi/script/org/ofbiz/bi/DimensionServices.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/multitenant20100310/framework/bi/script/org/ofbiz/bi/DimensionServices.xml?rev=926987&r1=926986&r2=926987&view=diff ============================================================================== --- ofbiz/branches/multitenant20100310/framework/bi/script/org/ofbiz/bi/DimensionServices.xml (original) +++ ofbiz/branches/multitenant20100310/framework/bi/script/org/ofbiz/bi/DimensionServices.xml Wed Mar 24 09:23:07 2010 @@ -70,7 +70,7 @@ under the License. <entity-condition entity-name="InventoryItem" list="inventoryItems"> <condition-expr field-name="inventoryItemTypeId" operator="equals" value="NON_SERIAL_INV_ITEM"/> </entity-condition> - <iterate list="inventoryItems" entry="inventoryItem"> + <iterate list="inventoryItems" entry="inventoryItem"> <clear-field field="inventMap"/> <set field="inventMap.inventoryItemId" from-field="inventoryItem.inventoryItemId"/> <call-service service-name="loadInventoryFact" in-map-name="inventMap"></call-service> Modified: ofbiz/branches/multitenant20100310/framework/birt/build.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/multitenant20100310/framework/birt/build.xml?rev=926987&r1=926986&r2=926987&view=diff ============================================================================== --- ofbiz/branches/multitenant20100310/framework/birt/build.xml (original) +++ ofbiz/branches/multitenant20100310/framework/birt/build.xml Wed Mar 24 09:23:07 2010 @@ -45,6 +45,6 @@ under the License. <fileset dir="../webapp/lib" includes="*.jar"/> <fileset dir="../webapp/build/lib" includes="*.jar"/> <fileset dir="../widget/build/lib" includes="*.jar"/> - <fileset dir="../common/build/lib" includes="*.jar"/> + <fileset dir="../common/build/lib" includes="*.jar"/> </path> </project> Modified: ofbiz/branches/multitenant20100310/framework/birt/data/helpdata/HELP_BIRT.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/multitenant20100310/framework/birt/data/helpdata/HELP_BIRT.xml?rev=926987&r1=926986&r2=926987&view=diff ============================================================================== --- ofbiz/branches/multitenant20100310/framework/birt/data/helpdata/HELP_BIRT.xml (original) +++ ofbiz/branches/multitenant20100310/framework/birt/data/helpdata/HELP_BIRT.xml Wed Mar 24 09:23:07 2010 @@ -25,9 +25,9 @@ under the License. <title>OFBiz BIRT Overview</title> <para> - Welcome to OFBiz BIRT. The part installed within OFBiz allows you to run the reports which are prepared using Eclipse with the BIRT plugin installed. - As a demo we have prepared a product report as an example. - Look at the <link xl:href="http://eclipse.org/birt/phoenix/">Eclipse BIRT web site</link> for more information. + Welcome to OFBiz BIRT. The part installed within OFBiz allows you to run the reports which are prepared using Eclipse with the BIRT plugin installed. + As a demo we have prepared a product report as an example. + Look at the <link xl:href="http://eclipse.org/birt/phoenix/">Eclipse BIRT web site</link> for more information. </para> <para> This is a short document to help you get started using BIRT to make a report. @@ -47,8 +47,8 @@ under the License. <section> <title>Examine the Example Report</title> <para> - The example report that run in OFBiz is in the file component://birt/webapp/birt/report/product.rptdesign. When you have started Eclipse BIRT, open this document. - This report show how a report receives data from OFBiz through Scripted Data Source using the OFBiz delegator. + The example report that run in OFBiz is in the file component://birt/webapp/birt/report/product.rptdesign. When you have started Eclipse BIRT, open this document. + This report show how a report receives data from OFBiz through Scripted Data Source using the OFBiz delegator. This report has the scripted data source name "OFBiz" and the data set that use the script data source name is called "Product". Open the script editor for Product data set, it uses the delegator object query data from the Product entity. A report that runs on the OFBiz platform can use the delegator object, dispatcher object, security object and classpath of OFBiz environment in the script.</para> @@ -56,8 +56,8 @@ under the License. <section> <title>Important file for using BIRT's jsp tags</title> <para> - If a web applications wants to use the report in a screen, copy birt.tld file to [WEB APP]/WEB-INF/ directory ant assign in in ftl - like <#assign birt = JspTaglibs["/WEB-INF/birt.tld"]/></para> + If a web applications wants to use the report in a screen, copy birt.tld file to [WEB APP]/WEB-INF/ directory ant assign in in ftl + like <#assign birt = JspTaglibs["/WEB-INF/birt.tld"]/></para> </section> <section> <title>Important tag's attribute in ftl.</title> Modified: ofbiz/branches/multitenant20100310/framework/birt/src/org/ofbiz/birt/container/BirtContainer.java URL: http://svn.apache.org/viewvc/ofbiz/branches/multitenant20100310/framework/birt/src/org/ofbiz/birt/container/BirtContainer.java?rev=926987&r1=926986&r2=926987&view=diff ============================================================================== --- ofbiz/branches/multitenant20100310/framework/birt/src/org/ofbiz/birt/container/BirtContainer.java (original) +++ ofbiz/branches/multitenant20100310/framework/birt/src/org/ofbiz/birt/container/BirtContainer.java Wed Mar 24 09:23:07 2010 @@ -39,7 +39,6 @@ import org.ofbiz.base.container.Containe import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.FileUtil; import org.ofbiz.base.util.UtilGenerics; -import org.ofbiz.base.util.UtilObject; import org.ofbiz.base.util.UtilProperties; import org.ofbiz.entity.Delegator; import org.ofbiz.entity.DelegatorFactory; @@ -99,11 +98,7 @@ public class BirtContainer implements Co // get the delegator delegatorName = ContainerConfig.getPropertyValue(cc, "delegator-name", "default"); - try { - delegator = UtilObject.getObjectFromFactory(DelegatorFactory.class, delegatorName); - } catch (ClassNotFoundException e) { - Debug.logError(e, module); - } + delegator = DelegatorFactory.getDelegator(delegatorName); // get the dispatcher dispatcher = GenericDispatcher.getLocalDispatcher(dispatcherName, delegator); Modified: ofbiz/branches/multitenant20100310/framework/build.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/multitenant20100310/framework/build.xml?rev=926987&r1=926986&r2=926987&view=diff ============================================================================== --- ofbiz/branches/multitenant20100310/framework/build.xml (original) +++ ofbiz/branches/multitenant20100310/framework/build.xml Wed Mar 24 09:23:07 2010 @@ -93,6 +93,7 @@ under the License. <target name="clean-logs"> <delete verbose="on" dir="../runtime/logs/test-results"/> + <delete dir="../runtime/logs/cobertura-report"/> <delete verbose="on"> <fileset dir="../runtime/logs" includes="*"> <exclude name="README"/> Modified: ofbiz/branches/multitenant20100310/framework/common/config/CommonUiLabels.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/multitenant20100310/framework/common/config/CommonUiLabels.xml?rev=926987&r1=926986&r2=926987&view=diff ============================================================================== --- ofbiz/branches/multitenant20100310/framework/common/config/CommonUiLabels.xml (original) +++ ofbiz/branches/multitenant20100310/framework/common/config/CommonUiLabels.xml Wed Mar 24 09:23:07 2010 @@ -8448,7 +8448,7 @@ <value xml:lang="es">Crear tipo de fuente de datos</value> <value xml:lang="fr">Nouveau type de source de données</value> <value xml:lang="hi_IN">डà¥à¤à¤¾ सà¥à¤°à¥à¤¤ पà¥à¤°à¤à¤¾à¤° बनाà¤à¤</value> - <value xml:lang="it">Creare tipo sorgente dati</value> + <value xml:lang="it">Nuovo tipo sorgente dati</value> <value xml:lang="nl">Aanmaken Brontype</value> <value xml:lang="pt">Criar Tipo de Origem de Dados</value> <value xml:lang="ro">Creare Tip Sursa Date</value> @@ -8520,6 +8520,9 @@ <value xml:lang="th">à¸à¸²à¸£à¹à¸à¸´à¸</value> <value xml:lang="zh">è´¢å¡</value> </property> + <property key="FormFieldTitle_acceptButton"> + <value xml:lang="en">Accept</value> + </property> <property key="FormFieldTitle_addButton"> <value xml:lang="ar">إضاÙØ©</value> <value xml:lang="de">Hinzufügen</value> Modified: ofbiz/branches/multitenant20100310/framework/common/data/GeoData_CN.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/multitenant20100310/framework/common/data/GeoData_CN.xml?rev=926987&r1=926986&r2=926987&view=diff ============================================================================== --- ofbiz/branches/multitenant20100310/framework/common/data/GeoData_CN.xml (original) +++ ofbiz/branches/multitenant20100310/framework/common/data/GeoData_CN.xml Wed Mar 24 09:23:07 2010 @@ -24,14 +24,14 @@ under the License. See also: http://en.wikipedia.org/wiki/Province_of_China http://en.wikipedia.org/wiki/ISO_3166-2:CN --> - <Geo abbreviation="京" geoCode="11" geoId="CN-11" geoName="å京" geoTypeId="MUNICIPALITY"/> - <Geo abbreviation="æ¸" geoCode="50" geoId="CN-50" geoName="éåº" geoTypeId="MUNICIPALITY"/> - <Geo abbreviation="沪" geoCode="31" geoId="CN-31" geoName="ä¸æµ·" geoTypeId="MUNICIPALITY"/> - <Geo abbreviation="æ´¥" geoCode="12" geoId="CN-12" geoName="天津" geoTypeId="MUNICIPALITY"/> + <Geo abbreviation="京" geoCode="11" geoId="CN-11" geoName="å京" geoTypeId="MUNICIPALITY"/> + <Geo abbreviation="æ¸" geoCode="50" geoId="CN-50" geoName="éåº" geoTypeId="MUNICIPALITY"/> + <Geo abbreviation="沪" geoCode="31" geoId="CN-31" geoName="ä¸æµ·" geoTypeId="MUNICIPALITY"/> + <Geo abbreviation="æ´¥" geoCode="12" geoId="CN-12" geoName="天津" geoTypeId="MUNICIPALITY"/> <Geo abbreviation="é»" geoCode="23" geoId="CN-23" geoName="é»é¾æ±" geoTypeId="PROVINCE"/> <Geo abbreviation="å" geoCode="22" geoId="CN-22" geoName="åæ" geoTypeId="PROVINCE"/> <Geo abbreviation="è¾½" geoCode="21" geoId="CN-21" geoName="è¾½å®" geoTypeId="PROVINCE"/> - <Geo abbreviation="é" geoCode="63" geoId="CN-63" geoName="éæµ·" geoTypeId="PROVINCE"/> + <Geo abbreviation="é" geoCode="63" geoId="CN-63" geoName="éæµ·" geoTypeId="PROVINCE"/> <Geo abbreviation="ç" geoCode="62" geoId="CN-62" geoName="çè" geoTypeId="PROVINCE"/> <Geo abbreviation="é" geoCode="61" geoId="CN-61" geoName="é西" geoTypeId="PROVINCE"/> <Geo abbreviation="æ" geoCode="14" geoId="CN-14" geoName="山西" geoTypeId="PROVINCE"/> @@ -45,21 +45,21 @@ under the License. <Geo abbreviation="æ»" geoCode="53" geoId="CN-53" geoName="äºå" geoTypeId="PROVINCE"/> <Geo abbreviation="é»" geoCode="52" geoId="CN-52" geoName="è´µå·" geoTypeId="PROVINCE"/> <Geo abbreviation="æ¹" geoCode="43" geoId="CN-43" geoName="æ¹å" geoTypeId="PROVINCE"/> - <Geo abbreviation="èµ£" geoCode="36" geoId="CN-36" geoName="æ±è¥¿" geoTypeId="PROVINCE"/> - <Geo abbreviation="æµ" geoCode="33" geoId="CN-33" geoName="æµæ±" geoTypeId="PROVINCE"/> - <Geo abbreviation="ç¼" geoCode="46" geoId="CN-46" geoName="æµ·å" geoTypeId="PROVINCE"/> - <Geo abbreviation="粤" geoCode="44" geoId="CN-44" geoName="广ä¸" geoTypeId="PROVINCE"/> - <Geo abbreviation="é½" geoCode="35" geoId="CN-35" geoName="ç¦å»º" geoTypeId="PROVINCE"/> - <Geo abbreviation="å°" geoCode="71" geoId="CN-71" geoName="å°æ¹¾" geoTypeId="PROVINCE"/> - <Geo abbreviation="æ¡" geoCode="45" geoId="CN-45" geoName="广西" geoTypeId="REGION"/> - <Geo abbreviation="å èå¤" geoCode="15" geoId="CN-15" geoName="å èå¤" geoTypeId="REGION"/> - <Geo abbreviation="å®" geoCode="64" geoId="CN-64" geoName="å®å¤" geoTypeId="REGION"/> - <Geo abbreviation="æ°" geoCode="65" geoId="CN-65" geoName="æ°ç" geoTypeId="REGION"/> - <Geo abbreviation="è" geoCode="54" geoId="CN-54" geoName="西è" geoTypeId="REGION"/> + <Geo abbreviation="èµ£" geoCode="36" geoId="CN-36" geoName="æ±è¥¿" geoTypeId="PROVINCE"/> + <Geo abbreviation="æµ" geoCode="33" geoId="CN-33" geoName="æµæ±" geoTypeId="PROVINCE"/> + <Geo abbreviation="ç¼" geoCode="46" geoId="CN-46" geoName="æµ·å" geoTypeId="PROVINCE"/> + <Geo abbreviation="粤" geoCode="44" geoId="CN-44" geoName="广ä¸" geoTypeId="PROVINCE"/> + <Geo abbreviation="é½" geoCode="35" geoId="CN-35" geoName="ç¦å»º" geoTypeId="PROVINCE"/> + <Geo abbreviation="å°" geoCode="71" geoId="CN-71" geoName="å°æ¹¾" geoTypeId="PROVINCE"/> + <Geo abbreviation="æ¡" geoCode="45" geoId="CN-45" geoName="广西" geoTypeId="REGION"/> + <Geo abbreviation="å èå¤" geoCode="15" geoId="CN-15" geoName="å èå¤" geoTypeId="REGION"/> + <Geo abbreviation="å®" geoCode="64" geoId="CN-64" geoName="å®å¤" geoTypeId="REGION"/> + <Geo abbreviation="æ°" geoCode="65" geoId="CN-65" geoName="æ°ç" geoTypeId="REGION"/> + <Geo abbreviation="è" geoCode="54" geoId="CN-54" geoName="西è" geoTypeId="REGION"/> <Geo abbreviation="é¦æ¸¯" geoCode="91" geoId="CN-91" geoName="é¦æ¸¯" geoTypeId="REGION"/> - <Geo abbreviation="æ¾³é¨" geoCode="92" geoId="CN-92" geoName="æ¾³é¨" geoTypeId="REGION"/> + <Geo abbreviation="æ¾³é¨" geoCode="92" geoId="CN-92" geoName="æ¾³é¨" geoTypeId="REGION"/> - <GeoAssoc geoId="CHN" geoIdTo="CN-11" geoAssocTypeId="REGIONS"/> + <GeoAssoc geoId="CHN" geoIdTo="CN-11" geoAssocTypeId="REGIONS"/> <GeoAssoc geoId="CHN" geoIdTo="CN-50" geoAssocTypeId="REGIONS"/> <GeoAssoc geoId="CHN" geoIdTo="CN-31" geoAssocTypeId="REGIONS"/> <GeoAssoc geoId="CHN" geoIdTo="CN-12" geoAssocTypeId="REGIONS"/> @@ -86,8 +86,8 @@ under the License. <GeoAssoc geoId="CHN" geoIdTo="CN-44" geoAssocTypeId="REGIONS"/> <GeoAssoc geoId="CHN" geoIdTo="CN-35" geoAssocTypeId="REGIONS"/> <GeoAssoc geoId="CHN" geoIdTo="CN-71" geoAssocTypeId="REGIONS"/> - <GeoAssoc geoId="CHN" geoIdTo="CN-64" geoAssocTypeId="REGIONS"/> - <GeoAssoc geoId="CHN" geoIdTo="CN-65" geoAssocTypeId="REGIONS"/> + <GeoAssoc geoId="CHN" geoIdTo="CN-64" geoAssocTypeId="REGIONS"/> + <GeoAssoc geoId="CHN" geoIdTo="CN-65" geoAssocTypeId="REGIONS"/> <GeoAssoc geoId="CHN" geoIdTo="CN-54" geoAssocTypeId="REGIONS"/> <GeoAssoc geoId="CHN" geoIdTo="CN-91" geoAssocTypeId="REGIONS"/> <GeoAssoc geoId="CHN" geoIdTo="CN-92" geoAssocTypeId="REGIONS"/> Modified: ofbiz/branches/multitenant20100310/framework/common/webcommon/WEB-INF/portal-controller.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/multitenant20100310/framework/common/webcommon/WEB-INF/portal-controller.xml?rev=926987&r1=926986&r2=926987&view=diff ============================================================================== --- ofbiz/branches/multitenant20100310/framework/common/webcommon/WEB-INF/portal-controller.xml (original) +++ ofbiz/branches/multitenant20100310/framework/common/webcommon/WEB-INF/portal-controller.xml Wed Mar 24 09:23:07 2010 @@ -23,19 +23,25 @@ under the License. <description>Portal ControlServlet Configuration File</description> <owner>Copyright 2001-2009 The Apache Software Foundation</owner> - <!-- Portal requests --> + <!-- Portlet show requests --> <request-map uri="showPortlet"> <security https="true" auth="true"/> <response name="success" type="view" value="showPortlet"/> </request-map> - <request-map uri="showPortletDecorator"> + <request-map uri="showPortletMainDecorator"> <security https="true" auth="true"/> - <response name="success" type="view" value="showPortletDecorator"/> + <response name="success" type="view" value="showPortletMainDecorator"/> </request-map> + <request-map uri="showPortletSimpleDecorator"> + <security https="true" auth="true"/> + <response name="success" type="view" value="showPortletSimpleDecorator"/> + </request-map> + <!-- Portal page show requests --> <request-map uri="showPortalPage"> <security https="true" auth="true"/> <response name="success" type="view" value="showPortalPage" save-home-view="true"/> </request-map> + <!-- Portal page update requests --> <request-map uri="ManagePortalPages"> <security https="true" auth="true"/> <event type="simple" invoke="copyIfRequiredSystemPage" path="component://common/script/org/ofbiz/common/PortalPageMethods.xml"/> @@ -131,7 +137,8 @@ under the License. <!-- View Mappings --> <view-map name="showPortalPage" type="screen" page="component://common/widget/PortalPageScreens.xml#showPortalPage"/> <view-map name="showPortlet" type="screen" page="component://common/widget/PortalPageScreens.xml#showPortlet"/> - <view-map name="showPortletDecorator" type="screen" page="component://common/widget/PortalPageScreens.xml#showPortletDecorator"/> + <view-map name="showPortletMainDecorator" type="screen" page="component://common/widget/PortalPageScreens.xml#showPortletMainDecorator"/> + <view-map name="showPortletSimpleDecorator" type="screen" page="component://common/widget/PortalPageScreens.xml#showPortletSimpleDecorator"/> <view-map name="ManagePortalPages" type="screen" page="component://common/widget/PortalPageScreens.xml#ManagePortalPages"/> <view-map name="AddPortlet" type="screen" page="component://common/widget/PortalPageScreens.xml#AddPortlet"/> </site-conf> Modified: ofbiz/branches/multitenant20100310/framework/common/webcommon/includes/ajaxAutocompleteOptions.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/multitenant20100310/framework/common/webcommon/includes/ajaxAutocompleteOptions.ftl?rev=926987&r1=926986&r2=926987&view=diff ============================================================================== --- ofbiz/branches/multitenant20100310/framework/common/webcommon/includes/ajaxAutocompleteOptions.ftl (original) +++ ofbiz/branches/multitenant20100310/framework/common/webcommon/includes/ajaxAutocompleteOptions.ftl Wed Mar 24 09:23:07 2010 @@ -27,11 +27,11 @@ under the License. <#list context.displayFieldsSet as key> <#assign field = autocompleteOption.get(key)?if_exists> <#if field?has_content> - <#if (key == context.returnField)> + <#if (key == context.returnField)> <#assign returnField = field/> - <#else> + <#else> <#assign displayString = displayString + field + " "> - </#if> + </#if> </#if> </#list> <#if ("Y" == displayReturnField)> Modified: ofbiz/branches/multitenant20100310/framework/common/webcommon/includes/simple.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/multitenant20100310/framework/common/webcommon/includes/simple.ftl?rev=926987&r1=926986&r2=926987&view=diff ============================================================================== --- ofbiz/branches/multitenant20100310/framework/common/webcommon/includes/simple.ftl (original) +++ ofbiz/branches/multitenant20100310/framework/common/webcommon/includes/simple.ftl Wed Mar 24 09:23:07 2010 @@ -56,7 +56,7 @@ under the License. <form name="printPage"> <input type="button" value="${uiLabelMap.CommonPrint}" onClick="window.print()" class="smallSubmit"/> </form> -<br/> +<br /> ${sections.render("body")} </body> </html> Modified: ofbiz/branches/multitenant20100310/framework/common/webcommon/login.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/multitenant20100310/framework/common/webcommon/login.ftl?rev=926987&r1=926986&r2=926987&view=diff ============================================================================== --- ofbiz/branches/multitenant20100310/framework/common/webcommon/login.ftl (original) +++ ofbiz/branches/multitenant20100310/framework/common/webcommon/login.ftl Wed Mar 24 09:23:07 2010 @@ -52,7 +52,7 @@ under the License. </tr> </table> <input type="hidden" name="JavaScriptEnabled" value="N"/> - <br/> + <br /> <a href="<@ofbizUrl>forgotPassword</@ofbizUrl>">${uiLabelMap.CommonForgotYourPassword}?</a> </form> </div> Modified: ofbiz/branches/multitenant20100310/framework/common/webcommon/portal/editPortalPage.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/multitenant20100310/framework/common/webcommon/portal/editPortalPage.ftl?rev=926987&r1=926986&r2=926987&view=diff ============================================================================== --- ofbiz/branches/multitenant20100310/framework/common/webcommon/portal/editPortalPage.ftl (original) +++ ofbiz/branches/multitenant20100310/framework/common/webcommon/portal/editPortalPage.ftl Wed Mar 24 09:23:07 2010 @@ -21,7 +21,7 @@ under the License. <tr> <#list portalPageColumnList?if_exists as portalPageColumn> <td class="manage-portal-column-toolbar" style="vertical-align: top; <#if portalPageColumn.columnWidthPercentage?has_content> width:${portalPageColumn.columnWidthPercentage}%;</#if>"> - <hr/> + <hr /> <ul> <li id="delete-column"><form method="post" action="<@ofbizUrl>deletePortalPageColumn</@ofbizUrl>" onSubmit="javascript:submitFormDisableSubmits(this)" name="delPortalPageId_${portalPageColumn_index}"><input name="portalPageId" value="${portalPage.portalPageId}" type="hidden"/><input name="columnSeqId" value="${portalPageColumn.columnSeqId}" type="hidden"/><input name="parentPortalPageId" value="${parameters.parentPortalPageId}" type="hidden"/></form><a class="buttontext" href="javascript:document.delPortalPageId_${portalPageColumn_index}.submit()">${uiLabelMap.CommonRemove}</a></li> <li id="add-portlet"><form method="post" action="<@ofbizUrl>AddPortlet</@ofbizUrl>" onSubmit="javascript:submitFormDisableSubmits(this)" name="addPortlet_${portalPageColumn_index}"><input name="portalPageId" value="${portalPage.portalPageId}" type="hidden"/><input name="columnSeqId" value="${portalPageColumn.columnSeqId}" type="hidden"/><input name="parentPortalPageId" value="${parameters.parentPortalPageId}" type="hidden"/></form><a class="buttontext" href="javascript:document.addPortlet_${portalPageColumn_index}.submit()">${uiLabelMap.CommonAddAPortlet}</a></li> Modified: ofbiz/branches/multitenant20100310/framework/common/webcommon/viewBlocked.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/multitenant20100310/framework/common/webcommon/viewBlocked.ftl?rev=926987&r1=926986&r2=926987&view=diff ============================================================================== --- ofbiz/branches/multitenant20100310/framework/common/webcommon/viewBlocked.ftl (original) +++ ofbiz/branches/multitenant20100310/framework/common/webcommon/viewBlocked.ftl Wed Mar 24 09:23:07 2010 @@ -24,7 +24,7 @@ under the License. </div> <div class="screenlet-body"> ${errorMessage?if_exists} - <br/> + <br /> </div> </div> </center> Modified: ofbiz/branches/multitenant20100310/framework/common/widget/CommonMenus.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/multitenant20100310/framework/common/widget/CommonMenus.xml?rev=926987&r1=926986&r2=926987&view=diff ============================================================================== --- ofbiz/branches/multitenant20100310/framework/common/widget/CommonMenus.xml (original) +++ ofbiz/branches/multitenant20100310/framework/common/widget/CommonMenus.xml Wed Mar 24 09:23:07 2010 @@ -29,4 +29,6 @@ under the License. <menu name="CommonTabBarMenu" selected-menuitem-context-field-name="tabButtonItem" type="simple" menu-container-style="button-bar tab-bar" default-selected-style="selected"/> + + <menu name="CommonButtonBarMenu" type="simple" menu-container-style="button-bar" default-widget-style="buttontext"/> </menus> Modified: ofbiz/branches/multitenant20100310/framework/common/widget/PortalPageScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/multitenant20100310/framework/common/widget/PortalPageScreens.xml?rev=926987&r1=926986&r2=926987&view=diff ============================================================================== --- ofbiz/branches/multitenant20100310/framework/common/widget/PortalPageScreens.xml (original) +++ ofbiz/branches/multitenant20100310/framework/common/widget/PortalPageScreens.xml Wed Mar 24 09:23:07 2010 @@ -21,29 +21,45 @@ under the License. <screens xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-screen.xsd"> - <screen name="showPortletDecorator"> + <screen name="showPortlet"> <section> <actions> - <set field="headerItem" from-field="parameters.portletId"/> + <set field="headerItem" from-field="parameters.portletId" /> </actions> <widgets> + <section> + <actions> + <entity-one entity-name="PortalPortlet" value-field="portlet" /> + </actions> + <widgets> + <!-- + label text=" id: ${parameters.portalPortletId} location: + ${portlet.screenLocation} screen: ${portlet.screenName}"></label + --> + <platform-specific> + <html> + <html-template + location="component://common/webcommon/portal/showPortlet.ftl" /> + </html> + </platform-specific> + </widgets> + </section> + </widgets> + </section> + </screen> + <screen name="showPortletMainDecorator"> + <section> + <widgets> <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}"> <decorator-section name="body"> - <section> - <actions> - <entity-one entity-name="PortalPortlet" value-field="portlet"/> - </actions> - <widgets> - <platform-specific><html><html-template location="component://common/webcommon/portal/showPortlet.ftl"/></html></platform-specific> - </widgets> - </section> + <include-screen name="showPortlet"/> </decorator-section> </decorator-screen> </widgets> </section> </screen> - <screen name="showPortlet"> + <screen name="showPortletSimpleDecorator"> <section> <actions> <set field="headerItem" from-field="parameters.portletId"/> @@ -51,14 +67,7 @@ under the License. <widgets> <decorator-screen name="SimpleDecorator" location="component://common/widget/CommonScreens.xml"> <decorator-section name="body"> - <section> - <actions> - <entity-one entity-name="PortalPortlet" value-field="portlet"/> - </actions> - <widgets> - <platform-specific><html><html-template location="component://common/webcommon/portal/showPortlet.ftl"/></html></platform-specific> - </widgets> - </section> + <include-screen name="showPortlet"/> </decorator-section> </decorator-screen> </widgets> @@ -75,13 +84,10 @@ under the License. <widgets> <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}"> <decorator-section name="body"> - <section> - <widgets> - <container id="portalContainerId"> - <include-screen name="PortalPageScreen" location="component://common/widget/CommonScreens.xml"/> - </container> - </widgets> - </section> + <!-- label text=" id: ${parameters.portalPortletId} location: ${portlet.screenLocation} screen: ${portlet.screenName}"></label--> + <container id="portalContainerId"> + <include-screen name="PortalPageScreen" location="component://common/widget/CommonScreens.xml"/> + </container> </decorator-section> </decorator-screen> </widgets> |
Free forum by Nabble | Edit this page |