IDEMPIERE-3239 4.1 cleanup
This commit is contained in:
parent
7b3feb61b1
commit
bc1da867ef
|
@ -1,8 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry exported="true" kind="lib" path="batik-ext.jar"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
|
@ -1,28 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>org.w3c.dom.fragment</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.ManifestBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.SchemaBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.pde.PluginNature</nature>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
|
@ -1,3 +0,0 @@
|
|||
eclipse.preferences.version=1
|
||||
pluginProject.extensions=false
|
||||
resolve.requirebundle=false
|
|
@ -1,12 +0,0 @@
|
|||
Manifest-Version: 1.0
|
||||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: W3c DOM Fragment
|
||||
Bundle-SymbolicName: org.w3c.dom.fragment
|
||||
Bundle-Version: 3.0.0.qualifier
|
||||
Fragment-Host: system.bundle; extension:=framework
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
|
||||
Bundle-ClassPath: batik-ext.jar,
|
||||
.
|
||||
Export-Package: org.w3c.dom,
|
||||
org.w3c.dom.events;version="3.0.0"
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
<cspecExtension xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:bc="http://www.eclipse.org/buckminster/Common-1.0" xmlns="http://www.eclipse.org/buckminster/CSpec-1.0"
|
||||
xmlns:cs="http://www.eclipse.org/buckminster/CSpec-1.0">
|
||||
<actions>
|
||||
<!-- public action with ant actor to do the actual copying -->
|
||||
<cs:public name="fetch.dependency.jars" actor="ant">
|
||||
<cs:actorProperties>
|
||||
<cs:property key="buildFile" value="copyjars.xml" />
|
||||
<cs:property key="targets" value="copy" />
|
||||
</cs:actorProperties>
|
||||
</cs:public>
|
||||
</actions>
|
||||
<groups>
|
||||
<!-- buckminster.prebind the prebind group will be executed during materialization -->
|
||||
<cs:private name="buckminster.postbind">
|
||||
<cs:attribute name="fetch.dependency.jars" alias="action.requirements" />
|
||||
</cs:private>
|
||||
</groups>
|
||||
</cspecExtension>
|
|
@ -1,5 +0,0 @@
|
|||
source.. = src/
|
||||
output.. = bin/
|
||||
bin.includes = META-INF/,\
|
||||
.,\
|
||||
batik-ext.jar
|
|
@ -1,5 +0,0 @@
|
|||
<project name="zklibrary" basedir="." default="copy">
|
||||
<target name="copy">
|
||||
<get src="${url.maven2.lib}/maven2/org/apache/xmlgraphics/batik-ext/1.7/batik-ext-1.7.jar" dest="batik-ext.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
</target>
|
||||
</project>
|
|
@ -1,23 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry exported="true" kind="lib" path="lib/junit.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/calendar.jar" sourcepath="lib/src/calendar-sources.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/ckez.jar" sourcepath="lib/src/ckez-sources.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/commons-fileupload.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/commons-io.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/gmapsz.jar" sourcepath="lib/src/gmapsz-sources.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/timelinez.jar" sourcepath="lib/src/timelinez-sources.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/timeplotz.jar" sourcepath="lib/src/timeplotz-sources.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/zcommon.jar" sourcepath="lib/src/zcommon-sources.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/zel.jar" sourcepath="lib/src/zel-sources.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/zhtml.jar" sourcepath="lib/src/zhtml-sources.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/zk.jar" sourcepath="lib/src/zk-sources.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/zkbind.jar" sourcepath="lib/src/zkbind-sources.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/zkplus.jar" sourcepath="lib/src/zkplus-sources.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/zul.jar" sourcepath="lib/src/zul-sources.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/zweb.jar" sourcepath="lib/src/zweb-sources.jar"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
|
@ -1,33 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>org.zkoss.zk.library</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.ManifestBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.SchemaBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.ds.core.builder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.pde.PluginNature</nature>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
|
@ -1,7 +0,0 @@
|
|||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
|
||||
org.eclipse.jdt.core.compiler.compliance=1.7
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.source=1.7
|
|
@ -1,4 +0,0 @@
|
|||
#Wed Feb 15 15:47:05 MYT 2012
|
||||
eclipse.preferences.version=1
|
||||
pluginProject.extensions=false
|
||||
resolve.requirebundle=false
|
|
@ -1,514 +0,0 @@
|
|||
Manifest-Version: 1.0
|
||||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: iDempiere Zk Library
|
||||
Bundle-SymbolicName: org.zkoss.zk.library
|
||||
Bundle-Version: 7.0.7.qualifier
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
|
||||
Import-Package: bsh,
|
||||
bsh.classpath,
|
||||
bsh.collection,
|
||||
bsh.commands,
|
||||
bsh.engine,
|
||||
bsh.org.objectweb.asm,
|
||||
bsh.reflect,
|
||||
bsh.servlet,
|
||||
bsh.util,
|
||||
groovy.inspect,
|
||||
groovy.inspect.swingui,
|
||||
groovy.io,
|
||||
groovy.lang,
|
||||
groovy.mock.interceptor,
|
||||
groovy.model,
|
||||
groovy.security,
|
||||
groovy.servlet,
|
||||
groovy.sql,
|
||||
groovy.swing,
|
||||
groovy.swing.binding,
|
||||
groovy.swing.factory,
|
||||
groovy.swing.impl,
|
||||
groovy.text,
|
||||
groovy.time,
|
||||
groovy.ui,
|
||||
groovy.ui.text,
|
||||
groovy.ui.view,
|
||||
groovy.util,
|
||||
groovy.util.slurpersupport,
|
||||
groovy.xml,
|
||||
groovy.xml.dom,
|
||||
groovy.xml.streamingmarkupsupport,
|
||||
groovyjarjarantlr,
|
||||
groovyjarjarantlr.ASdebug,
|
||||
groovyjarjarantlr.actions.cpp,
|
||||
groovyjarjarantlr.actions.csharp,
|
||||
groovyjarjarantlr.actions.java,
|
||||
groovyjarjarantlr.actions.python,
|
||||
groovyjarjarantlr.build,
|
||||
groovyjarjarantlr.collections,
|
||||
groovyjarjarantlr.collections.impl,
|
||||
groovyjarjarantlr.debug,
|
||||
groovyjarjarantlr.debug.misc,
|
||||
groovyjarjarantlr.preprocessor,
|
||||
groovyjarjarasm.asm,
|
||||
groovyjarjarasm.asm.signature,
|
||||
groovyjarjarasm.asm.tree,
|
||||
groovyjarjarcommonscli,
|
||||
javax.servlet;version="3.0.0",
|
||||
javax.servlet.annotation;version="3.0.0",
|
||||
javax.servlet.descriptor;version="3.0.0",
|
||||
javax.servlet.http;version="3.0.0",
|
||||
javax.servlet.jsp;version="2.2.0",
|
||||
javax.servlet.jsp.el;version="2.2.0",
|
||||
javax.servlet.jsp.jstl.core;version="1.2.0",
|
||||
javax.servlet.jsp.jstl.fmt;version="1.2.0",
|
||||
javax.servlet.jsp.jstl.sql;version="1.2.0",
|
||||
javax.servlet.jsp.jstl.tlv;version="1.2.0",
|
||||
javax.servlet.jsp.resources;version="2.2.0",
|
||||
javax.servlet.jsp.tagext;version="2.2.0",
|
||||
javax.servlet.resources;version="3.0.0",
|
||||
net.sf.cglib.asm;version="3.1.0",
|
||||
net.sf.cglib.asm.signature;version="3.1.0",
|
||||
net.sf.cglib.beans;version="3.1.0",
|
||||
net.sf.cglib.core;version="3.1.0",
|
||||
net.sf.cglib.proxy;version="3.1.0",
|
||||
net.sf.cglib.reflect;version="3.1.0",
|
||||
net.sf.cglib.transform;version="3.1.0",
|
||||
net.sf.cglib.transform.impl;version="3.1.0",
|
||||
net.sf.cglib.util;version="3.1.0",
|
||||
org.apache.html.dom;version="2.9.0",
|
||||
org.apache.wml;version="2.9.0",
|
||||
org.apache.wml.dom;version="2.9.0",
|
||||
org.apache.xerces.dom;version="2.9.0",
|
||||
org.apache.xerces.dom.events;version="2.9.0",
|
||||
org.apache.xerces.dom3.as;version="2.9.0",
|
||||
org.apache.xerces.impl;version="2.9.0",
|
||||
org.apache.xerces.impl.dtd;version="2.9.0",
|
||||
org.apache.xerces.impl.dtd.models;version="2.9.0",
|
||||
org.apache.xerces.impl.dv;version="2.9.0",
|
||||
org.apache.xerces.impl.dv.dtd;version="2.9.0",
|
||||
org.apache.xerces.impl.dv.util;version="2.9.0",
|
||||
org.apache.xerces.impl.dv.xs;version="2.9.0",
|
||||
org.apache.xerces.impl.io;version="2.9.0",
|
||||
org.apache.xerces.impl.msg;version="2.9.0",
|
||||
org.apache.xerces.impl.validation;version="2.9.0",
|
||||
org.apache.xerces.impl.xpath;version="2.9.0",
|
||||
org.apache.xerces.impl.xpath.regex;version="2.9.0",
|
||||
org.apache.xerces.impl.xs;version="2.9.0",
|
||||
org.apache.xerces.impl.xs.identity;version="2.9.0",
|
||||
org.apache.xerces.impl.xs.models;version="2.9.0",
|
||||
org.apache.xerces.impl.xs.opti;version="2.9.0",
|
||||
org.apache.xerces.impl.xs.traversers;version="2.9.0",
|
||||
org.apache.xerces.impl.xs.util;version="2.9.0",
|
||||
org.apache.xerces.jaxp;version="2.9.0",
|
||||
org.apache.xerces.jaxp.datatype;version="2.9.0",
|
||||
org.apache.xerces.jaxp.validation;version="2.9.0",
|
||||
org.apache.xerces.parsers;version="2.9.0",
|
||||
org.apache.xerces.util;version="2.9.0",
|
||||
org.apache.xerces.xinclude;version="2.9.0",
|
||||
org.apache.xerces.xni;version="2.9.0",
|
||||
org.apache.xerces.xni.grammars;version="2.9.0",
|
||||
org.apache.xerces.xni.parser;version="2.9.0",
|
||||
org.apache.xerces.xpointer;version="2.9.0",
|
||||
org.apache.xerces.xs;version="2.9.0",
|
||||
org.apache.xerces.xs.datatypes;version="2.9.0",
|
||||
org.apache.xml.serialize;version="2.9.0",
|
||||
org.codehaus.groovy,
|
||||
org.codehaus.groovy.ant,
|
||||
org.codehaus.groovy.antlr,
|
||||
org.codehaus.groovy.antlr.java,
|
||||
org.codehaus.groovy.antlr.parser,
|
||||
org.codehaus.groovy.antlr.treewalker,
|
||||
org.codehaus.groovy.ast,
|
||||
org.codehaus.groovy.ast.expr,
|
||||
org.codehaus.groovy.ast.stmt,
|
||||
org.codehaus.groovy.binding,
|
||||
org.codehaus.groovy.bsf,
|
||||
org.codehaus.groovy.classgen,
|
||||
org.codehaus.groovy.control,
|
||||
org.codehaus.groovy.control.io,
|
||||
org.codehaus.groovy.control.messages,
|
||||
org.codehaus.groovy.groovydoc,
|
||||
org.codehaus.groovy.reflection,
|
||||
org.codehaus.groovy.runtime,
|
||||
org.codehaus.groovy.runtime.metaclass,
|
||||
org.codehaus.groovy.runtime.typehandling,
|
||||
org.codehaus.groovy.runtime.wrappers,
|
||||
org.codehaus.groovy.syntax,
|
||||
org.codehaus.groovy.tools,
|
||||
org.codehaus.groovy.tools.groovydoc,
|
||||
org.codehaus.groovy.tools.javac,
|
||||
org.codehaus.groovy.tools.shell,
|
||||
org.codehaus.groovy.tools.shell.commands,
|
||||
org.codehaus.groovy.tools.shell.util,
|
||||
org.codehaus.groovy.tools.xml,
|
||||
org.codehaus.groovy.vmplugin,
|
||||
org.codehaus.groovy.vmplugin.v4,
|
||||
org.codehaus.groovy.vmplugin.v5,
|
||||
org.objectweb.asm;version="5.0.1",
|
||||
org.objectweb.asm.commons;version="5.0.1",
|
||||
org.objectweb.asm.signature;version="5.0.1",
|
||||
org.objectweb.asm.tree;version="5.0.1",
|
||||
org.osgi.framework;version="1.3.0",
|
||||
org.osgi.service.component;version="1.1.0",
|
||||
org.slf4j;version="1.6.1",
|
||||
org.slf4j.helpers;version="1.6.1",
|
||||
org.slf4j.spi;version="1.6.1"
|
||||
Bundle-ClassPath: .,
|
||||
lib/calendar.jar,
|
||||
lib/ckez.jar,
|
||||
lib/commons-fileupload.jar,
|
||||
lib/commons-io.jar,
|
||||
lib/gmapsz.jar,
|
||||
lib/timelinez.jar,
|
||||
lib/timeplotz.jar,
|
||||
lib/zcommon.jar,
|
||||
lib/zel.jar,
|
||||
lib/zhtml.jar,
|
||||
lib/zk.jar,
|
||||
lib/zkbind.jar,
|
||||
lib/zkplus.jar,
|
||||
lib/zul.jar,
|
||||
lib/zweb.jar,
|
||||
lib/junit.jar
|
||||
Export-Package: junit.extensions,
|
||||
junit.framework,
|
||||
junit.runner,
|
||||
junit.textui,
|
||||
metainfo.mesg,
|
||||
metainfo.org.zkoss.util.media,
|
||||
metainfo.tld,
|
||||
metainfo.xel,
|
||||
metainfo.xml,
|
||||
metainfo.zk,
|
||||
org.apache.commons.fileupload;version="1.2.2",
|
||||
org.apache.commons.fileupload.disk;version="1.2.2",
|
||||
org.apache.commons.fileupload.portlet;version="1.2.2",
|
||||
org.apache.commons.fileupload.servlet;version="1.2.2",
|
||||
org.apache.commons.fileupload.util;version="1.2.2",
|
||||
org.apache.commons.io;version="2.1.0",
|
||||
org.apache.commons.io.comparator,
|
||||
org.apache.commons.io.filefilter;version="2.1.0",
|
||||
org.apache.commons.io.input;version="2.1.0",
|
||||
org.apache.commons.io.monitor,
|
||||
org.apache.commons.io.output;version="2.1.0",
|
||||
org.junit,
|
||||
org.junit.internal,
|
||||
org.junit.internal.requests,
|
||||
org.junit.internal.runners,
|
||||
org.junit.runner,
|
||||
org.junit.runner.manipulation,
|
||||
org.junit.runner.notification,
|
||||
org.junit.runners,
|
||||
org.zkforge.ckez,
|
||||
org.zkforge.json.simple,
|
||||
org.zkforge.json.simple.parser,
|
||||
org.zkforge.timeline,
|
||||
org.zkforge.timeline.data,
|
||||
org.zkforge.timeline.decorator,
|
||||
org.zkforge.timeline.event,
|
||||
org.zkforge.timeline.util,
|
||||
org.zkforge.timeplot,
|
||||
org.zkforge.timeplot.data,
|
||||
org.zkforge.timeplot.event,
|
||||
org.zkforge.timeplot.geometry,
|
||||
org.zkforge.timeplot.operator,
|
||||
org.zkoss,
|
||||
org.zkoss.bind,
|
||||
org.zkoss.bind.annotation,
|
||||
org.zkoss.bind.converter,
|
||||
org.zkoss.bind.converter.sys,
|
||||
org.zkoss.bind.impl,
|
||||
org.zkoss.bind.sys,
|
||||
org.zkoss.bind.sys.debugger,
|
||||
org.zkoss.bind.sys.debugger.impl,
|
||||
org.zkoss.bind.sys.debugger.impl.info,
|
||||
org.zkoss.bind.sys.tracker,
|
||||
org.zkoss.bind.tracker.impl,
|
||||
org.zkoss.bind.validator,
|
||||
org.zkoss.bind.xel,
|
||||
org.zkoss.bind.xel.zel,
|
||||
org.zkoss.calendar,
|
||||
org.zkoss.calendar.api,
|
||||
org.zkoss.calendar.event,
|
||||
org.zkoss.calendar.impl,
|
||||
org.zkoss.fsm,
|
||||
org.zkoss.gmaps,
|
||||
org.zkoss.gmaps.event,
|
||||
org.zkoss.html,
|
||||
org.zkoss.idom,
|
||||
org.zkoss.idom.impl,
|
||||
org.zkoss.idom.input,
|
||||
org.zkoss.idom.transform,
|
||||
org.zkoss.idom.util,
|
||||
org.zkoss.image,
|
||||
org.zkoss.image.encoder,
|
||||
org.zkoss.io,
|
||||
org.zkoss.json,
|
||||
org.zkoss.json.parser,
|
||||
org.zkoss.lang,
|
||||
org.zkoss.lang.reflect,
|
||||
org.zkoss.math,
|
||||
org.zkoss.mesg,
|
||||
org.zkoss.sound,
|
||||
org.zkoss.text,
|
||||
org.zkoss.util,
|
||||
org.zkoss.util.logging,
|
||||
org.zkoss.util.media,
|
||||
org.zkoss.util.resource,
|
||||
org.zkoss.util.resource.impl,
|
||||
org.zkoss.web,
|
||||
org.zkoss.web.fn,
|
||||
org.zkoss.web.init,
|
||||
org.zkoss.web.mesg,
|
||||
org.zkoss.web.portlet,
|
||||
org.zkoss.web.servlet,
|
||||
org.zkoss.web.servlet.dsp,
|
||||
org.zkoss.web.servlet.dsp.action,
|
||||
org.zkoss.web.servlet.dsp.action.html,
|
||||
org.zkoss.web.servlet.dsp.impl,
|
||||
org.zkoss.web.servlet.http,
|
||||
org.zkoss.web.servlet.xel,
|
||||
org.zkoss.web.theme,
|
||||
org.zkoss.web.util.resource,
|
||||
org.zkoss.xel,
|
||||
org.zkoss.xel.el,
|
||||
org.zkoss.xel.fn,
|
||||
org.zkoss.xel.taglib,
|
||||
org.zkoss.xel.util,
|
||||
org.zkoss.xel.zel,
|
||||
org.zkoss.xml,
|
||||
org.zkoss.zel,
|
||||
org.zkoss.zel.impl,
|
||||
org.zkoss.zel.impl.lang,
|
||||
org.zkoss.zel.impl.parser,
|
||||
org.zkoss.zel.impl.util,
|
||||
org.zkoss.zhtml,
|
||||
org.zkoss.zhtml.impl,
|
||||
org.zkoss.zk,
|
||||
org.zkoss.zk.au,
|
||||
org.zkoss.zk.au.http,
|
||||
org.zkoss.zk.au.out,
|
||||
org.zkoss.zk.device,
|
||||
org.zkoss.zk.fn,
|
||||
org.zkoss.zk.library,
|
||||
org.zkoss.zk.mesg,
|
||||
org.zkoss.zk.scripting,
|
||||
org.zkoss.zk.scripting.bsh,
|
||||
org.zkoss.zk.scripting.groovy,
|
||||
org.zkoss.zk.scripting.jruby,
|
||||
org.zkoss.zk.scripting.jython,
|
||||
org.zkoss.zk.scripting.rhino,
|
||||
org.zkoss.zk.scripting.util,
|
||||
org.zkoss.zk.ui,
|
||||
org.zkoss.zk.ui.annotation,
|
||||
org.zkoss.zk.ui.event,
|
||||
org.zkoss.zk.ui.event.impl,
|
||||
org.zkoss.zk.ui.ext,
|
||||
org.zkoss.zk.ui.ext.render,
|
||||
org.zkoss.zk.ui.http,
|
||||
org.zkoss.zk.ui.impl,
|
||||
org.zkoss.zk.ui.metainfo,
|
||||
org.zkoss.zk.ui.metainfo.impl,
|
||||
org.zkoss.zk.ui.select,
|
||||
org.zkoss.zk.ui.select.annotation,
|
||||
org.zkoss.zk.ui.select.impl,
|
||||
org.zkoss.zk.ui.sys,
|
||||
org.zkoss.zk.ui.util,
|
||||
org.zkoss.zk.xel,
|
||||
org.zkoss.zk.xel.impl,
|
||||
org.zkoss.zkplus,
|
||||
org.zkoss.zkplus.acegi,
|
||||
org.zkoss.zkplus.cdi,
|
||||
org.zkoss.zkplus.cluster,
|
||||
org.zkoss.zkplus.databind,
|
||||
org.zkoss.zkplus.embed,
|
||||
org.zkoss.zkplus.hibernate,
|
||||
org.zkoss.zkplus.jndi,
|
||||
org.zkoss.zkplus.jpa,
|
||||
org.zkoss.zkplus.liferay,
|
||||
org.zkoss.zkplus.seasar,
|
||||
org.zkoss.zkplus.spring,
|
||||
org.zkoss.zkplus.theme,
|
||||
org.zkoss.zkplus.util,
|
||||
org.zkoss.zul,
|
||||
org.zkoss.zul.event,
|
||||
org.zkoss.zul.ext,
|
||||
org.zkoss.zul.impl,
|
||||
org.zkoss.zul.mesg,
|
||||
org.zkoss.zul.theme,
|
||||
web,
|
||||
web.aud,
|
||||
web.ckez.html,
|
||||
web.ckez.img,
|
||||
web.dsp.action.html,
|
||||
web.html,
|
||||
web.img,
|
||||
web.js.calendar,
|
||||
web.js.calendar.css,
|
||||
web.js.calendar.img,
|
||||
web.js.calendar.lang,
|
||||
web.js.calendar.mold,
|
||||
web.js.ckez,
|
||||
web.js.ckez.ext.CKeditor,
|
||||
web.js.ckez.ext.CKeditor.adapters,
|
||||
web.js.ckez.ext.CKeditor.lang,
|
||||
web.js.ckez.ext.CKeditor.plugins,
|
||||
web.js.ckez.ext.CKeditor.plugins.a11yhelp.dialogs,
|
||||
web.js.ckez.ext.CKeditor.plugins.a11yhelp.dialogs.lang,
|
||||
web.js.ckez.ext.CKeditor.plugins.about.dialogs,
|
||||
web.js.ckez.ext.CKeditor.plugins.clipboard.dialogs,
|
||||
web.js.ckez.ext.CKeditor.plugins.colordialog.dialogs,
|
||||
web.js.ckez.ext.CKeditor.plugins.dialog,
|
||||
web.js.ckez.ext.CKeditor.plugins.div.dialogs,
|
||||
web.js.ckez.ext.CKeditor.plugins.find.dialogs,
|
||||
web.js.ckez.ext.CKeditor.plugins.flash.dialogs,
|
||||
web.js.ckez.ext.CKeditor.plugins.flash.images,
|
||||
web.js.ckez.ext.CKeditor.plugins.forms.dialogs,
|
||||
web.js.ckez.ext.CKeditor.plugins.forms.images,
|
||||
web.js.ckez.ext.CKeditor.plugins.iframe.dialogs,
|
||||
web.js.ckez.ext.CKeditor.plugins.iframe.images,
|
||||
web.js.ckez.ext.CKeditor.plugins.image.dialogs,
|
||||
web.js.ckez.ext.CKeditor.plugins.image.images,
|
||||
web.js.ckez.ext.CKeditor.plugins.link.dialogs,
|
||||
web.js.ckez.ext.CKeditor.plugins.link.images,
|
||||
web.js.ckez.ext.CKeditor.plugins.liststyle.dialogs,
|
||||
web.js.ckez.ext.CKeditor.plugins.magicline.images,
|
||||
web.js.ckez.ext.CKeditor.plugins.pagebreak.images,
|
||||
web.js.ckez.ext.CKeditor.plugins.pastefromword.filter,
|
||||
web.js.ckez.ext.CKeditor.plugins.preview,
|
||||
web.js.ckez.ext.CKeditor.plugins.scayt,
|
||||
web.js.ckez.ext.CKeditor.plugins.scayt.dialogs,
|
||||
web.js.ckez.ext.CKeditor.plugins.showblocks.images,
|
||||
web.js.ckez.ext.CKeditor.plugins.smiley.dialogs,
|
||||
web.js.ckez.ext.CKeditor.plugins.smiley.images,
|
||||
web.js.ckez.ext.CKeditor.plugins.specialchar.dialogs,
|
||||
web.js.ckez.ext.CKeditor.plugins.specialchar.dialogs.lang,
|
||||
web.js.ckez.ext.CKeditor.plugins.table.dialogs,
|
||||
web.js.ckez.ext.CKeditor.plugins.tabletools.dialogs,
|
||||
web.js.ckez.ext.CKeditor.plugins.templates.dialogs,
|
||||
web.js.ckez.ext.CKeditor.plugins.templates.templates,
|
||||
web.js.ckez.ext.CKeditor.plugins.templates.templates.images,
|
||||
web.js.ckez.ext.CKeditor.plugins.wsc,
|
||||
web.js.ckez.ext.CKeditor.plugins.wsc.dialogs,
|
||||
web.js.ckez.ext.CKeditor.skins.moono,
|
||||
web.js.ckez.ext.CKeditor.skins.moono.images,
|
||||
web.js.gmaps,
|
||||
web.js.gmaps.css,
|
||||
web.js.gmaps.ext,
|
||||
web.js.timelinez,
|
||||
web.js.timelinez.css,
|
||||
web.js.timelinez.ext,
|
||||
web.js.timelinez.ext.timeline,
|
||||
web.js.timelinez.ext.timeline.images,
|
||||
web.js.timelinez.ext.timeline.scripts,
|
||||
web.js.timelinez.ext.timeline.scripts.ext,
|
||||
web.js.timelinez.ext.timeline.scripts.l10n.cs,
|
||||
web.js.timelinez.ext.timeline.scripts.l10n.de,
|
||||
web.js.timelinez.ext.timeline.scripts.l10n.en,
|
||||
web.js.timelinez.ext.timeline.scripts.l10n.es,
|
||||
web.js.timelinez.ext.timeline.scripts.l10n.fr,
|
||||
web.js.timelinez.ext.timeline.scripts.l10n.it,
|
||||
web.js.timelinez.ext.timeline.scripts.l10n.nl,
|
||||
web.js.timelinez.ext.timeline.scripts.l10n.ru,
|
||||
web.js.timelinez.ext.timeline.scripts.l10n.se,
|
||||
web.js.timelinez.ext.timeline.scripts.l10n.tr,
|
||||
web.js.timelinez.ext.timeline.scripts.l10n.vi,
|
||||
web.js.timelinez.ext.timeline.scripts.l10n.zh,
|
||||
web.js.timelinez.mold,
|
||||
web.js.timeplotz,
|
||||
web.js.timeplotz.css,
|
||||
web.js.timeplotz.ext.timeplot,
|
||||
web.js.timeplotz.ext.timeplot.images,
|
||||
web.js.timeplotz.ext.timeplot.locales.en,
|
||||
web.js.timeplotz.ext.timeplot.scripts,
|
||||
web.js.timeplotz.mold,
|
||||
web.js.zhtml,
|
||||
web.js.zk,
|
||||
web.js.zk.aaas,
|
||||
web.js.zk.canvas,
|
||||
web.js.zk.cpsp,
|
||||
web.js.zk.debug,
|
||||
web.js.zk.ext,
|
||||
web.js.zk.fmt,
|
||||
web.js.zk.gapi,
|
||||
web.js.zk.lang,
|
||||
web.js.zk.wgt,
|
||||
web.js.zk.xml,
|
||||
web.js.zk.zuml,
|
||||
web.js.zul,
|
||||
web.js.zul.box,
|
||||
web.js.zul.box.css,
|
||||
web.js.zul.box.less,
|
||||
web.js.zul.box.mold,
|
||||
web.js.zul.db,
|
||||
web.js.zul.db.css,
|
||||
web.js.zul.db.less,
|
||||
web.js.zul.db.mold,
|
||||
web.js.zul.fud,
|
||||
web.js.zul.grid,
|
||||
web.js.zul.grid.css,
|
||||
web.js.zul.grid.less,
|
||||
web.js.zul.grid.mold,
|
||||
web.js.zul.inp,
|
||||
web.js.zul.inp.css,
|
||||
web.js.zul.inp.less,
|
||||
web.js.zul.inp.mold,
|
||||
web.js.zul.lang,
|
||||
web.js.zul.layout,
|
||||
web.js.zul.layout.css,
|
||||
web.js.zul.layout.less,
|
||||
web.js.zul.layout.mold,
|
||||
web.js.zul.med,
|
||||
web.js.zul.med.mold,
|
||||
web.js.zul.menu,
|
||||
web.js.zul.menu.css,
|
||||
web.js.zul.menu.less,
|
||||
web.js.zul.menu.mold,
|
||||
web.js.zul.mesh,
|
||||
web.js.zul.mesh.css,
|
||||
web.js.zul.mesh.less,
|
||||
web.js.zul.mesh.mold,
|
||||
web.js.zul.sel,
|
||||
web.js.zul.sel.css,
|
||||
web.js.zul.sel.less,
|
||||
web.js.zul.sel.mold,
|
||||
web.js.zul.tab,
|
||||
web.js.zul.tab.css,
|
||||
web.js.zul.tab.less,
|
||||
web.js.zul.tab.mold,
|
||||
web.js.zul.utl,
|
||||
web.js.zul.utl.mold,
|
||||
web.js.zul.wgt,
|
||||
web.js.zul.wgt.css,
|
||||
web.js.zul.wgt.less,
|
||||
web.js.zul.wgt.mold,
|
||||
web.js.zul.wnd,
|
||||
web.js.zul.wnd.css,
|
||||
web.js.zul.wnd.less,
|
||||
web.js.zul.wnd.mold,
|
||||
web.zk,
|
||||
web.zk.img,
|
||||
web.zk.img.debug,
|
||||
web.zul.css,
|
||||
web.zul.html,
|
||||
web.zul.img,
|
||||
web.zul.img.button,
|
||||
web.zul.img.common,
|
||||
web.zul.img.errbox,
|
||||
web.zul.img.grid,
|
||||
web.zul.img.input,
|
||||
web.zul.img.layout,
|
||||
web.zul.img.menu,
|
||||
web.zul.img.misc,
|
||||
web.zul.img.msgbox,
|
||||
web.zul.img.paging,
|
||||
web.zul.img.popup,
|
||||
web.zul.img.slider,
|
||||
web.zul.img.splt,
|
||||
web.zul.img.tab,
|
||||
web.zul.img.tree,
|
||||
web.zul.img.wnd,
|
||||
web.zul.less,
|
||||
web.zul.less.font
|
||||
Bundle-Activator: org.zkoss.zk.library.Activator
|
||||
Bundle-ActivationPolicy: lazy
|
||||
Eclipse-BuddyPolicy: registered
|
|
@ -1,26 +0,0 @@
|
|||
<cspecExtension xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:bc="http://www.eclipse.org/buckminster/Common-1.0" xmlns="http://www.eclipse.org/buckminster/CSpec-1.0"
|
||||
xmlns:cs="http://www.eclipse.org/buckminster/CSpec-1.0">
|
||||
<actions>
|
||||
<!-- public action with ant actor to do the actual copying -->
|
||||
<cs:public name="fetch.dependency.jars" actor="ant">
|
||||
<cs:actorProperties>
|
||||
<cs:property key="buildFile" value="copyjars.xml" />
|
||||
<cs:property key="targets" value="copy" />
|
||||
</cs:actorProperties>
|
||||
</cs:public>
|
||||
<cs:public name="fetch.sources.jars" actor="ant">
|
||||
<cs:actorProperties>
|
||||
<cs:property key="buildFile" value="copysources.xml" />
|
||||
<cs:property key="targets" value="copy" />
|
||||
</cs:actorProperties>
|
||||
</cs:public>
|
||||
</actions>
|
||||
<groups>
|
||||
<!-- buckminster.prebind the prebind group will be executed during materialization -->
|
||||
<cs:private name="buckminster.postbind">
|
||||
<cs:attribute name="fetch.dependency.jars" alias="action.requirements" />
|
||||
<!--<cs:attribute name="fetch.sources.jars" alias="action.requirements" />-->
|
||||
</cs:private>
|
||||
</groups>
|
||||
</cspecExtension>
|
|
@ -1,20 +0,0 @@
|
|||
output.. = bin/
|
||||
bin.includes = META-INF/,\
|
||||
.,\
|
||||
lib/calendar.jar,\
|
||||
lib/ckez.jar,\
|
||||
lib/commons-fileupload.jar,\
|
||||
lib/commons-io.jar,\
|
||||
lib/gmapsz.jar,\
|
||||
lib/timelinez.jar,\
|
||||
lib/timeplotz.jar,\
|
||||
lib/zcommon.jar,\
|
||||
lib/zel.jar,\
|
||||
lib/zhtml.jar,\
|
||||
lib/zk.jar,\
|
||||
lib/zkbind.jar,\
|
||||
lib/zkplus.jar,\
|
||||
lib/zul.jar,\
|
||||
lib/zweb.jar,\
|
||||
lib/junit.jar
|
||||
source.. = src/
|
|
@ -1,20 +0,0 @@
|
|||
<project name="zklibrary" basedir="." default="copy">
|
||||
<target name="copy">
|
||||
<get src="http://downloads.sourceforge.net/project/idempiere/binary.file/jarfile/3.1/zk.jar" dest="lib/zk.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
<get src="http://downloads.sourceforge.net/project/idempiere/binary.file/jarfile/3.1/zul.jar" dest="lib/zul.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
<get src="http://downloads.sourceforge.net/project/idempiere/binary.file/jarfile/3.1/zhtml.jar" dest="lib/zhtml.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
<get src="http://downloads.sourceforge.net/project/idempiere/binary.file/jarfile/3.1/zkplus.jar" dest="lib/zkplus.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
<get src="http://downloads.sourceforge.net/project/idempiere/binary.file/jarfile/3.1/zkbind.jar" dest="lib/zkbind.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
<get src="http://downloads.sourceforge.net/project/idempiere/binary.file/jarfile/3.1/zcommon.jar" dest="lib/zcommon.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
<get src="http://downloads.sourceforge.net/project/idempiere/binary.file/jarfile/3.1/zel.jar" dest="lib/zel.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
<get src="http://downloads.sourceforge.net/project/idempiere/binary.file/jarfile/3.1/zweb.jar" dest="lib/zweb.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
<get src="http://mavensync.zkoss.org/maven2/org/zkoss/zkforge/ckez/4.4.6.2/ckez-4.4.6.2.jar" dest="lib/ckez.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
<get src="http://mavensync.zkoss.org/maven2/org/zkoss/zkforge/gmapsz/3.0.3/gmapsz-3.0.3.jar" dest="lib/gmapsz.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
<get src="http://mavensync.zkoss.org/maven2/org/zkoss/zkforge/timelinez/2.3.1_50/timelinez-2.3.1_50.jar" dest="lib/timelinez.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
<get src="http://mavensync.zkoss.org/maven2/org/zkoss/zkforge/timeplotz/1.1_50/timeplotz-1.1_50.jar" dest="lib/timeplotz.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
<get src="http://mavensync.zkoss.org/maven2/org/zkoss/calendar/calendar/2.1.5/calendar-2.1.5.jar" dest="lib/calendar.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
<get src="http://central.maven.org/maven2/commons-fileupload/commons-fileupload/1.2.2/commons-fileupload-1.2.2.jar" dest="lib/commons-fileupload.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
<get src="http://central.maven.org/maven2/commons-io/commons-io/2.1/commons-io-2.1.jar" dest="lib/commons-io.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
<get src="http://downloads.sourceforge.net/project/idempiere/binary.file/jarfile/3.1/junit.jar" dest="lib/junit.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
</target>
|
||||
</project>
|
|
@ -1,19 +0,0 @@
|
|||
<project name="zklibrary" basedir="." default="copy">
|
||||
<target name="copy">
|
||||
<get src="http://mavensync.zkoss.org/maven2/org/zkoss/zk/zk/7.0.7.FL.20151022/zk-7.0.7.FL.20151022-sources.jar" dest="lib/src/zk-sources.jar" usetimestamp="true" verbose="true" retries="5"/>
|
||||
<get src="http://mavensync.zkoss.org/maven2/org/zkoss/zk/zul/7.0.7.FL.20151022/zul-7.0.7.FL.20151022-sources.jar" dest="lib/src/zul-sources.jar" usetimestamp="true" verbose="true" retries="5"/>
|
||||
<get src="http://mavensync.zkoss.org/maven2/org/zkoss/zk/zhtml/7.0.7.FL.20151022/zhtml-7.0.7.FL.20151022-sources.jar" dest="lib/src/zhtml-sources.jar" usetimestamp="true" verbose="true" retries="5"/>
|
||||
<get src="http://mavensync.zkoss.org/maven2/org/zkoss/zk/zkplus/7.0.7.FL.20151022/zkplus-7.0.7.FL.20151022-sources.jar" dest="lib/src/zkplus-sources.jar" usetimestamp="true" verbose="true" retries="5"/>
|
||||
<get src="http://mavensync.zkoss.org/maven2/org/zkoss/zk/zkbind/7.0.7.FL.20151022/zkbind-7.0.7.FL.20151022-sources.jar" dest="lib/src/zkbind-sources.jar" usetimestamp="true" verbose="true" retries="5"/>
|
||||
<get src="http://mavensync.zkoss.org/maven2/org/zkoss/common/zcommon/7.0.7.FL.20151022/zcommon-7.0.7.FL.20151022-sources.jar" dest="lib/src/zcommon-sources.jar" usetimestamp="true" verbose="true" retries="5"/>
|
||||
<get src="http://mavensync.zkoss.org/maven2/org/zkoss/common/zel/7.0.7.FL.20151022/zel-7.0.7.FL.20151022-sources.jar" dest="lib/src/zel-sources.jar" usetimestamp="true" verbose="true" retries="5"/>
|
||||
<get src="http://mavensync.zkoss.org/maven2/org/zkoss/common/zweb/7.0.7.FL.20151022/zweb-7.0.7.FL.20151022-sources.jar" dest="lib/src/zweb-sources.jar" usetimestamp="true" verbose="true" retries="5"/>
|
||||
<get src="http://mavensync.zkoss.org/maven2/org/zkoss/zkforge/ckez/4.4.6.2/ckez-4.4.6.2-sources.jar" dest="lib/src/ckez-sources.jar" usetimestamp="true" verbose="true" retries="5"/>
|
||||
<get src="http://mavensync.zkoss.org/maven2/org/zkoss/zkforge/gmapsz/3.0.3/gmapsz-3.0.3-sources.jar" dest="lib/src/gmapsz-sources.jar" usetimestamp="true" verbose="true" retries="5"/>
|
||||
<get src="http://mavensync.zkoss.org/maven2/org/zkoss/zkforge/timelinez/2.3.1_50/timelinez-2.3.1_50-sources.jar" dest="lib/src/timelinez-sources.jar" usetimestamp="true" verbose="true" retries="5"/>
|
||||
<get src="http://mavensync.zkoss.org/maven2/org/zkoss/zkforge/timeplotz/1.1_50/timeplotz-1.1_50-sources.jar" dest="lib/src/timeplotz-sources.jar" usetimestamp="true" verbose="true" retries="5"/>
|
||||
<get src="http://mavensync.zkoss.org/maven2/org/zkoss/calendar/calendar/2.1.5/calendar-2.1.5-sources.jar" dest="lib/src/calendar-sources.jar" usetimestamp="true" verbose="true" retries="5"/>
|
||||
<get src="http://central.maven.org/maven2/org/python/jython/2.5.3/jython-2.5.3-sources.jar" dest="lib/src/jython-sources.jar" usetimestamp="true" verbose="true" retries="5"/>
|
||||
<get src="http://central.maven.org/maven2/org/jruby/jruby-complete/1.7.15/jruby-complete-1.7.15-sources.jar" dest="lib/src/jruby-complete-sources.jar" usetimestamp="true" verbose="true" retries="5"/>
|
||||
</target>
|
||||
</project>
|
|
@ -1,207 +0,0 @@
|
|||
/* ClassLocator.java
|
||||
|
||||
Purpose:
|
||||
|
||||
Description:
|
||||
|
||||
History:
|
||||
Tue Aug 30 09:56:06 2005, Created by tomyeh
|
||||
|
||||
Copyright (C) 2005 Potix Corporation. All Rights Reserved.
|
||||
|
||||
{{IS_RIGHT
|
||||
This program is distributed under LGPL Version 2.1 in the hope that
|
||||
it will be useful, but WITHOUT ANY WARRANTY.
|
||||
}}IS_RIGHT
|
||||
*/
|
||||
package org.zkoss.util.resource;
|
||||
|
||||
import java.util.Enumeration;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.Set;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Collections;
|
||||
import java.util.Iterator;
|
||||
import java.io.InputStream;
|
||||
import java.io.IOException;
|
||||
import java.net.URL;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.zkoss.util.CollectionsX;
|
||||
import org.zkoss.zk.library.Activator;
|
||||
|
||||
import org.zkoss.idom.Document;
|
||||
import org.zkoss.idom.Element;
|
||||
import org.zkoss.idom.util.IDOMs;
|
||||
import org.zkoss.idom.input.SAXBuilder;
|
||||
|
||||
/**
|
||||
* The locator searches the current thread's context class loader,
|
||||
* and then this class's class loader.
|
||||
*
|
||||
* <p>It is important to use this locator if you want to load something
|
||||
* in other jar files.
|
||||
*
|
||||
* <p>Since this locator is used frequently, {@link Locators#getDefault}
|
||||
* is provided to return an instance of this class,
|
||||
*
|
||||
* @author tomyeh
|
||||
*/
|
||||
public class ClassLocator implements XMLResourcesLocator {
|
||||
private static final Logger log = LoggerFactory.getLogger(ClassLocator.class);
|
||||
|
||||
public ClassLocator() {
|
||||
}
|
||||
|
||||
//XMLResourcesLocator//
|
||||
public Enumeration<URL> getResources(String name) throws IOException {
|
||||
List<URL> list = null;
|
||||
name = resolveName(name);
|
||||
if (Activator.getContext() != null) {
|
||||
final Enumeration<URL> en = Activator.getContext().getBundle().getResources(name);
|
||||
if (en != null && en.hasMoreElements())
|
||||
list = Collections.list(en);
|
||||
}
|
||||
if (list == null) {
|
||||
ClassLoader cl = Thread.currentThread().getContextClassLoader();
|
||||
if (cl != null) {
|
||||
final Enumeration<URL> en = cl.getResources(name);
|
||||
if (en.hasMoreElements())
|
||||
list = Collections.list(en);
|
||||
}
|
||||
}
|
||||
if (list == null) {
|
||||
ClassLoader cl = ClassLocator.class.getClassLoader();
|
||||
if (cl != null) {
|
||||
final Enumeration<URL> en = cl.getResources(name);
|
||||
if (en.hasMoreElements())
|
||||
list = Collections.list(en);
|
||||
}
|
||||
}
|
||||
if (list == null) {
|
||||
final Enumeration<URL> en = ClassLoader.getSystemResources(name);
|
||||
list = Collections.list(en);
|
||||
}
|
||||
return Collections.enumeration(list);
|
||||
}
|
||||
public List<Resource> getDependentXMLResources(String name, String elName,
|
||||
String elDepends) throws IOException {
|
||||
final Map<String, XMLResource> rcmap = new LinkedHashMap<String, XMLResource>();
|
||||
for (Enumeration<URL> en = getResources(name); en.hasMoreElements();) {
|
||||
final URL url = en.nextElement();
|
||||
final XMLResource xr = new XMLResource(url, elName, elDepends);
|
||||
final XMLResource old = rcmap.put(xr.name, xr);
|
||||
if (old != null)
|
||||
log.warn("Replicate resource: "+xr.name
|
||||
+"\nOverwrite "+old.url+"\nwith "+xr.url);
|
||||
//it is possible if zcommon.jar is placed in both
|
||||
//WEB-INF/lib and shared/lib, i.e., appear twice in the class path
|
||||
//We overwrite because the order is the parent class loader first
|
||||
//so WEB-INF/lib is placed after
|
||||
}
|
||||
// if (rcmap.isEmpty() && log.isDebugEnabled()) log.debug("No resource is found for "+name);
|
||||
|
||||
final List<Resource> rcs = new LinkedList<Resource>(); //a list of Document
|
||||
final Set<String> resolving = new LinkedHashSet<String>();
|
||||
//a set of names used to prevent dead-loop
|
||||
while (!rcmap.isEmpty()) {
|
||||
final Iterator<XMLResource> it = rcmap.values().iterator();
|
||||
final XMLResource xr = it.next();
|
||||
it.remove();
|
||||
resolveDependency(xr, rcs, rcmap, resolving);
|
||||
assert resolving.isEmpty();
|
||||
}
|
||||
return rcs;
|
||||
}
|
||||
private static void resolveDependency(XMLResource xr,
|
||||
List<Resource> rcs, Map<String, XMLResource> rcmap, Set<String> resolving) {
|
||||
if (!resolving.add(xr.name))
|
||||
throw new IllegalStateException("Recusrive reference among "+resolving);
|
||||
|
||||
for (String nm: xr.depends) {
|
||||
final XMLResource dep = rcmap.remove(nm);
|
||||
if (dep != null) //not resolved yet
|
||||
resolveDependency(dep, rcs, rcmap, resolving); //recursively
|
||||
}
|
||||
|
||||
rcs.add(new Resource(xr.url, xr.document));
|
||||
resolving.remove(xr.name);
|
||||
|
||||
if (log.isDebugEnabled()) log.debug("Adding resolved resource: "+xr.name);
|
||||
}
|
||||
/** Info used with getDependentXMLResource. */
|
||||
private static class XMLResource {
|
||||
private final String name;
|
||||
private final URL url;
|
||||
private final Document document;
|
||||
private final List<String> depends;
|
||||
|
||||
private XMLResource(URL url, String elName, String elDepends)
|
||||
throws IOException{
|
||||
if (log.isDebugEnabled()) log.debug("Loading "+url);
|
||||
try {
|
||||
this.document = new SAXBuilder(false, false, true).build(url);
|
||||
} catch (Exception ex) {
|
||||
if (ex instanceof IOException) throw (IOException)ex;
|
||||
if (ex instanceof RuntimeException) throw (RuntimeException)ex;
|
||||
final IOException ioex = new IOException("Unable to load "+url);
|
||||
ioex.initCause(ex);
|
||||
throw ioex;
|
||||
}
|
||||
|
||||
this.url = url;
|
||||
final Element root = this.document.getRootElement();
|
||||
this.name = IDOMs.getRequiredElementValue(root, elName);
|
||||
final String deps = root.getElementValue(elDepends, true);
|
||||
if (deps == null || deps.length() == 0) {
|
||||
this.depends = Collections.emptyList();
|
||||
} else {
|
||||
this.depends = new LinkedList<String>();
|
||||
CollectionsX.parse(this.depends, deps, ',');
|
||||
if (log.isTraceEnabled()) log.trace(this.name+" depends on "+this.depends);
|
||||
}
|
||||
}
|
||||
public String toString() {
|
||||
return "["+name+": "+url+" depends on "+depends+']';
|
||||
}
|
||||
};
|
||||
|
||||
//-- Locator --//
|
||||
/** Always returns null.
|
||||
*/
|
||||
public String getDirectory() {
|
||||
return null;
|
||||
}
|
||||
public URL getResource(String name) {
|
||||
if (Activator.getContext() != null) {
|
||||
final URL url = Activator.getContext().getBundle().getResource(name);
|
||||
if (url != null) return url;
|
||||
}
|
||||
final ClassLoader cl = Thread.currentThread().getContextClassLoader();
|
||||
final URL url = cl != null ? cl.getResource(resolveName(name)): null;
|
||||
return url != null ? url: ClassLocator.class.getResource(name);
|
||||
}
|
||||
public InputStream getResourceAsStream(String name) {
|
||||
final ClassLoader cl = Thread.currentThread().getContextClassLoader();
|
||||
final InputStream is =
|
||||
cl != null ? cl.getResourceAsStream(resolveName(name)): null;
|
||||
return is != null ? is: ClassLocator.class.getResourceAsStream(name);
|
||||
}
|
||||
private static String resolveName(String name) {
|
||||
return name != null && name.startsWith("/") ?
|
||||
name.substring(1): name;
|
||||
}
|
||||
|
||||
//-- Object --//
|
||||
public int hashCode() {
|
||||
return 1123;
|
||||
}
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
return o instanceof ClassLocator;
|
||||
}
|
||||
}
|
|
@ -1,157 +0,0 @@
|
|||
/* ResourceCaches.java
|
||||
|
||||
Purpose:
|
||||
|
||||
Description:
|
||||
|
||||
History:
|
||||
Tue Aug 30 18:31:05 2005, Created by tomyeh
|
||||
|
||||
Copyright (C) 2005 Potix Corporation. All Rights Reserved.
|
||||
|
||||
{{IS_RIGHT
|
||||
This program is distributed under LGPL Version 2.1 in the hope that
|
||||
it will be useful, but WITHOUT ANY WARRANTY.
|
||||
}}IS_RIGHT
|
||||
*/
|
||||
package org.zkoss.web.util.resource;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.net.URL;
|
||||
|
||||
import javax.servlet.ServletContext;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.zkoss.lang.SystemException;
|
||||
import org.zkoss.web.servlet.Servlets;
|
||||
|
||||
/**
|
||||
* Utilities to load (and parse) the Servlet resource.
|
||||
* Notice that {@link ResourceCache} and {@link ResourceLoader}
|
||||
* must be used rather than
|
||||
* {@link org.zkoss.util.resource.ResourceCache}
|
||||
* and {@link org.zkoss.util.resource.Loader}.
|
||||
*
|
||||
* <p>Usage:
|
||||
* <ol>
|
||||
* <li>Implements a loader by extending from {@link ResourceLoader}.</li>
|
||||
* <li>Creates a resource cache ({@link ResourceCache})
|
||||
* by use of the loader in the previous step.</li>
|
||||
* <li>Invoke {@link #get} to load the resource.</li>
|
||||
* </ol>
|
||||
*
|
||||
* @author tomyeh
|
||||
*/
|
||||
public class ResourceCaches {
|
||||
private static final Logger log = LoggerFactory.getLogger(ResourceCaches.class);
|
||||
|
||||
/** Loads, parses and returns the resource of the specified URI,
|
||||
* or null if not found. The parser is defined by the loader defined
|
||||
* in {@link ResourceCache}.
|
||||
*
|
||||
* @param cache the resource cache.
|
||||
* Note: its loader must extend from {@link ResourceLoader}.
|
||||
* @param path the URI path
|
||||
* @param extra the extra parameter that will be passed to
|
||||
* {@link ResourceLoader#parse(String,File,Object)} and
|
||||
* {@link ResourceLoader#parse(String,URL,Object)}
|
||||
*/
|
||||
public static final <V>
|
||||
V get(ResourceCache<V> cache, ServletContext ctx, String path, Object extra) {
|
||||
//20050905: Tom Yeh
|
||||
//We don't need to handle the default name if user specifies only a dir
|
||||
//because it is handled by the container directly
|
||||
//And, web developer has to specify <welcome-file> in web.xml
|
||||
URL url = null;
|
||||
if (path == null || path.length() == 0) path = "/";
|
||||
else if (path.charAt(0) != '/') {
|
||||
if (path.indexOf("://") > 0) {
|
||||
try {
|
||||
url = new URL(path);
|
||||
} catch (java.net.MalformedURLException ex) {
|
||||
throw new SystemException(ex);
|
||||
}
|
||||
}else path = '/' + path;
|
||||
}
|
||||
|
||||
if (url == null) {
|
||||
if (path.startsWith("/~")) {
|
||||
final ServletContext ctx0 = ctx;
|
||||
final String path0 = path;
|
||||
final int j = path.indexOf('/', 2);
|
||||
final String ctxpath;
|
||||
if (j >= 0) {
|
||||
ctxpath = "/" + path.substring(2, j);
|
||||
path = path.substring(j);
|
||||
} else {
|
||||
ctxpath = "/" + path.substring(2);
|
||||
path = "/";
|
||||
}
|
||||
|
||||
final ExtendletContext extctx =
|
||||
Servlets.getExtendletContext(ctx, ctxpath.substring(1));
|
||||
if (extctx != null) {
|
||||
url = extctx.getResource(path);
|
||||
// if (log.isDebugEnabled()) log.debug("Resolving "+path0+" to "+url);
|
||||
if (url == null)
|
||||
return null;
|
||||
try {
|
||||
return cache.get(new ResourceInfo(path, url, extra));
|
||||
} catch (Throwable ex) {
|
||||
final IOException ioex = getIOException(ex);
|
||||
if (ioex == null)
|
||||
throw SystemException.Aide.wrap(ex);
|
||||
log.warn("Unable to load "+url, ioex);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
ctx = ctx.getContext(ctxpath);
|
||||
if (ctx == null) { //failed
|
||||
// if (log.isDebugEnabled()) log.debug("Context not found: "+ctxpath);
|
||||
ctx = ctx0; path = path0;//restore
|
||||
}
|
||||
}
|
||||
|
||||
final String flnm = ctx.getRealPath(path);
|
||||
if (flnm != null) {
|
||||
File file = new File(flnm);
|
||||
if (file.exists()) {
|
||||
try {
|
||||
return cache.get(new ResourceInfo(path, file, extra));
|
||||
//it is loader's job to check the existence
|
||||
} catch (Throwable ex) {
|
||||
final IOException ioex = getIOException(ex);
|
||||
if (ioex == null)
|
||||
throw SystemException.Aide.wrap(ex);
|
||||
log.warn("Unable to load "+flnm, ioex);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//try url because some server uses JAR format
|
||||
try {
|
||||
if (url == null)
|
||||
url = ctx.getResource(path);
|
||||
if (url != null)
|
||||
return cache.get(new ResourceInfo(path, url, extra));
|
||||
} catch (Throwable ex) {
|
||||
final IOException ioex = getIOException(ex);
|
||||
if (ioex == null)
|
||||
throw SystemException.Aide.wrap(ex);
|
||||
log.warn("Unable to load "+path, ioex);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
//don't eat exceptions other than IOException
|
||||
private static IOException getIOException(Throwable ex) {
|
||||
for (; ex != null; ex = ex.getCause())
|
||||
if (ex instanceof IOException)
|
||||
return (IOException)ex;
|
||||
return null;
|
||||
}
|
||||
}
|
|
@ -1,30 +0,0 @@
|
|||
package org.zkoss.zk.library;
|
||||
|
||||
import org.osgi.framework.BundleActivator;
|
||||
import org.osgi.framework.BundleContext;
|
||||
|
||||
public class Activator implements BundleActivator {
|
||||
|
||||
private static BundleContext context;
|
||||
|
||||
public static BundleContext getContext() {
|
||||
return context;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
|
||||
*/
|
||||
public void start(BundleContext bundleContext) throws Exception {
|
||||
Activator.context = bundleContext;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
|
||||
*/
|
||||
public void stop(BundleContext bundleContext) throws Exception {
|
||||
Activator.context = null;
|
||||
}
|
||||
|
||||
}
|
|
@ -1,44 +0,0 @@
|
|||
/******************************************************************************
|
||||
* Copyright (C) 2014 TrekGlobal *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
*****************************************************************************/
|
||||
package org.zkoss.zul.impl;
|
||||
|
||||
import org.zkoss.lang.Library;
|
||||
import org.zkoss.zul.impl.GridDataLoader;
|
||||
|
||||
/**
|
||||
* @author hengsin
|
||||
*
|
||||
*/
|
||||
public class CustomGridDataLoader extends GridDataLoader {
|
||||
|
||||
public static final String GRID_DATA_LOADER_LIMIT = "org.zkoss.zul.grid.DataLoader.limit";
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public CustomGridDataLoader() {
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.zkoss.zul.impl.GridDataLoader#getLimit()
|
||||
*/
|
||||
@Override
|
||||
public int getLimit() {
|
||||
String limit = Library.getProperty(GRID_DATA_LOADER_LIMIT);
|
||||
if (limit != null) {
|
||||
return Integer.parseInt(limit);
|
||||
}
|
||||
return super.getLimit();
|
||||
}
|
||||
|
||||
}
|
|
@ -1,477 +0,0 @@
|
|||
/* GridDataLoader.java
|
||||
{{IS_NOTE
|
||||
Purpose:
|
||||
|
||||
Description:
|
||||
|
||||
History:
|
||||
Oct 29, 2009 10:44:57 AM, Created by henrichen
|
||||
}}IS_NOTE
|
||||
|
||||
Copyright (C) 2009 Potix Corporation. All Rights Reserved.
|
||||
|
||||
{{IS_RIGHT
|
||||
This program is distributed under GPL Version 3.0 in the hope that
|
||||
it will be useful, but WITHOUT ANY WARRANTY.
|
||||
}}IS_RIGHT
|
||||
*/
|
||||
package org.zkoss.zul.impl;
|
||||
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import org.zkoss.lang.Library;
|
||||
import org.zkoss.lang.Objects;
|
||||
import org.zkoss.xel.VariableResolver;
|
||||
import org.zkoss.zk.ui.Component;
|
||||
import org.zkoss.zk.ui.UiException;
|
||||
import org.zkoss.zk.ui.util.ForEachStatus;
|
||||
import org.zkoss.zk.ui.util.Template;
|
||||
import org.zkoss.zk.ui.ext.render.Cropper;
|
||||
import org.zkoss.zul.Grid;
|
||||
import org.zkoss.zul.Group;
|
||||
import org.zkoss.zul.GroupRendererExt;
|
||||
import org.zkoss.zul.Groupfoot;
|
||||
import org.zkoss.zul.Label;
|
||||
import org.zkoss.zul.ListModel;
|
||||
import org.zkoss.zul.Row;
|
||||
import org.zkoss.zul.RowRenderer;
|
||||
import org.zkoss.zul.RowRendererExt;
|
||||
import org.zkoss.zul.Rows;
|
||||
import org.zkoss.zul.event.ListDataEvent;
|
||||
import org.zkoss.zul.ext.GroupingInfo;
|
||||
import org.zkoss.zul.ext.Paginal;
|
||||
import org.zkoss.zul.impl.GroupsListModel.GroupDataInfo;
|
||||
|
||||
/**
|
||||
* Generic {@link Grid} data loader.
|
||||
* @author henrichen
|
||||
* @since 5.0.0
|
||||
*/
|
||||
public class GridDataLoader implements DataLoader, Cropper {
|
||||
private Grid _grid;
|
||||
|
||||
//--DataLoader--//
|
||||
public void init(Component owner, int offset, int limit) {
|
||||
_grid = (Grid) owner;
|
||||
}
|
||||
|
||||
public void reset() {
|
||||
//do nothing
|
||||
}
|
||||
|
||||
final public Component getOwner() {
|
||||
return _grid;
|
||||
}
|
||||
|
||||
public int getOffset() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public int getLimit() {
|
||||
String limit = Library.getProperty("org.zkoss.zul.grid.DataLoader.limit");
|
||||
if (limit != null) {
|
||||
return Integer.parseInt(limit);
|
||||
}
|
||||
return 50;
|
||||
}
|
||||
|
||||
public int getTotalSize() {
|
||||
final Rows rows = _grid.getRows();
|
||||
final ListModel<Object> model = _grid.getModel();
|
||||
return model != null ? model.getSize() : rows != null ? rows.getVisibleItemCount() : 0;
|
||||
}
|
||||
|
||||
private static int INVALIDATE_THRESHOLD = 10;
|
||||
public void doListDataChange(ListDataEvent event) {
|
||||
//when this is called _model is never null
|
||||
final Rows rows = _grid.getRows();
|
||||
final int newsz = event.getModel().getSize(), oldsz = rows.getChildren().size();
|
||||
int min = event.getIndex0(), max = event.getIndex1(), cnt;
|
||||
|
||||
switch (event.getType()) {
|
||||
case ListDataEvent.INTERVAL_ADDED:
|
||||
cnt = newsz - oldsz;
|
||||
if (cnt <= 0) {
|
||||
syncModel(-1, -1); //out of sync, force sync
|
||||
return;
|
||||
//throw new UiException("Adding causes a smaller list?");
|
||||
}
|
||||
if ((oldsz <= 0 || cnt > INVALIDATE_THRESHOLD)
|
||||
&& !inPagingMold())
|
||||
rows.invalidate();
|
||||
//Invalidate rows to improve the performance since it is faster
|
||||
//to remove a lot of individual rows. It is safer than invalidating
|
||||
//the whole grid since header might have an input affecting the model
|
||||
//(e.g., ZK-985: demo's data filter)
|
||||
//The memory leak of IE is better with outer (Bug 3147518),
|
||||
//and even better with _grid.invalidate() but better to solve ZK-985
|
||||
if (min < 0)
|
||||
if (max < 0) min = 0;
|
||||
else min = max - cnt + 1;
|
||||
if (min > oldsz) min = oldsz;
|
||||
|
||||
RowRenderer<?> renderer = null;
|
||||
final Component next =
|
||||
min < oldsz ? rows.getChildren().get(min): null;
|
||||
while (--cnt >= 0) {
|
||||
if (renderer == null)
|
||||
renderer = (RowRenderer<?>) getRealRenderer();
|
||||
rows.insertBefore(newUnloadedItem(renderer, min++), next);
|
||||
}
|
||||
break;
|
||||
|
||||
case ListDataEvent.INTERVAL_REMOVED:
|
||||
cnt = oldsz - newsz;
|
||||
if (cnt <= 0) {
|
||||
syncModel(-1, -1); //out of sync, force sync
|
||||
return;
|
||||
//throw new UiException("Removal causes a larger list?");
|
||||
}
|
||||
if ((newsz <= 0 || cnt > INVALIDATE_THRESHOLD)
|
||||
&& !inPagingMold())
|
||||
rows.invalidate();
|
||||
//Invalidate rows to improve the performance see above
|
||||
|
||||
if (min >= 0) max = min + cnt - 1;
|
||||
else if (max < 0) max = cnt - 1; //0 ~ cnt - 1
|
||||
if (max > oldsz - 1) max = oldsz - 1;
|
||||
|
||||
//detach from end (due to groupfoot issue)
|
||||
Component comp = rows.getChildren().get(max);
|
||||
while (--cnt >= 0) {
|
||||
Component p = comp.getPreviousSibling();
|
||||
comp.detach();
|
||||
comp = p;
|
||||
}
|
||||
break;
|
||||
|
||||
default: //CONTENTS_CHANGED
|
||||
syncModel(min, max < 0 ? -1 : (max - min + 1));
|
||||
}
|
||||
}
|
||||
|
||||
/** Creates a new and unloaded row. */
|
||||
protected Component newUnloadedItem(Object renderer, int index) {
|
||||
final RowRenderer<?> renderer0 = (RowRenderer<?>) renderer;
|
||||
final ListModel<Object> model = ((Grid)getOwner()).getModel();
|
||||
Row row = null;
|
||||
if (model instanceof GroupsListModel <?, ?, ?>) {
|
||||
final GroupsListModel<?, ?, ?> gmodel = (GroupsListModel<?, ?, ?>) model;
|
||||
final GroupingInfo info = gmodel.getDataInfo(index);
|
||||
switch(info.getType()){
|
||||
case GroupDataInfo.GROUP:
|
||||
row = newGroup(renderer0);
|
||||
((Group)row).setOpen(info.isOpen());
|
||||
break;
|
||||
case GroupDataInfo.GROUPFOOT:
|
||||
row = newGroupfoot(renderer0);
|
||||
break;
|
||||
default:
|
||||
row = newRow(renderer0);
|
||||
}
|
||||
}else{
|
||||
row = newRow(renderer0);
|
||||
}
|
||||
((LoadStatus)row.getExtraCtrl()).setLoaded(false);
|
||||
((LoadStatus)row.getExtraCtrl()).setIndex(index);
|
||||
|
||||
newUnloadedCell(renderer0, row);
|
||||
return row;
|
||||
}
|
||||
|
||||
private Row newRow(RowRenderer<?> renderer) {
|
||||
Row row = null;
|
||||
if (renderer instanceof RowRendererExt)
|
||||
row = ((RowRendererExt)renderer).newRow((Grid)getOwner());
|
||||
if (row == null) {
|
||||
row = new Row();
|
||||
row.applyProperties();
|
||||
}
|
||||
return row;
|
||||
}
|
||||
private Group newGroup(RowRenderer<?> renderer) {
|
||||
Group group = null;
|
||||
if (renderer instanceof GroupRendererExt)
|
||||
group = ((GroupRendererExt)renderer).newGroup((Grid)getOwner());
|
||||
if (group == null) {
|
||||
group = new Group();
|
||||
group.applyProperties();
|
||||
}
|
||||
return group;
|
||||
}
|
||||
private Groupfoot newGroupfoot(RowRenderer<?> renderer) {
|
||||
Groupfoot groupfoot = null;
|
||||
if (renderer instanceof GroupRendererExt)
|
||||
groupfoot = ((GroupRendererExt)renderer).newGroupfoot((Grid)getOwner());
|
||||
if (groupfoot == null) {
|
||||
groupfoot = new Groupfoot();
|
||||
groupfoot.applyProperties();
|
||||
}
|
||||
return groupfoot;
|
||||
}
|
||||
private Component newUnloadedCell(RowRenderer<?> renderer, Row row) {
|
||||
Component cell = null;
|
||||
if (renderer instanceof RowRendererExt)
|
||||
cell = ((RowRendererExt)renderer).newCell(row);
|
||||
|
||||
if (cell == null) {
|
||||
cell = newRenderLabel(null);
|
||||
cell.applyProperties();
|
||||
}
|
||||
cell.setParent(row);
|
||||
return cell;
|
||||
}
|
||||
/** Returns the label for the cell generated by the default renderer.
|
||||
*/
|
||||
private static Label newRenderLabel(String value) {
|
||||
final Label label =
|
||||
new Label(value != null && value.length() > 0 ? value: " ");
|
||||
label.setPre(true); //to make sure is generated, and then occupies some space
|
||||
return label;
|
||||
}
|
||||
|
||||
public Object getRealRenderer() {
|
||||
final RowRenderer<?> renderer = _grid.getRowRenderer();
|
||||
return renderer != null ? renderer : _defRend;
|
||||
}
|
||||
private static final RowRenderer<Object> _defRend = new RowRenderer<Object>() {
|
||||
public void render(final Row row, final Object data, final int index) {
|
||||
final Rows rows = (Rows)row.getParent();
|
||||
final Grid grid = (Grid)rows.getParent();
|
||||
Template tm = getTemplate(grid, rows, "model");
|
||||
GroupingInfo info = null;
|
||||
if (row instanceof Group) {
|
||||
final Template tm2 = getTemplate(grid, rows, "model:group");
|
||||
if (tm2 != null)
|
||||
tm = tm2;
|
||||
if (grid.getModel() instanceof GroupsListModel<?, ?, ?>) {
|
||||
final GroupsListModel<?, ?, ?> gmodel = (GroupsListModel<?, ?, ?>)grid.getModel();
|
||||
info = gmodel.getDataInfo(index);
|
||||
}
|
||||
} else if (row instanceof Groupfoot) {
|
||||
final Template tm2 = getTemplate(grid, rows, "model:groupfoot");
|
||||
if (tm2 != null)
|
||||
tm = tm2;
|
||||
}
|
||||
if (tm == null) {
|
||||
final Label label = newRenderLabel(Objects.toString(data));
|
||||
label.applyProperties();
|
||||
label.setParent(row);
|
||||
row.setValue(data);
|
||||
} else {
|
||||
final GroupingInfo groupingInfo = info;
|
||||
final Component[] items = tm.create(rows, row,
|
||||
new VariableResolver() {
|
||||
public Object resolveVariable(String name) {
|
||||
if ("each".equals(name)) {
|
||||
return data;
|
||||
} else if ("forEachStatus".equals(name)) {
|
||||
return new ForEachStatus() {
|
||||
|
||||
public ForEachStatus getPrevious() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public Object getEach() {
|
||||
return data;
|
||||
}
|
||||
|
||||
public int getIndex() {
|
||||
return index;
|
||||
}
|
||||
|
||||
public Integer getBegin() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public Integer getEnd() {
|
||||
return grid.getModel().getSize();
|
||||
}
|
||||
};
|
||||
} else if ("groupingInfo".equals(name)) {
|
||||
return groupingInfo;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}, null);
|
||||
if (items.length != 1)
|
||||
throw new UiException("The model template must have exactly one row, not "+items.length);
|
||||
|
||||
final Row nr = (Row)items[0];
|
||||
|
||||
//sync open state
|
||||
if (nr instanceof Group && row instanceof Group) {
|
||||
((Group)nr).setOpen(((Group)row).isOpen());
|
||||
}
|
||||
|
||||
if (nr.getValue() == null) //template might set it
|
||||
nr.setValue(data);
|
||||
row.setAttribute("org.zkoss.zul.model.renderAs", nr);
|
||||
//indicate a new row is created to replace the existent one
|
||||
row.detach();
|
||||
}
|
||||
}
|
||||
};
|
||||
private static Template getTemplate(Grid grid, Rows rows, String name) {
|
||||
final Template tm = grid.getTemplate(name);
|
||||
return tm != null ? tm: rows != null ? rows.getTemplate(name): null;
|
||||
// Also allow model's template to be declared in Rows
|
||||
}
|
||||
|
||||
public void syncModel(int offset, int limit) {
|
||||
int min = offset;
|
||||
int max = offset + limit - 1;
|
||||
|
||||
final ListModel<Object> model = _grid.getModel();
|
||||
Rows rows = _grid.getRows();
|
||||
final int newsz = model.getSize();
|
||||
final int oldsz = rows != null ? rows.getChildren().size(): 0;
|
||||
final Paginal pgi = _grid.getPaginal();
|
||||
final boolean inPaging = inPagingMold();
|
||||
final boolean shallInvalidated = //Bug 3147518: avoid memory leak
|
||||
(min < 0 || min == 0) && (max < 0 || max >= newsz || max >= oldsz);
|
||||
|
||||
int newcnt = newsz - oldsz;
|
||||
int atg = pgi != null ? _grid.getActivePage(): 0;
|
||||
RowRenderer<?> renderer = null;
|
||||
Component next = null;
|
||||
if (oldsz > 0) {
|
||||
if (min < 0) min = 0;
|
||||
else if (min > oldsz - 1) min = oldsz - 1;
|
||||
if (max < 0) max = oldsz - 1;
|
||||
else if (max > oldsz - 1) max = oldsz - 1;
|
||||
if (min > max) {
|
||||
int t = min; min = max; max = t;
|
||||
}
|
||||
|
||||
int cnt = max - min + 1; //# of affected
|
||||
if (rows != null) {
|
||||
if (model instanceof GroupsListModel) {
|
||||
//detach all from end to front since groupfoot
|
||||
//must be detached before group
|
||||
newcnt += cnt; //add affected later
|
||||
if ((shallInvalidated || newcnt > INVALIDATE_THRESHOLD)
|
||||
&& !inPaging)
|
||||
rows.invalidate();
|
||||
//Invalidate rows to improve the performance see above
|
||||
|
||||
Component comp = rows.getChildren().get(max);
|
||||
next = comp.getNextSibling();
|
||||
while (--cnt >= 0) {
|
||||
Component p = comp.getPreviousSibling();
|
||||
comp.detach();
|
||||
comp = p;
|
||||
}
|
||||
} else { //ListModel<Object>
|
||||
int addcnt = 0;
|
||||
Component row = rows.getChildren().get(min);
|
||||
while (--cnt >= 0) {
|
||||
next = row.getNextSibling();
|
||||
|
||||
if (cnt < -newcnt) { //if shrink, -newcnt > 0
|
||||
row.detach(); //remove extra
|
||||
} else if (((LoadStatus)((Row)row).getExtraCtrl()).isLoaded()) {
|
||||
if (renderer == null)
|
||||
renderer = (RowRenderer<?>)getRealRenderer();
|
||||
row.detach(); //always detach
|
||||
rows.insertBefore(newUnloadedItem(renderer, min), next);
|
||||
++addcnt;
|
||||
}
|
||||
++min;
|
||||
row = next;
|
||||
}
|
||||
|
||||
if ((shallInvalidated || addcnt > INVALIDATE_THRESHOLD || addcnt + newcnt > INVALIDATE_THRESHOLD)
|
||||
&& !inPaging)
|
||||
rows.invalidate();
|
||||
//Invalidate rows to improve the performance see above
|
||||
}
|
||||
}
|
||||
} else {
|
||||
min = 0;
|
||||
|
||||
//auto create but it means <grid model="xx"><rows/>... will fail
|
||||
if (rows == null) {
|
||||
rows = new Rows();
|
||||
rows.setParent(_grid);
|
||||
}
|
||||
}
|
||||
|
||||
for (; --newcnt >= 0; ++min) {
|
||||
if (renderer == null)
|
||||
renderer = (RowRenderer<?>) getRealRenderer();
|
||||
rows.insertBefore(newUnloadedItem(renderer, min), next);
|
||||
}
|
||||
|
||||
if (pgi != null) {
|
||||
if (atg >= pgi.getPageCount())
|
||||
atg = pgi.getPageCount() - 1;
|
||||
pgi.setActivePage(atg);
|
||||
if (pgi.getTotalSize() != newsz)
|
||||
pgi.setTotalSize(newsz); //Bug ZK-1888 - Grid in paging mold doesn't change pages count
|
||||
}
|
||||
}
|
||||
|
||||
protected boolean inPagingMold() {
|
||||
return "paging".equals(_grid.getMold());
|
||||
}
|
||||
|
||||
public void updateModelInfo() {
|
||||
// do nothing
|
||||
}
|
||||
|
||||
public void setLoadAll(boolean b) {
|
||||
//do nothing
|
||||
}
|
||||
|
||||
//--Cropper--//
|
||||
public boolean isCropper() {
|
||||
return _grid != null &&
|
||||
inPagingMold()
|
||||
&& _grid.getPageSize() <= getTotalSize();
|
||||
//Single page is considered as not a cropper.
|
||||
//isCropper is called after a component is removed, so
|
||||
//we have to test >= rather than >
|
||||
}
|
||||
|
||||
public Set<? extends Component> getAvailableAtClient() {
|
||||
if (!isCropper())
|
||||
return null;
|
||||
|
||||
final Paginal pgi = _grid.getPaginal();
|
||||
int pgsz = pgi.getPageSize();
|
||||
int ofs = pgi.getActivePage() * pgsz;
|
||||
return getAvailableAtClient(ofs, pgsz);
|
||||
}
|
||||
|
||||
protected Set<? extends Component> getAvailableAtClient(int offset, int limit) {
|
||||
final Set<Component> avail = new LinkedHashSet<Component>(32);
|
||||
final Rows rows = _grid.getRows();
|
||||
Row row = (Row) rows.getFirstChild();
|
||||
while(row != null) {
|
||||
if (limit == 0) break;
|
||||
if (row.isVisible()) {
|
||||
if (--offset < 0) {
|
||||
--limit;
|
||||
avail.add(row);
|
||||
}
|
||||
}
|
||||
if (row instanceof Group) {
|
||||
final Group g = (Group) row;
|
||||
if (!g.isOpen()) {
|
||||
for (int j = 0, len = g.getItemCount(); j < len && row != null; j++)
|
||||
row = (Row) row.getNextSibling();
|
||||
}
|
||||
}
|
||||
if (row != null)
|
||||
row = (Row) row.getNextSibling();
|
||||
}
|
||||
return avail;
|
||||
}
|
||||
|
||||
public Component getCropOwner() {
|
||||
return _grid;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue