svn commit: r991738 - in /wicket/branches/wicket-1.4.x/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui: yahoo-dom-event/ yahoodomevent/ yahoodomevent/yahoo-dom-event.js yuiloader-min.js
Author: gseitz Date: Wed Sep 1 22:20:51 2010 New Revision: 991738 URL: http://svn.apache.org/viewvc?rev=991738view=rev Log: WICKET-2848: renamed yahoo-dom-event to yahoodomevent Added: wicket/branches/wicket-1.4.x/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/yahoodomevent/ wicket/branches/wicket-1.4.x/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/yahoodomevent/yahoo-dom-event.js (props changed) - copied unchanged from r991734, wicket/branches/wicket-1.4.x/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/yahoo-dom-event/yahoo-dom-event.js Removed: wicket/branches/wicket-1.4.x/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/yahoo-dom-event/ Modified: wicket/branches/wicket-1.4.x/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/yuiloader-min.js wicket/branches/wicket-1.4.x/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/yuiloader.js Propchange: wicket/branches/wicket-1.4.x/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/yahoodomevent/yahoo-dom-event.js -- svn:mime-type = text/plain Modified: wicket/branches/wicket-1.4.x/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/yuiloader-min.js URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.4.x/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/yuiloader-min.js?rev=991738r1=991737r2=991738view=diff == --- wicket/branches/wicket-1.4.x/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/yuiloader-min.js (original) +++ wicket/branches/wicket-1.4.x/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/yuiloader-min.js Wed Sep 1 22:20:51 2010 @@ -5,6 +5,6 @@ http://developer.yahoo.net/yui/license.t version: 2.7.0 */ if(typeof YAHOO==undefined||!YAHOO){var YAHOO={};}YAHOO.namespace=function(){var A=arguments,E=null,C,B,D;for(C=0;CA.length;C=C+1){D=(+A[C]).split(.);E=YAHOO;for(B=(D[0]==YAHOO)?1:0;BD.length;B=B+1){E[D[B]]=E[D[B]]||{};E=E[D[B]];}}return E;};YAHOO.log=function(D,A,C){var B=YAHOO.widget.Logger;if(BB.log){return B.log(D,A,C);}else{return false;}};YAHOO.register=function(A,E,D){var I=YAHOO.env.modules,B,H,G,F,C;if(!I[A]){I[A]={versions:[],builds:[]};}B=I[A];H=D.version;G=D.build;F=YAHOO.env.listeners;B.name=A;B.version=H;B.build=G;B.versions.push(H);B.builds.push(G);B.mainClass=E;for(C=0;CF.length;C=C+1){F[C](B);}if(E){E.VERSION=H;E.BUILD=G;}else{YAHOO.log(mainClass is undefined for module +A,warn);}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(A){return YAHOO.env.modules[A]||null;};YAHOO.env.ua=function(){var C={ie:0,opera:0,gecko:0,webkit:0,mobile:null,air:0,caja:0},B=navigator.userAgent,A;if((/KHTML/).test(B)){C.webkit=1;}A=B .match(/AppleWebKit\/([^\s]*)/);if(AA[1]){C.webkit=parseFloat(A[1]);if(/ Mobile\//.test(B)){C.mobile=Apple;}else{A=B.match(/NokiaN[^\/]*/);if(A){C.mobile=A[0];}}A=B.match(/AdobeAIR\/([^\s]*)/);if(A){C.air=A[0];}}if(!C.webkit){A=B.match(/Opera[\s\/]([^\s]*)/);if(AA[1]){C.opera=parseFloat(A[1]);A=B.match(/Opera Mini[^;]*/);if(A){C.mobile=A[0];}}else{A=B.match(/MSIE\s([^;]*)/);if(AA[1]){C.ie=parseFloat(A[1]);}else{A=B.match(/Gecko\/([^\s]*)/);if(A){C.gecko=1;A=B.match(/rv:([^\s\)]*)/);if(AA[1]){C.gecko=parseFloat(A[1]);}A=B.match(/Caja\/([^\s]*)/);if(AA[1]){C.caja=parseFloat(A[1]);}return C;}();(function(){YAHOO.namespace(util,widget,example);if(undefined!==typeof YAHOO_config){var B=YAHOO_config.listener,A=YAHOO.env.listeners,D=true,C;if(B){for(C=0;CA.length;C=C+1){if(A[C]==B){D=false;break;}}if(D){A.push(B);)();YAHOO.lang=YAHOO.lang||{};(function(){var B=YAHOO.lang,F=[object Array],C=[object Function],A=Object.prototype,E=[toString,valueOf ],D={isArray:function(G){return A.toString.apply(G)===F;},isBoolean:function(G){return typeof G===boolean;},isFunction:function(G){return A.toString.apply(G)===C;},isNull:function(G){return G===null;},isNumber:function(G){return typeof G===numberisFinite(G);},isObject:function(G){return(G(typeof G===object||B.isFunction(G)))||false;},isString:function(G){return typeof G===string;},isUndefined:function(G){return typeof G===undefined;},_IEEnumFix:(YAHOO.env.ua.ie)?function(I,H){var G,K,J;for(G=0;GE.length;G=G+1){K=E[G];J=H[K];if(B.isFunction(J)J!=A[K]){I[K]=J;}}}:function(){},extend:function(J,K,I){if(!K||!J){throw new Error(extend failed, please check that +all dependencies are included.);}var H=function(){},G;H.prototype=K.prototype;J.prototype=new H();J.prototype.constructor=J;J.superclass=K.prototype;if(K.prototype.constructor==A.constructor){K.prototype.constructor=K;}if(I){for(G in I){if(B.hasOwnProperty(I,G)){J.prototype[G]=I[G];}}B._IEEnumFix(J.pro totype,I);}},augmentObject:function(K,J){if(!J||!K){throw new Error(Absorb failed, verify dependencies.);}var G
svn commit: r991762 - in /wicket/trunk/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui: calendar/DatePicker.java yahoo-dom-event/ yahoodomevent/ yahoodomevent/yahoo-dom-event.js yuiload
Author: gseitz Date: Wed Sep 1 23:24:17 2010 New Revision: 991762 URL: http://svn.apache.org/viewvc?rev=991762view=rev Log: WICKET-2848: renamed yahoo-dom-event to yahoodomevent WICKET-2848: append '/' to the url for the basePath in DatePicker.java Added: wicket/trunk/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/yahoodomevent/ wicket/trunk/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/yahoodomevent/yahoo-dom-event.js (props changed) - copied unchanged from r991712, wicket/trunk/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/yahoo-dom-event/yahoo-dom-event.js Removed: wicket/trunk/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/yahoo-dom-event/ Modified: wicket/trunk/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/DatePicker.java wicket/trunk/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/yuiloader-min.js wicket/trunk/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/yuiloader.js Modified: wicket/trunk/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/DatePicker.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/DatePicker.java?rev=991762r1=991761r2=991762view=diff == --- wicket/trunk/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/DatePicker.java (original) +++ wicket/trunk/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/DatePicker.java Wed Sep 1 23:24:17 2010 @@ -235,12 +235,9 @@ public class DatePicker extends Abstract variables.put(hideOnSelect, hideOnSelect()); variables.put(showOnFieldClick, showOnFieldClick()); // variables for YUILoader - variables.put( - basePath, - Strings.stripJSessionId(RequestCycle.get() - .urlFor(new ResourceReferenceRequestHandler(YUI)).toString())); - variables.put(wicketDatePath, - RequestCycle.get().urlFor(new ResourceReferenceRequestHandler(WICKET_DATE))); + variables.put(basePath, + Strings.stripJSessionId(RequestCycle.get().urlFor(YUI, null).toString() + /)); + variables.put(wicketDatePath, RequestCycle.get().urlFor(WICKET_DATE, null)); if (Application.DEVELOPMENT.equals(Application.get().getConfigurationType())) { variables.put(filter, filter: \RAW\,); Propchange: wicket/trunk/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/yahoodomevent/yahoo-dom-event.js -- svn:mime-type = text/plain Modified: wicket/trunk/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/yuiloader-min.js URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/yuiloader-min.js?rev=991762r1=991761r2=991762view=diff == --- wicket/trunk/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/yuiloader-min.js (original) +++ wicket/trunk/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/yuiloader-min.js Wed Sep 1 23:24:17 2010 @@ -5,6 +5,6 @@ http://developer.yahoo.net/yui/license.t version: 2.7.0 */ if(typeof YAHOO==undefined||!YAHOO){var YAHOO={};}YAHOO.namespace=function(){var A=arguments,E=null,C,B,D;for(C=0;CA.length;C=C+1){D=(+A[C]).split(.);E=YAHOO;for(B=(D[0]==YAHOO)?1:0;BD.length;B=B+1){E[D[B]]=E[D[B]]||{};E=E[D[B]];}}return E;};YAHOO.log=function(D,A,C){var B=YAHOO.widget.Logger;if(BB.log){return B.log(D,A,C);}else{return false;}};YAHOO.register=function(A,E,D){var I=YAHOO.env.modules,B,H,G,F,C;if(!I[A]){I[A]={versions:[],builds:[]};}B=I[A];H=D.version;G=D.build;F=YAHOO.env.listeners;B.name=A;B.version=H;B.build=G;B.versions.push(H);B.builds.push(G);B.mainClass=E;for(C=0;CF.length;C=C+1){F[C](B);}if(E){E.VERSION=H;E.BUILD=G;}else{YAHOO.log(mainClass is undefined for module +A,warn);}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(A){return YAHOO.env.modules[A]||null;};YAHOO.env.ua=function(){var C={ie:0,opera:0,gecko:0,webkit:0,mobile:null,air:0,caja:0},B=navigator.userAgent,A;if((/KHTML/).test(B)){C.webkit=1;}A=B .match(/AppleWebKit\/([^\s]*)/);if(AA[1]){C.webkit=parseFloat(A[1]);if(/ Mobile\//.test(B)){C.mobile=Apple;}else{A=B.match(/NokiaN[^\/]*/);if(A){C.mobile=A[0];}}A=B.match(/AdobeAIR\/([^\s]*)/);if(A){C.air=A[0];}}if(!C.webkit){A=B.match(/Opera[\s\/]([^\s]*)/);if(AA[1]){C.opera=parseFloat(A[1]);A=B.match(/Opera Mini[^;]*/);if(A){C.mobile=A[0];}}else{A=B.match(/MSIE\s
svn commit: r991764 - /wicket/trunk/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/DatePicker.java
Author: gseitz Date: Wed Sep 1 23:36:03 2010 New Revision: 991764 URL: http://svn.apache.org/viewvc?rev=991764view=rev Log: WICKET-2848: append the '/' _after_ stripping the jsessionid Modified: wicket/trunk/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/DatePicker.java Modified: wicket/trunk/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/DatePicker.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/DatePicker.java?rev=991764r1=991763r2=991764view=diff == --- wicket/trunk/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/DatePicker.java (original) +++ wicket/trunk/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/DatePicker.java Wed Sep 1 23:36:03 2010 @@ -236,7 +236,7 @@ public class DatePicker extends Abstract variables.put(showOnFieldClick, showOnFieldClick()); // variables for YUILoader variables.put(basePath, - Strings.stripJSessionId(RequestCycle.get().urlFor(YUI, null).toString() + /)); + Strings.stripJSessionId(RequestCycle.get().urlFor(YUI, null).toString()) + /); variables.put(wicketDatePath, RequestCycle.get().urlFor(WICKET_DATE, null)); if (Application.DEVELOPMENT.equals(Application.get().getConfigurationType())) {
svn commit: r949319 - in /wicket/branches/wicket-1.4.x/wicket-spring/src/main/java/org/apache/wicket/spring: SpringBeanLocator.java injection/annot/AnnotProxyFieldValueFactory.java
Author: gseitz Date: Fri May 28 23:32:03 2010 New Revision: 949319 URL: http://svn.apache.org/viewvc?rev=949319view=rev Log: WICKET-2900: look for bean definition in parent contexts WICKET-2901: only return a primary bean if it's the only one Modified: wicket/branches/wicket-1.4.x/wicket-spring/src/main/java/org/apache/wicket/spring/SpringBeanLocator.java wicket/branches/wicket-1.4.x/wicket-spring/src/main/java/org/apache/wicket/spring/injection/annot/AnnotProxyFieldValueFactory.java Modified: wicket/branches/wicket-1.4.x/wicket-spring/src/main/java/org/apache/wicket/spring/SpringBeanLocator.java URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.4.x/wicket-spring/src/main/java/org/apache/wicket/spring/SpringBeanLocator.java?rev=949319r1=949318r2=949319view=diff == --- wicket/branches/wicket-1.4.x/wicket-spring/src/main/java/org/apache/wicket/spring/SpringBeanLocator.java (original) +++ wicket/branches/wicket-1.4.x/wicket-spring/src/main/java/org/apache/wicket/spring/SpringBeanLocator.java Fri May 28 23:32:03 2010 @@ -26,9 +26,11 @@ import org.apache.wicket.proxy.IProxyTar import org.apache.wicket.util.lang.Classes; import org.apache.wicket.util.lang.Objects; import org.apache.wicket.util.string.Strings; +import org.springframework.beans.factory.BeanFactory; import org.springframework.beans.factory.BeanFactoryUtils; import org.springframework.beans.factory.NoSuchBeanDefinitionException; import org.springframework.beans.factory.config.BeanDefinition; +import org.springframework.beans.factory.config.ConfigurableListableBeanFactory; import org.springframework.beans.factory.support.AbstractBeanDefinition; import org.springframework.context.ApplicationContext; import org.springframework.context.support.AbstractApplicationContext; @@ -135,18 +137,23 @@ public class SpringBeanLocator implement { if (ctx instanceof AbstractApplicationContext) { + ListString primaries = new ArrayListString(); for (String name : names) { - BeanDefinition beanDef = ((AbstractApplicationContext)ctx).getBeanFactory() - .getBeanDefinition(name); + BeanDefinition beanDef = getBeanDefinition(((AbstractApplicationContext)ctx) + .getBeanFactory(), name); if (beanDef instanceof AbstractBeanDefinition) { if (((AbstractBeanDefinition)beanDef).isPrimary()) { - return name; + primaries.add(name); } } } + if (primaries.size() == 1) + { + return primaries.get(0); + } } StringBuilder msg = new StringBuilder(); @@ -164,6 +171,27 @@ public class SpringBeanLocator implement } } + private BeanDefinition getBeanDefinition(ConfigurableListableBeanFactory beanFactory, + String name) + { + if (beanFactory.containsBeanDefinition(name)) + { + return beanFactory.getBeanDefinition(name); + } + else + { + BeanFactory parent = beanFactory.getParentBeanFactory(); + if (parent != null parent instanceof ConfigurableListableBeanFactory) + { + return getBeanDefinition(beanFactory, name); + } + else + { + return null; + } + } + } + /** * @return returns whether the bean (the locator is supposed to istantiate) is a singleton or * not Modified: wicket/branches/wicket-1.4.x/wicket-spring/src/main/java/org/apache/wicket/spring/injection/annot/AnnotProxyFieldValueFactory.java URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.4.x/wicket-spring/src/main/java/org/apache/wicket/spring/injection/annot/AnnotProxyFieldValueFactory.java?rev=949319r1=949318r2=949319view=diff == --- wicket/branches/wicket-1.4.x/wicket-spring/src/main/java/org/apache
svn commit: r949322 - in /wicket/trunk/wicket-spring/src/main/java/org/apache/wicket/spring: SpringBeanLocator.java injection/annot/AnnotProxyFieldValueFactory.java
Author: gseitz Date: Fri May 28 23:49:38 2010 New Revision: 949322 URL: http://svn.apache.org/viewvc?rev=949322view=rev Log: WICKET-2900: look for bean definition in parent contexts WICKET-2901: only return a primary bean if it's the only one Modified: wicket/trunk/wicket-spring/src/main/java/org/apache/wicket/spring/SpringBeanLocator.java wicket/trunk/wicket-spring/src/main/java/org/apache/wicket/spring/injection/annot/AnnotProxyFieldValueFactory.java Modified: wicket/trunk/wicket-spring/src/main/java/org/apache/wicket/spring/SpringBeanLocator.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-spring/src/main/java/org/apache/wicket/spring/SpringBeanLocator.java?rev=949322r1=949321r2=949322view=diff == --- wicket/trunk/wicket-spring/src/main/java/org/apache/wicket/spring/SpringBeanLocator.java (original) +++ wicket/trunk/wicket-spring/src/main/java/org/apache/wicket/spring/SpringBeanLocator.java Fri May 28 23:49:38 2010 @@ -26,9 +26,11 @@ import org.apache.wicket.proxy.IProxyTar import org.apache.wicket.util.lang.Objects; import org.apache.wicket.util.lang.WicketObjects; import org.apache.wicket.util.string.Strings; +import org.springframework.beans.factory.BeanFactory; import org.springframework.beans.factory.BeanFactoryUtils; import org.springframework.beans.factory.NoSuchBeanDefinitionException; import org.springframework.beans.factory.config.BeanDefinition; +import org.springframework.beans.factory.config.ConfigurableListableBeanFactory; import org.springframework.beans.factory.support.AbstractBeanDefinition; import org.springframework.context.ApplicationContext; import org.springframework.context.support.AbstractApplicationContext; @@ -120,12 +122,15 @@ public class SpringBeanLocator implement while (it.hasNext()) { final String possibility = it.next(); - BeanDefinition beanDef = ((AbstractApplicationContext)ctx).getBeanFactory() - .getBeanDefinition(possibility); - if (BeanFactoryUtils.isFactoryDereference(possibility) || - possibility.startsWith(scopedTarget.) || !beanDef.isAutowireCandidate()) + if (ctx instanceof AbstractApplicationContext) { - it.remove(); + BeanDefinition beanDef = getBeanDefinition(((AbstractApplicationContext)ctx) + .getBeanFactory(), possibility); + if (BeanFactoryUtils.isFactoryDereference(possibility) || + possibility.startsWith(scopedTarget.) || !beanDef.isAutowireCandidate()) + { + it.remove(); + } } } @@ -137,18 +142,23 @@ public class SpringBeanLocator implement { if (ctx instanceof AbstractApplicationContext) { + ListString primaries = new ArrayListString(); for (String name : names) { - BeanDefinition beanDef = ((AbstractApplicationContext)ctx).getBeanFactory() - .getBeanDefinition(name); + BeanDefinition beanDef = getBeanDefinition(((AbstractApplicationContext)ctx) + .getBeanFactory(), name); if (beanDef instanceof AbstractBeanDefinition) { if (((AbstractBeanDefinition)beanDef).isPrimary()) { - return name; + primaries.add(name); } } } + if (primaries.size() == 1) + { + return primaries.get(0); + } } StringBuilder msg = new StringBuilder(); @@ -166,6 +176,28 @@ public class SpringBeanLocator implement } } + private BeanDefinition getBeanDefinition(ConfigurableListableBeanFactory beanFactory, + String name) + { + if (beanFactory.containsBeanDefinition(name)) + { + return
svn commit: r948228 - /wicket/branches/wicket-1.4.x/wicket-spring/src/main/java/org/apache/wicket/spring/injection/annot/AnnotProxyFieldValueFactory.java
Author: gseitz Date: Tue May 25 22:40:21 2010 New Revision: 948228 URL: http://svn.apache.org/viewvc?rev=948228view=rev Log: Applied WICKET-2771 Modified: wicket/branches/wicket-1.4.x/wicket-spring/src/main/java/org/apache/wicket/spring/injection/annot/AnnotProxyFieldValueFactory.java Modified: wicket/branches/wicket-1.4.x/wicket-spring/src/main/java/org/apache/wicket/spring/injection/annot/AnnotProxyFieldValueFactory.java URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.4.x/wicket-spring/src/main/java/org/apache/wicket/spring/injection/annot/AnnotProxyFieldValueFactory.java?rev=948228r1=948227r2=948228view=diff == --- wicket/branches/wicket-1.4.x/wicket-spring/src/main/java/org/apache/wicket/spring/injection/annot/AnnotProxyFieldValueFactory.java (original) +++ wicket/branches/wicket-1.4.x/wicket-spring/src/main/java/org/apache/wicket/spring/injection/annot/AnnotProxyFieldValueFactory.java Tue May 25 22:40:21 2010 @@ -30,7 +30,10 @@ import org.apache.wicket.spring.SpringBe import org.apache.wicket.util.lang.Generics; import org.apache.wicket.util.string.Strings; import org.springframework.beans.factory.BeanFactoryUtils; +import org.springframework.beans.factory.config.BeanDefinition; +import org.springframework.beans.factory.support.AbstractBeanDefinition; import org.springframework.context.ApplicationContext; +import org.springframework.context.support.AbstractApplicationContext; /** * {...@link IFieldValueFactory} that uses {...@link LazyInitProxyFactory} to create proxies for Spring @@ -196,6 +199,21 @@ public class AnnotProxyFieldValueFactory } else if (names.size() 1) { + if (ctx instanceof AbstractApplicationContext) + { + for (String name : names) + { + BeanDefinition beanDef = ((AbstractApplicationContext)ctx).getBeanFactory() + .getBeanDefinition(name); + if (beanDef instanceof AbstractBeanDefinition) + { + if (((AbstractBeanDefinition)beanDef).isPrimary()) + { + return name; + } + } + } + } StringBuilder msg = new StringBuilder(); msg.append(more then one bean of type [); msg.append(clazz.getName());
svn commit: r948229 - in /wicket/trunk/wicket-spring/src/main/java/org/apache/wicket/spring: SpringBeanLocator.java injection/annot/AnnotProxyFieldValueFactory.java
Author: gseitz Date: Tue May 25 22:41:07 2010 New Revision: 948229 URL: http://svn.apache.org/viewvc?rev=948229view=rev Log: WICKET-2365: support 'autowire-candidate' attribute Modified: wicket/trunk/wicket-spring/src/main/java/org/apache/wicket/spring/SpringBeanLocator.java wicket/trunk/wicket-spring/src/main/java/org/apache/wicket/spring/injection/annot/AnnotProxyFieldValueFactory.java Modified: wicket/trunk/wicket-spring/src/main/java/org/apache/wicket/spring/SpringBeanLocator.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-spring/src/main/java/org/apache/wicket/spring/SpringBeanLocator.java?rev=948229r1=948228r2=948229view=diff == --- wicket/trunk/wicket-spring/src/main/java/org/apache/wicket/spring/SpringBeanLocator.java (original) +++ wicket/trunk/wicket-spring/src/main/java/org/apache/wicket/spring/SpringBeanLocator.java Tue May 25 22:41:07 2010 @@ -116,12 +116,14 @@ public class SpringBeanLocator implement .beanNamesForTypeIncludingAncestors(ctx, clazz))); IteratorString it = names.iterator(); - // filter out beans that are not condidates for autowiring + // filter out beans that are not candidates for autowiring while (it.hasNext()) { final String possibility = it.next(); + BeanDefinition beanDef = ((AbstractApplicationContext)ctx).getBeanFactory() + .getBeanDefinition(possibility); if (BeanFactoryUtils.isFactoryDereference(possibility) || - possibility.startsWith(scopedTarget.)) + possibility.startsWith(scopedTarget.) || !beanDef.isAutowireCandidate()) { it.remove(); } Modified: wicket/trunk/wicket-spring/src/main/java/org/apache/wicket/spring/injection/annot/AnnotProxyFieldValueFactory.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-spring/src/main/java/org/apache/wicket/spring/injection/annot/AnnotProxyFieldValueFactory.java?rev=948229r1=948228r2=948229view=diff == --- wicket/trunk/wicket-spring/src/main/java/org/apache/wicket/spring/injection/annot/AnnotProxyFieldValueFactory.java (original) +++ wicket/trunk/wicket-spring/src/main/java/org/apache/wicket/spring/injection/annot/AnnotProxyFieldValueFactory.java Tue May 25 22:41:07 2010 @@ -30,7 +30,9 @@ import org.apache.wicket.spring.SpringBe import org.apache.wicket.util.lang.Generics; import org.apache.wicket.util.string.Strings; import org.springframework.beans.factory.BeanFactoryUtils; +import org.springframework.beans.factory.config.BeanDefinition; import org.springframework.context.ApplicationContext; +import org.springframework.context.support.AbstractApplicationContext; /** * {...@link IFieldValueFactory} that uses {...@link LazyInitProxyFactory} to create proxies for Spring @@ -184,8 +186,10 @@ public class AnnotProxyFieldValueFactory while (it.hasNext()) { final String possibility = it.next(); + BeanDefinition beanDef = ((AbstractApplicationContext)ctx).getBeanFactory() + .getBeanDefinition(possibility); if (BeanFactoryUtils.isFactoryDereference(possibility) || - possibility.startsWith(scopedTarget.)) + possibility.startsWith(scopedTarget.) || !beanDef.isAutowireCandidate()) { it.remove(); }
svn commit: r948230 - /wicket/trunk/wicket-spring/src/main/java/org/apache/wicket/spring/injection/annot/AnnotProxyFieldValueFactory.java
Author: gseitz Date: Tue May 25 22:41:23 2010 New Revision: 948230 URL: http://svn.apache.org/viewvc?rev=948230view=rev Log: Applied WICKET-2771 Modified: wicket/trunk/wicket-spring/src/main/java/org/apache/wicket/spring/injection/annot/AnnotProxyFieldValueFactory.java Modified: wicket/trunk/wicket-spring/src/main/java/org/apache/wicket/spring/injection/annot/AnnotProxyFieldValueFactory.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-spring/src/main/java/org/apache/wicket/spring/injection/annot/AnnotProxyFieldValueFactory.java?rev=948230r1=948229r2=948230view=diff == --- wicket/trunk/wicket-spring/src/main/java/org/apache/wicket/spring/injection/annot/AnnotProxyFieldValueFactory.java (original) +++ wicket/trunk/wicket-spring/src/main/java/org/apache/wicket/spring/injection/annot/AnnotProxyFieldValueFactory.java Tue May 25 22:41:23 2010 @@ -31,6 +31,7 @@ import org.apache.wicket.util.lang.Gener import org.apache.wicket.util.string.Strings; import org.springframework.beans.factory.BeanFactoryUtils; import org.springframework.beans.factory.config.BeanDefinition; +import org.springframework.beans.factory.support.AbstractBeanDefinition; import org.springframework.context.ApplicationContext; import org.springframework.context.support.AbstractApplicationContext; @@ -181,7 +182,7 @@ public class AnnotProxyFieldValueFactory ListString names = new ArrayListString(Arrays.asList(BeanFactoryUtils .beanNamesForTypeIncludingAncestors(ctx, clazz))); - // filter out beans that are not condidates for autowiring + // filter out beans that are not candidates for autowiring IteratorString it = names.iterator(); while (it.hasNext()) { @@ -201,6 +202,21 @@ public class AnnotProxyFieldValueFactory } else if (names.size() 1) { + if (ctx instanceof AbstractApplicationContext) + { + for (String name : names) + { + BeanDefinition beanDef = ((AbstractApplicationContext)ctx).getBeanFactory() + .getBeanDefinition(name); + if (beanDef instanceof AbstractBeanDefinition) + { + if (((AbstractBeanDefinition)beanDef).isPrimary()) + { + return name; + } + } + } + } StringBuilder msg = new StringBuilder(); msg.append(more then one bean of type [); msg.append(clazz.getName());
svn commit: r943697 - in /wicket/trunk: ./ archetypes/quickstart/ archetypes/quickstart/src/main/resources/META-INF/ archetypes/quickstart/src/main/resources/META-INF/maven/ archetypes/quickstart/src/
Author: gseitz Date: Wed May 12 21:25:56 2010 New Revision: 943697 URL: http://svn.apache.org/viewvc?rev=943697view=rev Log: WICKET-2009: converted archetype to the new Archetype 2.0 format Added: wicket/trunk/archetypes/quickstart/src/main/resources/META-INF/maven/ wicket/trunk/archetypes/quickstart/src/main/resources/META-INF/maven/archetype-metadata.xml Removed: wicket/trunk/archetypes/quickstart/src/main/resources/META-INF/archetype.xml Modified: wicket/trunk/archetypes/quickstart/pom.xml wicket/trunk/archetypes/quickstart/src/main/resources/archetype-resources/src/main/java/HomePage.java wicket/trunk/archetypes/quickstart/src/main/resources/archetype-resources/src/main/java/WicketApplication.java wicket/trunk/archetypes/quickstart/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml wicket/trunk/archetypes/quickstart/src/main/resources/archetype-resources/src/test/java/Start.java wicket/trunk/archetypes/quickstart/src/main/resources/archetype-resources/src/test/java/TestHomePage.java wicket/trunk/pom.xml Modified: wicket/trunk/archetypes/quickstart/pom.xml URL: http://svn.apache.org/viewvc/wicket/trunk/archetypes/quickstart/pom.xml?rev=943697r1=943696r2=943697view=diff == --- wicket/trunk/archetypes/quickstart/pom.xml (original) +++ wicket/trunk/archetypes/quickstart/pom.xml Wed May 12 21:25:56 2010 @@ -8,7 +8,7 @@ /parent artifactIdwicket-archetype-quickstart/artifactId - packagingjar/packaging + packagingmaven-archetype/packaging nameWicket Quickstart Archetype/name build @@ -21,6 +21,17 @@ /includes /resource /resources + extensions + extension + groupIdorg.apache.maven.archetype/groupId + artifactIdarchetype-packaging/artifactId + /extension + /extensions + plugins + plugin + groupIdorg.apache.maven.plugins/groupId + artifactIdmaven-archetype-plugin/artifactId + /plugin + /plugins /build - /project Added: wicket/trunk/archetypes/quickstart/src/main/resources/META-INF/maven/archetype-metadata.xml URL: http://svn.apache.org/viewvc/wicket/trunk/archetypes/quickstart/src/main/resources/META-INF/maven/archetype-metadata.xml?rev=943697view=auto == --- wicket/trunk/archetypes/quickstart/src/main/resources/META-INF/maven/archetype-metadata.xml (added) +++ wicket/trunk/archetypes/quickstart/src/main/resources/META-INF/maven/archetype-metadata.xml Wed May 12 21:25:56 2010 @@ -0,0 +1,30 @@ +?xml version=1.0 encoding=UTF-8? +archetype-descriptor name=quickstart + fileSets + fileSet filtered=true packaged=true encoding=UTF-8 + directorysrc/main/java/directory + includes + include**/*.java/include + include**/*.html/include + /includes + /fileSet + fileSet filtered=true packaged=true encoding=UTF-8 + directorysrc/test/java/directory + includes + include**/*.java/include + /includes + /fileSet + fileSet filtered=true packaged=false encoding=UTF-8 + directorysrc/main/resources/directory + includes + include**/*.properties/include + /includes + /fileSet + fileSet filtered=true packaged=false encoding=UTF-8 + directorysrc/main/webapp/directory + includes + include**/*.xml/include + /includes + /fileSet + /fileSets +/archetype-descriptor \ No newline at end of file Modified: wicket/trunk/archetypes/quickstart/src/main/resources/archetype-resources/src/main/java/HomePage.java URL: http://svn.apache.org/viewvc/wicket/trunk/archetypes/quickstart/src/main/resources/archetype-resources/src/main/java/HomePage.java?rev=943697r1=943696r2=943697view=diff == --- wicket/trunk/archetypes/quickstart/src/main/resources/archetype-resources/src/main/java/HomePage.java (original) +++ wicket/trunk/archetypes/quickstart/src/main/resources/archetype-resources/src/main/java/HomePage.java Wed May 12 21:25:56 2010 @@ -1,6 +1,6 @@ -package ${packageName}; +package ${package}; -import org.apache.wicket.PageParameters; +import
svn commit: r943703 - /wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/Wizard_hu.properties
Author: gseitz Date: Wed May 12 21:44:18 2010 New Revision: 943703 URL: http://svn.apache.org/viewvc?rev=943703view=rev Log: WICKET-2870: fix hungarian translation for wizard Modified: wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/Wizard_hu.properties Modified: wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/Wizard_hu.properties URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/Wizard_hu.properties?rev=943703r1=943702r2=943703view=diff == --- wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/Wizard_hu.properties (original) +++ wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/Wizard_hu.properties Wed May 12 21:44:18 2010 @@ -16,7 +16,7 @@ org.apache.wicket.extensions.wizard.next org.apache.wicket.extensions.wizard.previous= Vissza org.apache.wicket.extensions.wizard.last=Utols\u00F3 org.apache.wicket.extensions.wizard.cancel=M\u00E9gse -org.apache.wicket.extensions.wizard.finish=Befelyez +org.apache.wicket.extensions.wizard.finish=Befejez org.apache.wicket.extensions.wizard.NextButton.step.did.not.complete=Nem lehet a k\u00F6tvetkez\u0151 lapra menni. -org.apache.wicket.extensions.wizard.FinishButton.step.did.not.complete=Nem lehet befelyezni a folyamatot. +org.apache.wicket.extensions.wizard.FinishButton.step.did.not.complete=Nem lehet befejezni a folyamatot.
svn commit: r943707 - /wicket/branches/wicket-1.4.x/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/Wizard_hu.properties
Author: gseitz Date: Wed May 12 21:49:03 2010 New Revision: 943707 URL: http://svn.apache.org/viewvc?rev=943707view=rev Log: WICKET-2870: fix hungarian translation for wizard Modified: wicket/branches/wicket-1.4.x/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/Wizard_hu.properties Modified: wicket/branches/wicket-1.4.x/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/Wizard_hu.properties URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.4.x/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/Wizard_hu.properties?rev=943707r1=943706r2=943707view=diff == --- wicket/branches/wicket-1.4.x/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/Wizard_hu.properties (original) +++ wicket/branches/wicket-1.4.x/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/Wizard_hu.properties Wed May 12 21:49:03 2010 @@ -16,7 +16,7 @@ org.apache.wicket.extensions.wizard.next org.apache.wicket.extensions.wizard.previous= Vissza org.apache.wicket.extensions.wizard.last=Utols\u00F3 org.apache.wicket.extensions.wizard.cancel=M\u00E9gse -org.apache.wicket.extensions.wizard.finish=Befelyez +org.apache.wicket.extensions.wizard.finish=Befejez org.apache.wicket.extensions.wizard.NextButton.step.did.not.complete=Nem lehet a k\u00F6tvetkez\u0151 lapra menni. -org.apache.wicket.extensions.wizard.FinishButton.step.did.not.complete=Nem lehet befelyezni a folyamatot. +org.apache.wicket.extensions.wizard.FinishButton.step.did.not.complete=Nem lehet befejezni a folyamatot.
svn commit: r943729 - in /wicket/trunk/wicket/src/main/java/org/apache/wicket: Application_ch.properties Application_de_CH.properties
Author: gseitz Date: Wed May 12 22:33:22 2010 New Revision: 943729 URL: http://svn.apache.org/viewvc?rev=943729view=rev Log: WICKET-2860: fixed wrong name for swiss Application.properties Added: wicket/trunk/wicket/src/main/java/org/apache/wicket/Application_de_CH.properties - copied, changed from r943697, wicket/trunk/wicket/src/main/java/org/apache/wicket/Application_ch.properties Removed: wicket/trunk/wicket/src/main/java/org/apache/wicket/Application_ch.properties Copied: wicket/trunk/wicket/src/main/java/org/apache/wicket/Application_de_CH.properties (from r943697, wicket/trunk/wicket/src/main/java/org/apache/wicket/Application_ch.properties) URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/Application_de_CH.properties?p2=wicket/trunk/wicket/src/main/java/org/apache/wicket/Application_de_CH.propertiesp1=wicket/trunk/wicket/src/main/java/org/apache/wicket/Application_ch.propertiesr1=943697r2=943729rev=943729view=diff == (empty)
svn commit: r943741 - in /wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket: Application_ch.properties Application_de_CH.properties
Author: gseitz Date: Wed May 12 22:55:16 2010 New Revision: 943741 URL: http://svn.apache.org/viewvc?rev=943741view=rev Log: WICKET-2860: fixed wrong name for swiss Application.properties Added: wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/Application_de_CH.properties - copied unchanged from r943739, wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/Application_ch.properties Removed: wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/Application_ch.properties
svn commit: r928542 - /wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/captcha/kittens/KittenCaptchaPanel.java
Author: gseitz Date: Mon Mar 29 00:21:26 2010 New Revision: 928542 URL: http://svn.apache.org/viewvc?rev=928542view=rev Log: added generic type parameter to the AROM Modified: wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/captcha/kittens/KittenCaptchaPanel.java Modified: wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/captcha/kittens/KittenCaptchaPanel.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/captcha/kittens/KittenCaptchaPanel.java?rev=928542r1=928541r2=928542view=diff == --- wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/captcha/kittens/KittenCaptchaPanel.java (original) +++ wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/captcha/kittens/KittenCaptchaPanel.java Mon Mar 29 00:21:26 2010 @@ -143,16 +143,17 @@ public class KittenCaptchaPanel extends setOutputMarkupId(true); // Show how many animals have been selected - animalSelectionLabel = new Label(animalSelectionLabel, new AbstractReadOnlyModel() - { - private static final long serialVersionUID = 6792322972316712326L; - - @Override - public Object getObject() + animalSelectionLabel = new Label(animalSelectionLabel, + new AbstractReadOnlyModelString() { - return imageResource.selectString(); - } - }); + private static final long serialVersionUID = 6792322972316712326L; + + @Override + public String getObject() + { + return imageResource.selectString(); + } + }); animalSelectionLabel.setOutputMarkupId(true); add(animalSelectionLabel);
svn commit: r928545 - /wicket/branches/wicket-1.4.x/wicket-extensions/src/main/java/org/apache/wicket/extensions/captcha/kittens/KittenCaptchaPanel.java
Author: gseitz Date: Mon Mar 29 00:26:44 2010 New Revision: 928545 URL: http://svn.apache.org/viewvc?rev=928545view=rev Log: added generic type parameter to AROM Modified: wicket/branches/wicket-1.4.x/wicket-extensions/src/main/java/org/apache/wicket/extensions/captcha/kittens/KittenCaptchaPanel.java Modified: wicket/branches/wicket-1.4.x/wicket-extensions/src/main/java/org/apache/wicket/extensions/captcha/kittens/KittenCaptchaPanel.java URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.4.x/wicket-extensions/src/main/java/org/apache/wicket/extensions/captcha/kittens/KittenCaptchaPanel.java?rev=928545r1=928544r2=928545view=diff == --- wicket/branches/wicket-1.4.x/wicket-extensions/src/main/java/org/apache/wicket/extensions/captcha/kittens/KittenCaptchaPanel.java (original) +++ wicket/branches/wicket-1.4.x/wicket-extensions/src/main/java/org/apache/wicket/extensions/captcha/kittens/KittenCaptchaPanel.java Mon Mar 29 00:26:44 2010 @@ -144,16 +144,17 @@ public class KittenCaptchaPanel extends setOutputMarkupId(true); // Show how many animals have been selected - animalSelectionLabel = new Label(animalSelectionLabel, new AbstractReadOnlyModel() - { - private static final long serialVersionUID = 6792322972316712326L; - - @Override - public Object getObject() + animalSelectionLabel = new Label(animalSelectionLabel, + new AbstractReadOnlyModelString() { - return imageResource.selectString(); - } - }); + private static final long serialVersionUID = 6792322972316712326L; + + @Override + public String getObject() + { + return imageResource.selectString(); + } + }); animalSelectionLabel.setOutputMarkupId(true); add(animalSelectionLabel);
svn commit: r659828 - in /wicket/trunk/wicket/src/main/java/org/apache/wicket: RestartResponseAtInterceptPageException.java RestartResponseException.java
Author: gseitz Date: Sat May 24 07:27:35 2008 New Revision: 659828 URL: http://svn.apache.org/viewvc?rev=659828view=rev Log: generics Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/RestartResponseAtInterceptPageException.java wicket/trunk/wicket/src/main/java/org/apache/wicket/RestartResponseException.java Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/RestartResponseAtInterceptPageException.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/RestartResponseAtInterceptPageException.java?rev=659828r1=659827r2=659828view=diff == --- wicket/trunk/wicket/src/main/java/org/apache/wicket/RestartResponseAtInterceptPageException.java (original) +++ wicket/trunk/wicket/src/main/java/org/apache/wicket/RestartResponseAtInterceptPageException.java Sat May 24 07:27:35 2008 @@ -42,7 +42,7 @@ * @param interceptPage *redirect page */ - public RestartResponseAtInterceptPageException(final Page ? interceptPage) + public RestartResponseAtInterceptPageException(final Page? interceptPage) { if (interceptPage == null) { @@ -55,11 +55,13 @@ /** * Redirects to the specified intercept page, this will result in a bookmarkable redirect. * +* @param C The page type +* * @param interceptPageClass *Class of intercept page to instantiate */ - public RestartResponseAtInterceptPageException( - final Class ? extends Page ? interceptPageClass) + public C extends Page? RestartResponseAtInterceptPageException( + final ClassC interceptPageClass) { if (interceptPageClass == null) { @@ -74,9 +76,9 @@ * @param interceptPage *The intercept page to redirect to */ - private void redirectToInterceptPage(final Page ? interceptPage) + private void redirectToInterceptPage(final Page? interceptPage) { - final Page ? requestPage = RequestCycle.get().getRequest().getPage(); + final Page? requestPage = RequestCycle.get().getRequest().getPage(); /* * requestPage can be null if we throw the restart response exception before any page is @@ -99,13 +101,15 @@ /** * Redirects to intercept page using the page map for the current request * +* @param C The page type +* * @param interceptPageClass *The intercept page class to redirect to */ - private void redirectToInterceptPage(final Class ? extends Page ? interceptPageClass) + private C extends Page? void redirectToInterceptPage(final ClassC interceptPageClass) { final RequestCycle cycle = RequestCycle.get(); - final Page ? requestPage = cycle.getRequest().getPage(); + final Page? requestPage = cycle.getRequest().getPage(); /* * requestPage can be null if we throw the restart response exception before any page is Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/RestartResponseException.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/RestartResponseException.java?rev=659828r1=659827r2=659828view=diff == --- wicket/trunk/wicket/src/main/java/org/apache/wicket/RestartResponseException.java (original) +++ wicket/trunk/wicket/src/main/java/org/apache/wicket/RestartResponseException.java Sat May 24 07:27:35 2008 @@ -29,10 +29,12 @@ /** * Redirects to the specified bookmarkable page * +* @param C The page type +* * @param pageClass *class of bookmarkable page */ - public RestartResponseException(Class ? extends Page ? pageClass) + public C extends Page? RestartResponseException(ClassC pageClass) { RequestCycle.get().setResponsePage(pageClass); } @@ -40,12 +42,14 @@ /** * Redirects to the specified bookmarkable page with the given page parameters * +* @param C The page type +* * @param pageClass *class of bookmarkable page * @param params *bookmarkable page parameters */ - public RestartResponseException(Class ? extends Page ? pageClass, PageParameters params) + public C extends Page? RestartResponseException(ClassC pageClass, PageParameters params) { RequestCycle.get().setResponsePage(pageClass, params); } @@ -56,7 +60,7 @@ * @param page *redirect
svn commit: r659733 - /wicket/branches/wicket-1.3.x/pom.xml
Author: gseitz Date: Fri May 23 17:53:55 2008 New Revision: 659733 URL: http://svn.apache.org/viewvc?rev=659733view=rev Log: WICKET-1649: fix misspelled header Modified: wicket/branches/wicket-1.3.x/pom.xml Modified: wicket/branches/wicket-1.3.x/pom.xml URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.3.x/pom.xml?rev=659733r1=659732r2=659733view=diff == --- wicket/branches/wicket-1.3.x/pom.xml (original) +++ wicket/branches/wicket-1.3.x/pom.xml Fri May 23 17:53:55 2008 @@ -789,7 +789,7 @@ configuration instructions Import-Packageorg.apache.wicket*/Import-Package - Dynamic-ImportPackage*/Dynamic-ImportPackage + DynamicImport-Package*/DynamicImport-Package _nousestrue/_nouses /instructions /configuration
svn commit: r659735 - /wicket/trunk/pom.xml
Author: gseitz Date: Fri May 23 17:56:38 2008 New Revision: 659735 URL: http://svn.apache.org/viewvc?rev=659735view=rev Log: WICKET-1649: fix misspelled header Modified: wicket/trunk/pom.xml Modified: wicket/trunk/pom.xml URL: http://svn.apache.org/viewvc/wicket/trunk/pom.xml?rev=659735r1=659734r2=659735view=diff == --- wicket/trunk/pom.xml (original) +++ wicket/trunk/pom.xml Fri May 23 17:56:38 2008 @@ -738,7 +738,7 @@ configuration instructions Import-Packageorg.apache.wicket*/Import-Package - Dynamic-ImportPackage*/Dynamic-ImportPackage + DynamicImport-Package*/DynamicImport-Package _nousestrue/_nouses /instructions /configuration
svn commit: r658117 - /wicket/trunk/wicket-datetime/pom.xml
Author: gseitz Date: Mon May 19 23:07:51 2008 New Revision: 658117 URL: http://svn.apache.org/viewvc?rev=658117view=rev Log: WICKET-1645: invalid manifest due to folder yahoo-dom-event Modified: wicket/trunk/wicket-datetime/pom.xml Modified: wicket/trunk/wicket-datetime/pom.xml URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-datetime/pom.xml?rev=658117r1=658116r2=658117view=diff == --- wicket/trunk/wicket-datetime/pom.xml (original) +++ wicket/trunk/wicket-datetime/pom.xml Mon May 19 23:07:51 2008 @@ -15,10 +15,8 @@ See the License for the specific language governing permissions and limitations under the License. -- -project xmlns=http://maven.apache.org/POM/4.0.0; - xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; +project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd; - modelVersion4.0.0/modelVersion parent groupIdorg.apache.wicket/groupId @@ -26,13 +24,10 @@ version1.4-SNAPSHOT/version relativePath../pom.xml/relativePath /parent - artifactIdwicket-datetime/artifactId packagingjar/packaging - nameWicket Date/Time/name descriptionDate/Time components and utilities for Wicket/description - dependencies dependency groupIdorg.apache.wicket/groupId @@ -43,4 +38,29 @@ artifactIdjoda-time/artifactId /dependency /dependencies -/project + build + plugins + plugin + groupIdorg.apache.felix/groupId + artifactIdmaven-bundle-plugin/artifactId + version1.4.1/version + executions + execution + idbundle-manifest/id + phaseprocess-classes/phase + goals + goalmanifest/goal + /goals + configuration + instructions + Export-Package + !org.apache.wicket.extensions.yui.yahoo-dom-event,* + /Export-Package + /instructions + /configuration + /execution + /executions + /plugin + /plugins + /build +/project \ No newline at end of file
svn commit: r658120 - /wicket/trunk/wicket/src/main/java/org/apache/wicket/model/
Author: gseitz Date: Mon May 19 23:36:28 2008 New Revision: 658120 URL: http://svn.apache.org/viewvc?rev=658120view=rev Log: generics cleanup Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/model/AbstractPropertyModel.java wicket/trunk/wicket/src/main/java/org/apache/wicket/model/AbstractReadOnlyModel.java wicket/trunk/wicket/src/main/java/org/apache/wicket/model/CompoundPropertyModel.java wicket/trunk/wicket/src/main/java/org/apache/wicket/model/IComponentInheritedModel.java wicket/trunk/wicket/src/main/java/org/apache/wicket/model/IObjectClassAwareModel.java wicket/trunk/wicket/src/main/java/org/apache/wicket/model/IWrapModel.java wicket/trunk/wicket/src/main/java/org/apache/wicket/model/Model.java wicket/trunk/wicket/src/main/java/org/apache/wicket/model/StringResourceModel.java Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/model/AbstractPropertyModel.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/model/AbstractPropertyModel.java?rev=658120r1=658119r2=658120view=diff == --- wicket/trunk/wicket/src/main/java/org/apache/wicket/model/AbstractPropertyModel.java (original) +++ wicket/trunk/wicket/src/main/java/org/apache/wicket/model/AbstractPropertyModel.java Mon May 19 23:36:28 2008 @@ -144,6 +144,7 @@ *The object that will be used when setting a value on the model object * @see IModel#setObject(T) */ + @SuppressWarnings(unchecked) public void setObject(T object) { final String expression = propertyExpression(); @@ -153,7 +154,7 @@ // why not just set the target to the object? if (target instanceof IModel) { - ((IModel)target).setObject(object); + ((IModelT)target).setObject(object); } else { @@ -189,7 +190,7 @@ Object object = target; while (object instanceof IModel) { - Object tmp = ((IModel)object).getObject(); + Object tmp = ((IModel?)object).getObject(); if (tmp == object) break; object = tmp; @@ -307,7 +308,7 @@ * @deprecated use [EMAIL PROTECTED] #getObject()} instead */ @Deprecated - protected final Object onGetObject(Component component) + protected final Object onGetObject(Component? component) { throw new UnsupportedOperationException(); } @@ -320,7 +321,7 @@ * @deprecated use [EMAIL PROTECTED] #setObject(Object)} instead */ @Deprecated - protected final void onSetObject(Component component, Object object) + protected final void onSetObject(Component? component, Object object) { throw new UnsupportedOperationException(); } Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/model/AbstractReadOnlyModel.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/model/AbstractReadOnlyModel.java?rev=658120r1=658119r2=658120view=diff == --- wicket/trunk/wicket/src/main/java/org/apache/wicket/model/AbstractReadOnlyModel.java (original) +++ wicket/trunk/wicket/src/main/java/org/apache/wicket/model/AbstractReadOnlyModel.java Mon May 19 23:36:28 2008 @@ -78,11 +78,11 @@ // release. /** * @param component -* @return +* @return the model object * @deprecated replace by [EMAIL PROTECTED] IModel#getObject()}. */ @Deprecated - public final Object getObject(Component component) + public final Object getObject(Component? component) { throw new UnsupportedOperationException(); } Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/model/CompoundPropertyModel.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/model/CompoundPropertyModel.java?rev=658120r1=658119r2=658120view=diff == --- wicket/trunk/wicket/src/main/java/org/apache/wicket/model/CompoundPropertyModel.java (original) +++ wicket/trunk/wicket/src/main/java/org/apache/wicket/model/CompoundPropertyModel.java Mon May 19 23:36:28 2008 @@ -56,11 +56,12 @@ /** * @see org.apache.wicket.model.IModel#getObject() */ + @SuppressWarnings(unchecked) public T getObject() { if (target instanceof IModel) { - return (T)((IModel
svn commit: r657864 - in /wicket/trunk: wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/ wicket-examples/src/main/java/org/apache/wicket/examples/compref/ wicket-extensions/src/m
Author: gseitz Date: Mon May 19 10:08:52 2008 New Revision: 657864 URL: http://svn.apache.org/viewvc?rev=657864view=rev Log: undo generification of ITabT Modified: wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/TabbedPanelPage.java wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/compref/TabbedPanelPage.java wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/tabs/AjaxTabbedPanel.java wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/tabs/AbstractTab.java wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/tabs/ITab.java wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/tabs/TabbedPanel.java Modified: wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/TabbedPanelPage.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/TabbedPanelPage.java?rev=657864r1=657863r2=657864view=diff == --- wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/TabbedPanelPage.java (original) +++ wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/TabbedPanelPage.java Mon May 19 10:08:52 2008 @@ -39,8 +39,8 @@ public TabbedPanelPage() { // create a list of ITab objects used to feed the tabbed panel - ListITab? tabs = new ArrayListITab?(); - tabs.add(new AbstractTabVoid(new ModelString(first tab)) + ListITab tabs = new ArrayListITab(); + tabs.add(new AbstractTab(new ModelString(first tab)) { @Override public PanelVoid getPanel(String panelId) @@ -49,7 +49,7 @@ } }); - tabs.add(new AbstractTabVoid(new ModelString(second tab)) + tabs.add(new AbstractTab(new ModelString(second tab)) { @Override public PanelVoid getPanel(String panelId) @@ -58,7 +58,7 @@ } }); - tabs.add(new AbstractTabVoid(new ModelString(third tab)) + tabs.add(new AbstractTab(new ModelString(third tab)) { @Override public PanelVoid getPanel(String panelId) Modified: wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/compref/TabbedPanelPage.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/compref/TabbedPanelPage.java?rev=657864r1=657863r2=657864view=diff == --- wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/compref/TabbedPanelPage.java (original) +++ wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/compref/TabbedPanelPage.java Mon May 19 10:08:52 2008 @@ -50,8 +50,8 @@ addCssSwitchingLinks(); // create a list of ITab objects used to feed the tabbed panel - ListITab? tabs = new ArrayListITab?(); - tabs.add(new AbstractTabVoid(new ModelString(first tab)) + ListITab tabs = new ArrayListITab(); + tabs.add(new AbstractTab(new ModelString(first tab)) { @Override @@ -62,7 +62,7 @@ }); - tabs.add(new AbstractTabVoid(new ModelString(second tab)) + tabs.add(new AbstractTab(new ModelString(second tab)) { @Override @@ -73,7 +73,7 @@ }); - tabs.add(new AbstractTabVoid(new ModelString(third tab)) + tabs.add(new AbstractTab(new ModelString(third tab)) { @Override Modified: wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/tabs/AjaxTabbedPanel.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/tabs/AjaxTabbedPanel.java?rev=657864r1=657863r2=657864view=diff == --- wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/tabs/AjaxTabbedPanel.java (original) +++ wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/tabs/AjaxTabbedPanel.java Mon May 19 10:08:52 2008 @@ -42,7 +42,7 @@ * @param id * @param tabs */ - public AjaxTabbedPanel(String id, ListITab? tabs) + public AjaxTabbedPanel
svn commit: r657867 - in /wicket/trunk/wicket/src: main/java/org/apache/wicket/ main/java/org/apache/wicket/request/target/resource/ main/java/org/apache/wicket/settings/ test/java/ test/java/org/apac
Author: gseitz Date: Mon May 19 10:13:18 2008 New Revision: 657867 URL: http://svn.apache.org/viewvc?rev=657867view=rev Log: WICKET-1428 Added: wicket/trunk/wicket/src/test/java/ParentResourceTest.js (with props) wicket/trunk/wicket/src/test/java/org/apache/wicket/ParentResourceEscapePathTest.java (with props) wicket/trunk/wicket/src/test/java/org/apache/wicket/ParentResourceEscapePathTestPage.html (with props) wicket/trunk/wicket/src/test/java/org/apache/wicket/ParentResourceEscapePathTestPage.java (with props) Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/SharedResources.java wicket/trunk/wicket/src/main/java/org/apache/wicket/request/target/resource/SharedResourceRequestTarget.java wicket/trunk/wicket/src/main/java/org/apache/wicket/settings/IResourceSettings.java wicket/trunk/wicket/src/main/java/org/apache/wicket/settings/Settings.java Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/SharedResources.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/SharedResources.java?rev=657867r1=657866r2=657867view=diff == --- wicket/trunk/wicket/src/main/java/org/apache/wicket/SharedResources.java (original) +++ wicket/trunk/wicket/src/main/java/org/apache/wicket/SharedResources.java Mon May 19 10:13:18 2008 @@ -41,7 +41,7 @@ /** Logger */ private static final Logger log = LoggerFactory.getLogger(SharedResources.class); - /** + /** * THIS METHOD IS NOT PART OF THE WICKET PUBLIC API. DO NOT CALL IT. Inserts _[locale] and * _[style] into path just before any extension that might exist. * @@ -55,8 +55,12 @@ */ public static String resourceKey(final String path, final Locale locale, final String style) { - final String extension = Files.extension(path); - final String basePath = Files.basePath(path, extension); +// escape sequence for '..' (prevents crippled urls in browser) +final CharSequence parentEscape = Application.get().getResourceSettings().getParentFolderPlaceholder(); + +final String extension = Files.extension(path); +// get relative path to resource, replace '..' with escape sequence +final String basePath = Files.basePath(path, extension).replace(../, parentEscape + /); final AppendingStringBuffer buffer = new AppendingStringBuffer(basePath.length() + 16); buffer.append(basePath); Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/request/target/resource/SharedResourceRequestTarget.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/request/target/resource/SharedResourceRequestTarget.java?rev=657867r1=657866r2=657867view=diff == --- wicket/trunk/wicket/src/main/java/org/apache/wicket/request/target/resource/SharedResourceRequestTarget.java (original) +++ wicket/trunk/wicket/src/main/java/org/apache/wicket/request/target/resource/SharedResourceRequestTarget.java Mon May 19 10:13:18 2008 @@ -35,7 +35,7 @@ /** * Default implementation of [EMAIL PROTECTED] ISharedResourceRequestTarget}. Target that denotes a shared * [EMAIL PROTECTED] org.apache.wicket.Resource}. - * + * * @author Eelco Hillenius */ public class SharedResourceRequestTarget implements ISharedResourceRequestTarget @@ -47,7 +47,7 @@ /** * Construct. -* +* * @param requestParameters *the request parameters */ @@ -115,7 +115,7 @@ /** * Respond by looking up the shared resource and delegating the actual response to that * resource. -* +* * @see org.apache.wicket.IRequestTarget#respond(org.apache.wicket.RequestCycle) */ public void respond(RequestCycle requestCycle) @@ -145,7 +145,9 @@ { scope = resolver.resolveClass(className); } - String path = resourceKey.substring(ix + 1); + final CharSequence escapeString = application.getResourceSettings().getParentFolderPlaceholder(); + // get path component of resource key, replace '..' with escape sequence to prevent crippled urls in browser + String path = resourceKey.substring(ix + 1).replace(escapeString, ..); if (PackageResource.exists(scope, path, null, null)) { Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/settings/IResourceSettings.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/settings/IResourceSettings.java?rev
svn commit: r657871 - in /wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src: main/java/org/apache/wicket/ main/java/org/apache/wicket/request/target/resource/ main/java/org/apache/wicket/settings/ test/
Author: gseitz Date: Mon May 19 10:21:55 2008 New Revision: 657871 URL: http://svn.apache.org/viewvc?rev=657871view=rev Log: WICKET-1428 Added: wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/test/java/ParentResourceTest.js (with props) wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/test/java/org/apache/wicket/ParentResourceEscapePathTest.java (with props) wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/test/java/org/apache/wicket/ParentResourceEscapePathTestPage.html (with props) wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/test/java/org/apache/wicket/ParentResourceEscapePathTestPage.java (with props) Modified: wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/SharedResources.java wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/request/target/resource/SharedResourceRequestTarget.java wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/settings/IResourceSettings.java wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/settings/Settings.java Modified: wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/SharedResources.java URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/SharedResources.java?rev=657871r1=657870r2=657871view=diff == --- wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/SharedResources.java (original) +++ wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/SharedResources.java Mon May 19 10:21:55 2008 @@ -46,17 +46,23 @@ * _[style] into path just before any extension that might exist. * * @param path -*The resource path +* The resource path * @param locale -*The locale +* The locale * @param style -*The style (see [EMAIL PROTECTED] org.apache.wicket.Session}) +* The style (see [EMAIL PROTECTED] org.apache.wicket.Session}) * @return The localized path */ public static String resourceKey(final String path, final Locale locale, final String style) { + // escape sequence for' ..' (prevents crippled urls in browser) + final CharSequence parentEscape = Application.get() + .getResourceSettings() + .getParentFolderPlaceholder(); + final String extension = Files.extension(path); - final String basePath = Files.basePath(path, extension); + // get relative path to resource, replace' ..' with escape sequence + final String basePath = Files.basePath(path, extension).replace(../, parentEscape + /); final AppendingStringBuffer buffer = new AppendingStringBuffer(basePath.length() + 16); buffer.append(basePath); @@ -104,7 +110,7 @@ * Construct. * * @param application -*The application +* The application */ SharedResources(Application application) { @@ -114,18 +120,18 @@ * Adds a resource. * * @param scope -*Scope of resource +* Scope of resource * @param name -*Logical name of resource +* Logical name of resource * @param locale -*The locale of the resource +* The locale of the resource * @param style -*The resource style (see [EMAIL PROTECTED] org.apache.wicket.Session}) +* The resource style (see [EMAIL PROTECTED] org.apache.wicket.Session}) * @param resource -*Resource to store +* Resource to store */ public final void add(final Class scope, final String name, final Locale locale, - final String style, final Resource resource) + final String style, final Resource resource) { // Store resource final String key = resourceKey(scope, name, locale, style); @@ -147,11 +153,11 @@ * Adds a resource. * * @param name -*Logical name of resource +* Logical name of resource * @param locale -*The locale of the resource +* The locale of the resource * @param resource -*Resource to store +* Resource to store */ public final void add(final String name, final Locale locale, final Resource resource) { @@ -162,9 +168,9 @@ * Adds
svn commit: r657879 - in /wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket: SharedResources.java request/target/resource/SharedResourceRequestTarget.java
Author: gseitz Date: Mon May 19 10:38:36 2008 New Revision: 657879 URL: http://svn.apache.org/viewvc?rev=657879view=rev Log: WICKET-1428: use Strings.replaceAll instead of String.replace (Java5+) Modified: wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/SharedResources.java wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/request/target/resource/SharedResourceRequestTarget.java Modified: wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/SharedResources.java URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/SharedResources.java?rev=657879r1=657878r2=657879view=diff == --- wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/SharedResources.java (original) +++ wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/SharedResources.java Mon May 19 10:38:36 2008 @@ -24,6 +24,7 @@ import org.apache.wicket.util.file.Files; import org.apache.wicket.util.string.AppendingStringBuffer; +import org.apache.wicket.util.string.Strings; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -62,7 +63,8 @@ final String extension = Files.extension(path); // get relative path to resource, replace' ..' with escape sequence - final String basePath = Files.basePath(path, extension).replace(../, parentEscape + /); + String basePath = Files.basePath(path, extension); + basePath = Strings.replaceAll(basePath, ../, parentEscape + /).toString(); final AppendingStringBuffer buffer = new AppendingStringBuffer(basePath.length() + 16); buffer.append(basePath); Modified: wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/request/target/resource/SharedResourceRequestTarget.java URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/request/target/resource/SharedResourceRequestTarget.java?rev=657879r1=657878r2=657879view=diff == --- wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/request/target/resource/SharedResourceRequestTarget.java (original) +++ wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/request/target/resource/SharedResourceRequestTarget.java Mon May 19 10:38:36 2008 @@ -28,6 +28,7 @@ import org.apache.wicket.markup.html.PackageResource; import org.apache.wicket.protocol.http.WebResponse; import org.apache.wicket.request.RequestParameters; +import org.apache.wicket.util.string.Strings; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -151,7 +152,8 @@ .getParentFolderPlaceholder(); // get path component of resource key, replace' ..' with escape sequence to // prevent crippled urls in browser - String path = resourceKey.substring(ix + 1).replace(escapeString, ..); + String path = resourceKey.substring(ix + 1); + path = Strings.replaceAll(path, escapeString, ..).toString(); if (PackageResource.exists(scope, path, null, null)) {
svn commit: r657887 - /wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/test/java/org/apache/wicket/ParentResourceEscapePathTest.java
Author: gseitz Date: Mon May 19 10:53:49 2008 New Revision: 657887 URL: http://svn.apache.org/viewvc?rev=657887view=rev Log: WICKET-1428: StringBuilder - StringBuffer Modified: wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/test/java/org/apache/wicket/ParentResourceEscapePathTest.java Modified: wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/test/java/org/apache/wicket/ParentResourceEscapePathTest.java URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/test/java/org/apache/wicket/ParentResourceEscapePathTest.java?rev=657887r1=657886r2=657887view=diff == --- wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/test/java/org/apache/wicket/ParentResourceEscapePathTest.java (original) +++ wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/test/java/org/apache/wicket/ParentResourceEscapePathTest.java Mon May 19 10:53:49 2008 @@ -21,7 +21,7 @@ tester.assertRenderedPage(ParentResourceEscapePathTestPage.class); tester.assertNoErrorMessage(); - final StringBuilder expectedHtml = new StringBuilder(); + final StringBuffer expectedHtml = new StringBuffer(); expectedHtml.append(htmlheadwicket:linkscript src=\); expectedHtml.append(expectedResourceUrl()); expectedHtml.append(\ type=\text/javascript\/script/wicket:link/head/html); @@ -73,7 +73,7 @@ .getResourceSettings() .getParentFolderPlaceholder(); - final StringBuilder url = new StringBuilder(); + final StringBuffer url = new StringBuffer(); url.append(resources/org.apache.wicket.ParentResourceEscapePathTestPage/); for (int i = 0; i 3; i++)
svn commit: r657940 - in /wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/test/java/org/apache/wicket: ParentResourceEscapePathTest.java ParentResourceEscapePathTestPage.java markup/html/link/Autolink
Author: gseitz Date: Mon May 19 12:49:30 2008 New Revision: 657940 URL: http://svn.apache.org/viewvc?rev=657940view=rev Log: fix failing tests Modified: wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/test/java/org/apache/wicket/ParentResourceEscapePathTest.java wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/test/java/org/apache/wicket/ParentResourceEscapePathTestPage.java wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/test/java/org/apache/wicket/markup/html/link/AutolinkPageExpectedResult_1.html Modified: wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/test/java/org/apache/wicket/ParentResourceEscapePathTest.java URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/test/java/org/apache/wicket/ParentResourceEscapePathTest.java?rev=657940r1=657939r2=657940view=diff == --- wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/test/java/org/apache/wicket/ParentResourceEscapePathTest.java (original) +++ wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/test/java/org/apache/wicket/ParentResourceEscapePathTest.java Mon May 19 12:49:30 2008 @@ -1,3 +1,19 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the License); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.apache.wicket; import org.apache.wicket.protocol.http.MockHttpServletRequest; Modified: wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/test/java/org/apache/wicket/ParentResourceEscapePathTestPage.java URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/test/java/org/apache/wicket/ParentResourceEscapePathTestPage.java?rev=657940r1=657939r2=657940view=diff == --- wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/test/java/org/apache/wicket/ParentResourceEscapePathTestPage.java (original) +++ wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/test/java/org/apache/wicket/ParentResourceEscapePathTestPage.java Mon May 19 12:49:30 2008 @@ -1,3 +1,19 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the License); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.apache.wicket; import org.apache.wicket.markup.html.WebPage; Modified: wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/test/java/org/apache/wicket/markup/html/link/AutolinkPageExpectedResult_1.html URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/test/java/org/apache/wicket/markup/html/link/AutolinkPageExpectedResult_1.html?rev=657940r1=657939r2=657940view=diff == --- wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/test/java/org/apache/wicket/markup/html/link/AutolinkPageExpectedResult_1.html (original) +++ wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/test/java/org/apache/wicket/markup/html/link/AutolinkPageExpectedResult_1.html Mon May 19 12:49:30 2008 @@ -27,7 +27,7 @@ link href=resources/org.apache.wicket.markup.html.link.AutolinkPage_1/test_myStyle.css/ link href=resources/org.apache.wicket.markup.html.link.AutolinkPage_1/test2_myStyle.css/ link href=resources/org.apache.wicket.markup.html.link.AutolinkPage_1/test3_myStyle_de_DE.css/ -link href=resources/org.apache.wicket.markup.html.link.AutolinkPage_1/../../html/link/test2_myStyle.css/ +link href=resources/org.apache.wicket.markup.html.link.AutolinkPage_1/$up$/$up$/html/link/test2_myStyle.css/ a href=/root/test.htmlHome/a a href=?wicket:bookmarkablePage
svn commit: r657949 - /wicket/trunk/wicket/src/test/java/org/apache/wicket/stateless/pages/UsernamePasswordSignInPanel.java
Author: gseitz Date: Mon May 19 12:58:07 2008 New Revision: 657949 URL: http://svn.apache.org/viewvc?rev=657949view=rev Log: workaround for javac not able to compile this class Modified: wicket/trunk/wicket/src/test/java/org/apache/wicket/stateless/pages/UsernamePasswordSignInPanel.java Modified: wicket/trunk/wicket/src/test/java/org/apache/wicket/stateless/pages/UsernamePasswordSignInPanel.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/test/java/org/apache/wicket/stateless/pages/UsernamePasswordSignInPanel.java?rev=657949r1=657948r2=657949view=diff == --- wicket/trunk/wicket/src/test/java/org/apache/wicket/stateless/pages/UsernamePasswordSignInPanel.java (original) +++ wicket/trunk/wicket/src/test/java/org/apache/wicket/stateless/pages/UsernamePasswordSignInPanel.java Mon May 19 12:58:07 2008 @@ -59,7 +59,7 @@ add(new FeedbackPanel(feedback)); add(new LabelObject(naam)); - add(new SignInForm(signInForm)); + add(new SignInForm(signInForm, this)); } /** @@ -76,7 +76,7 @@ /** * Sign in form. */ - public final class SignInForm extends StatelessFormIValueMap + public static final class SignInForm extends StatelessFormIValueMap { /** Voor serializatie. */ private static final long serialVersionUID = 1L; @@ -84,15 +84,19 @@ /** Moeten de inlog waarden bewaard blijven? */ private boolean rememberMe = true; + private final UsernamePasswordSignInPanel? panel; + /** * Constructor. * * @param id *id of the form component +* @param panel */ - public SignInForm(final String id) + public SignInForm(final String id, UsernamePasswordSignInPanel? panel) { super(id, new CompoundPropertyModelIValueMap(new ValueMap())); + this.panel = panel; // only save username, not passwords add(new TextFieldString(username).setPersistent(rememberMe)); @@ -123,7 +127,7 @@ String username = values.getString(username); String password = values.getString(password); - if (signIn(username, password)) + if (panel.signIn(username, password)) { if (!getPage().continueToOriginalDestination()) { @@ -157,7 +161,7 @@ public void setRememberMe(boolean rememberMe) { this.rememberMe = rememberMe; - ((FormComponent ? )get(username)).setPersistent(rememberMe); + ((FormComponent?)get(username)).setPersistent(rememberMe); } } }
svn commit: r657948 - in /wicket/trunk/wicket/src/test/java/org/apache/wicket: ParentResourceEscapePathTest.java ParentResourceEscapePathTestPage.java markup/html/link/AutolinkPageExpectedResult_1.htm
Author: gseitz Date: Mon May 19 12:57:05 2008 New Revision: 657948 URL: http://svn.apache.org/viewvc?rev=657948view=rev Log: WICKET-1428: fix license header and failing unit test Modified: wicket/trunk/wicket/src/test/java/org/apache/wicket/ParentResourceEscapePathTest.java wicket/trunk/wicket/src/test/java/org/apache/wicket/ParentResourceEscapePathTestPage.java wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/link/AutolinkPageExpectedResult_1.html Modified: wicket/trunk/wicket/src/test/java/org/apache/wicket/ParentResourceEscapePathTest.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/test/java/org/apache/wicket/ParentResourceEscapePathTest.java?rev=657948r1=657947r2=657948view=diff == --- wicket/trunk/wicket/src/test/java/org/apache/wicket/ParentResourceEscapePathTest.java (original) +++ wicket/trunk/wicket/src/test/java/org/apache/wicket/ParentResourceEscapePathTest.java Mon May 19 12:57:05 2008 @@ -1,3 +1,19 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the License); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.apache.wicket; import org.apache.wicket.protocol.http.MockHttpServletRequest; Modified: wicket/trunk/wicket/src/test/java/org/apache/wicket/ParentResourceEscapePathTestPage.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/test/java/org/apache/wicket/ParentResourceEscapePathTestPage.java?rev=657948r1=657947r2=657948view=diff == --- wicket/trunk/wicket/src/test/java/org/apache/wicket/ParentResourceEscapePathTestPage.java (original) +++ wicket/trunk/wicket/src/test/java/org/apache/wicket/ParentResourceEscapePathTestPage.java Mon May 19 12:57:05 2008 @@ -1,3 +1,19 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the License); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.apache.wicket; import org.apache.wicket.markup.html.WebPage; Modified: wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/link/AutolinkPageExpectedResult_1.html URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/link/AutolinkPageExpectedResult_1.html?rev=657948r1=657947r2=657948view=diff == --- wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/link/AutolinkPageExpectedResult_1.html (original) +++ wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/link/AutolinkPageExpectedResult_1.html Mon May 19 12:57:05 2008 @@ -27,7 +27,7 @@ link href=resources/org.apache.wicket.markup.html.link.AutolinkPage_1/test_myStyle.css/ link href=resources/org.apache.wicket.markup.html.link.AutolinkPage_1/test2_myStyle.css/ link href=resources/org.apache.wicket.markup.html.link.AutolinkPage_1/test3_myStyle_de_DE.css/ -link href=resources/org.apache.wicket.markup.html.link.AutolinkPage_1/../../html/link/test2_myStyle.css/ +link href=resources/org.apache.wicket.markup.html.link.AutolinkPage_1/$up$/$up$/html/link/test2_myStyle.css/ a href=/root/test.htmlHome/a a href=?wicket:bookmarkablePage=%3Aorg.apache.wicket.markup.html.link.Page1Home/a a href=http://www.google.com;Google/a
svn commit: r657955 - /wicket/trunk/wicket/src/test/java/org/apache/wicket/ParentResourceEscapePathTest.java
Author: gseitz Date: Mon May 19 13:07:21 2008 New Revision: 657955 URL: http://svn.apache.org/viewvc?rev=657955view=rev Log: WICKET-1428: incorrect order of attribute in unit test Modified: wicket/trunk/wicket/src/test/java/org/apache/wicket/ParentResourceEscapePathTest.java Modified: wicket/trunk/wicket/src/test/java/org/apache/wicket/ParentResourceEscapePathTest.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/test/java/org/apache/wicket/ParentResourceEscapePathTest.java?rev=657955r1=657954r2=657955view=diff == --- wicket/trunk/wicket/src/test/java/org/apache/wicket/ParentResourceEscapePathTest.java (original) +++ wicket/trunk/wicket/src/test/java/org/apache/wicket/ParentResourceEscapePathTest.java Mon May 19 13:07:21 2008 @@ -38,9 +38,9 @@ tester.assertNoErrorMessage(); final StringBuilder expectedHtml = new StringBuilder(); - expectedHtml.append(htmlheadwicket:linkscript src=\); + expectedHtml.append(htmlheadwicket:linkscript type=\text/javascript\ src=\); expectedHtml.append(expectedResourceUrl()); - expectedHtml.append(\ type=\text/javascript\/script/wicket:link/head/html); + expectedHtml.append(\/script/wicket:link/head/html); assertEquals(expectedHtml.toString(), tester.getServletResponse().getDocument()); }
svn commit: r657958 - /wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/test/java/org/apache/wicket/ParentResourceEscapePathTest.java
Author: gseitz Date: Mon May 19 13:10:14 2008 New Revision: 657958 URL: http://svn.apache.org/viewvc?rev=657958view=rev Log: WICKET-1428: wrong order of attributes in unit test Modified: wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/test/java/org/apache/wicket/ParentResourceEscapePathTest.java Modified: wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/test/java/org/apache/wicket/ParentResourceEscapePathTest.java URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/test/java/org/apache/wicket/ParentResourceEscapePathTest.java?rev=657958r1=657957r2=657958view=diff == --- wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/test/java/org/apache/wicket/ParentResourceEscapePathTest.java (original) +++ wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/test/java/org/apache/wicket/ParentResourceEscapePathTest.java Mon May 19 13:10:14 2008 @@ -38,9 +38,9 @@ tester.assertNoErrorMessage(); final StringBuffer expectedHtml = new StringBuffer(); - expectedHtml.append(htmlheadwicket:linkscript src=\); + expectedHtml.append(htmlheadwicket:linkscript type=\text/javascript\ src=\); expectedHtml.append(expectedResourceUrl()); - expectedHtml.append(\ type=\text/javascript\/script/wicket:link/head/html); + expectedHtml.append(\/script/wicket:link/head/html); assertEquals(expectedHtml.toString(), tester.getServletResponse().getDocument()); }
svn commit: r657973 - /wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/linkomatic/LinkomaticApplication.java
Author: gseitz Date: Mon May 19 14:01:31 2008 New Revision: 657973 URL: http://svn.apache.org/viewvc?rev=657973view=rev Log: move initialization code from constructor to init() Modified: wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/linkomatic/LinkomaticApplication.java Modified: wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/linkomatic/LinkomaticApplication.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/linkomatic/LinkomaticApplication.java?rev=657973r1=657972r2=657973view=diff == --- wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/linkomatic/LinkomaticApplication.java (original) +++ wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/linkomatic/LinkomaticApplication.java Mon May 19 14:01:31 2008 @@ -28,19 +28,12 @@ */ public class LinkomaticApplication extends WicketExampleApplication { - /** -* Constructor -*/ - public LinkomaticApplication() - { - getSharedResources().add(cancelButton, new DefaultButtonImageResource(Cancel)); - } /** * @see org.apache.wicket.Application#getHomePage() */ @Override - public Class ? extends Page ? getHomePage() + public Class? extends Page? getHomePage() { return Home.class; } @@ -51,6 +44,7 @@ @Override protected void init() { + getSharedResources().add(cancelButton, new DefaultButtonImageResource(Cancel)); // log host name and server time in the browser's status bar getRequestCycleSettings().addResponseFilter(new ServerHostNameAndTimeFilter()); }
svn commit: r657975 - /wicket/branches/wicket-1.3.x/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/linkomatic/LinkomaticApplication.java
Author: gseitz Date: Mon May 19 14:02:54 2008 New Revision: 657975 URL: http://svn.apache.org/viewvc?rev=657975view=rev Log: WICKET-1428: move initialization code from constructor to init() Modified: wicket/branches/wicket-1.3.x/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/linkomatic/LinkomaticApplication.java Modified: wicket/branches/wicket-1.3.x/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/linkomatic/LinkomaticApplication.java URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.3.x/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/linkomatic/LinkomaticApplication.java?rev=657975r1=657974r2=657975view=diff == --- wicket/branches/wicket-1.3.x/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/linkomatic/LinkomaticApplication.java (original) +++ wicket/branches/wicket-1.3.x/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/linkomatic/LinkomaticApplication.java Mon May 19 14:02:54 2008 @@ -28,16 +28,9 @@ public class LinkomaticApplication extends WicketExampleApplication { /** -* Constructor -*/ - public LinkomaticApplication() - { - getSharedResources().add(cancelButton, new DefaultButtonImageResource(Cancel)); - } - - /** * @see org.apache.wicket.Application#getHomePage() */ + @Override public Class getHomePage() { return Home.class; @@ -46,8 +39,10 @@ /** * @see org.apache.wicket.protocol.http.WebApplication#init() */ + @Override protected void init() { + getSharedResources().add(cancelButton, new DefaultButtonImageResource(Cancel)); // log host name and server time in the browser's status bar getRequestCycleSettings().addResponseFilter(new ServerHostNameAndTimeFilter()); }
svn commit: r657977 - /wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/source/SourcesPage.java
Author: gseitz Date: Mon May 19 14:06:36 2008 New Revision: 657977 URL: http://svn.apache.org/viewvc?rev=657977view=rev Log: comment the uncommented code again Modified: wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/source/SourcesPage.java Modified: wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/source/SourcesPage.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/source/SourcesPage.java?rev=657977r1=657976r2=657977view=diff == --- wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/source/SourcesPage.java (original) +++ wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/source/SourcesPage.java Mon May 19 14:06:36 2008 @@ -167,31 +167,31 @@ if (resources.isEmpty()) { get(page); - PackageName name = PackageName.forClass(page); - ClassLoader loader = page.getClassLoader(); - String path = Strings.replaceAll(name.getName(), ., /).toString(); - try - { - // gives the urls for each place where the package - // path could be found. There could be multiple - // jar files containing the same package, so each - // jar file has its own url. - - EnumerationURL urls = loader.getResources(path); - while (urls.hasMoreElements()) - { - URL url = urls.nextElement(); - - // the url points to the directory structure - // embedded in the classpath. - - getPackageContents(url); - } - } - catch (IOException e) - { - log.error(Unable to read resource for: + path, e); - } +// PackageName name = PackageName.forClass(page); +// ClassLoader loader = page.getClassLoader(); +// String path = Strings.replaceAll(name.getName(), ., /).toString(); +// try +// { +// // gives the urls for each place where the package +// // path could be found. There could be multiple +// // jar files containing the same package, so each +// // jar file has its own url. +// +// EnumerationURL urls = loader.getResources(path); +// while (urls.hasMoreElements()) +// { +// URL url = urls.nextElement(); +// +// // the url points to the directory structure +// // embedded in the classpath. +// +// getPackageContents(url); +// } +// } +// catch (IOException e) +// { +// log.error(Unable to read resource for: + path, e); +// } } return resources; }
svn commit: r657981 - in /wicket/trunk/wicket-auth-roles/src: main/java/org/apache/wicket/authorization/strategies/role/metadata/ test/java/org/apache/wicket/authorization/strategies/role/metadata/
Author: gseitz Date: Mon May 19 14:09:43 2008 New Revision: 657981 URL: http://svn.apache.org/viewvc?rev=657981view=rev Log: losen generics to fix compilation errors with javac Modified: wicket/trunk/wicket-auth-roles/src/main/java/org/apache/wicket/authorization/strategies/role/metadata/InstantiationPermissions.java wicket/trunk/wicket-auth-roles/src/test/java/org/apache/wicket/authorization/strategies/role/metadata/InstantiationPermissionsTest.java Modified: wicket/trunk/wicket-auth-roles/src/main/java/org/apache/wicket/authorization/strategies/role/metadata/InstantiationPermissions.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-auth-roles/src/main/java/org/apache/wicket/authorization/strategies/role/metadata/InstantiationPermissions.java?rev=657981r1=657980r2=657981view=diff == --- wicket/trunk/wicket-auth-roles/src/main/java/org/apache/wicket/authorization/strategies/role/metadata/InstantiationPermissions.java (original) +++ wicket/trunk/wicket-auth-roles/src/main/java/org/apache/wicket/authorization/strategies/role/metadata/InstantiationPermissions.java Mon May 19 14:09:43 2008 @@ -38,7 +38,7 @@ private static final long serialVersionUID = 1L; /** Holds roles objects for component classes */ - private final MapClass? extends Component?, Roles rolesForComponentClass = new HashMapClass? extends Component?, Roles(); + private final MapClass? extends Component, Roles rolesForComponentClass = new HashMapClass? extends Component, Roles(); /** * Gives the given role permission to instantiate the given class. @@ -48,7 +48,7 @@ * @param rolesToAdd *The roles to add */ - public final void authorize(final Class? extends Component? componentClass, + public final void authorize(final Class? extends Component componentClass, final Roles rolesToAdd) { if (componentClass == null) @@ -78,7 +78,7 @@ * @param componentClass *The component class */ - public final void authorizeAll(final Class? extends Component? componentClass) + public final void authorizeAll(final Class? extends Component componentClass) { if (componentClass == null) { @@ -96,7 +96,7 @@ * @return the roles that have a binding with the given component class, or null if no entries * are found */ - public Roles authorizedRoles(final Class? extends Component? componentClass) + public Roles authorizedRoles(final Class? extends Component componentClass) { if (componentClass == null) { @@ -114,7 +114,7 @@ * @param rolesToRemove *The role to deny */ - public final void unauthorize(final Class? extends Component? componentClass, + public final void unauthorize(final Class? extends Component componentClass, final Roles rolesToRemove) { if (componentClass == null) @@ -150,7 +150,7 @@ /** * @return gets map with roles objects for a component classes */ - protected final MapClass? extends Component?, Roles getRolesForComponentClass() + protected final MapClass? extends Component, Roles getRolesForComponentClass() { return rolesForComponentClass; } Modified: wicket/trunk/wicket-auth-roles/src/test/java/org/apache/wicket/authorization/strategies/role/metadata/InstantiationPermissionsTest.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-auth-roles/src/test/java/org/apache/wicket/authorization/strategies/role/metadata/InstantiationPermissionsTest.java?rev=657981r1=657980r2=657981view=diff == --- wicket/trunk/wicket-auth-roles/src/test/java/org/apache/wicket/authorization/strategies/role/metadata/InstantiationPermissionsTest.java (original) +++ wicket/trunk/wicket-auth-roles/src/test/java/org/apache/wicket/authorization/strategies/role/metadata/InstantiationPermissionsTest.java Mon May 19 14:09:43 2008 @@ -55,18 +55,17 @@ * * @throws Exception */ - @SuppressWarnings(unchecked) public void testAdd1() throws Exception { InstantiationPermissions permissions = new InstantiationPermissions(); - permissions.authorize((Class? extends Component?)Page.class, new Roles(jonathan)); - permissions.authorize((Class? extends Component?)Page.class, new Roles(johan)); - permissions.authorize((Class? extends Component?)Page.class, new Roles(maurice)); - permissions.authorize((Class? extends Component?)Page.class, new Roles(eelco)); + permissions.authorize(Page.class
svn commit: r658001 - in /wicket/trunk/wicket-auth-roles/src/main/java/org/apache/wicket/authorization/strategies/role: annotations/ metadata/
Author: gseitz Date: Mon May 19 14:58:35 2008 New Revision: 658001 URL: http://svn.apache.org/viewvc?rev=658001view=rev Log: take this, javac! (aka another shot at generics that javac is able to process) Modified: wicket/trunk/wicket-auth-roles/src/main/java/org/apache/wicket/authorization/strategies/role/annotations/AnnotationsRoleAuthorizationStrategy.java wicket/trunk/wicket-auth-roles/src/main/java/org/apache/wicket/authorization/strategies/role/metadata/InstantiationPermissions.java wicket/trunk/wicket-auth-roles/src/main/java/org/apache/wicket/authorization/strategies/role/metadata/MetaDataRoleAuthorizationStrategy.java Modified: wicket/trunk/wicket-auth-roles/src/main/java/org/apache/wicket/authorization/strategies/role/annotations/AnnotationsRoleAuthorizationStrategy.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-auth-roles/src/main/java/org/apache/wicket/authorization/strategies/role/annotations/AnnotationsRoleAuthorizationStrategy.java?rev=658001r1=658000r2=658001view=diff == --- wicket/trunk/wicket-auth-roles/src/main/java/org/apache/wicket/authorization/strategies/role/annotations/AnnotationsRoleAuthorizationStrategy.java (original) +++ wicket/trunk/wicket-auth-roles/src/main/java/org/apache/wicket/authorization/strategies/role/annotations/AnnotationsRoleAuthorizationStrategy.java Mon May 19 14:58:35 2008 @@ -46,8 +46,7 @@ /** * @see org.apache.wicket.authorization.IAuthorizationStrategy#isInstantiationAuthorized(java.lang.Class) */ - @SuppressWarnings(unchecked) - public boolean isInstantiationAuthorized(final Class componentClass) + public T extends Component? boolean isInstantiationAuthorized(final ClassT componentClass) { // We are authorized unless we are found not to be boolean authorized = true; @@ -64,7 +63,7 @@ } // Check class annotation - final AuthorizeInstantiation classAnnotation = (AuthorizeInstantiation)componentClass.getAnnotation(AuthorizeInstantiation.class); + final AuthorizeInstantiation classAnnotation = componentClass.getAnnotation(AuthorizeInstantiation.class); if (classAnnotation != null) { // If roles are defined for the class, that overrides the package @@ -78,11 +77,10 @@ * @see org.apache.wicket.authorization.IAuthorizationStrategy#isActionAuthorized(org.apache.wicket.Component, * org.apache.wicket.authorization.Action) */ - @SuppressWarnings(unchecked) public boolean isActionAuthorized(final Component? component, final Action action) { // Get component's class - final Class? extends Component? componentClass = (Class? extends Component?)component.getClass(); + final Class? componentClass = component.getClass(); // Check for a single action if (!check(action, componentClass.getAnnotation(AuthorizeAction.class))) Modified: wicket/trunk/wicket-auth-roles/src/main/java/org/apache/wicket/authorization/strategies/role/metadata/InstantiationPermissions.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-auth-roles/src/main/java/org/apache/wicket/authorization/strategies/role/metadata/InstantiationPermissions.java?rev=658001r1=658000r2=658001view=diff == --- wicket/trunk/wicket-auth-roles/src/main/java/org/apache/wicket/authorization/strategies/role/metadata/InstantiationPermissions.java (original) +++ wicket/trunk/wicket-auth-roles/src/main/java/org/apache/wicket/authorization/strategies/role/metadata/InstantiationPermissions.java Mon May 19 14:58:35 2008 @@ -38,17 +38,18 @@ private static final long serialVersionUID = 1L; /** Holds roles objects for component classes */ - private final MapClass? extends Component, Roles rolesForComponentClass = new HashMapClass? extends Component, Roles(); + private final MapClass? extends Component?, Roles rolesForComponentClass = new HashMapClass? extends Component?, Roles(); /** * Gives the given role permission to instantiate the given class. * +* @param T * @param componentClass *The component class * @param rolesToAdd *The roles to add */ - public final void authorize(final Class? extends Component componentClass, + public final T extends Component? void authorize(final ClassT componentClass, final Roles rolesToAdd) { if (componentClass == null) @@ -75,10 +76,11 @@ * a role was previously authorized for that class. If no roles where previously authorized the * effect of the unauthorize
svn commit: r658004 - in /wicket/trunk: wicket-examples/src/main/java/org/apache/wicket/examples/signin/ wicket-examples/src/main/java/org/apache/wicket/examples/signin2/ wicket/src/main/java/org/apac
Author: gseitz Date: Mon May 19 15:19:46 2008 New Revision: 658004 URL: http://svn.apache.org/viewvc?rev=658004view=rev Log: apply changes due to different IAuthorizationStrategy signature Modified: wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/signin/SignInApplication.java wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/signin2/SignIn2Application.java wicket/trunk/wicket/src/main/java/org/apache/wicket/authorization/IAuthorizationStrategy.java wicket/trunk/wicket/src/main/java/org/apache/wicket/authorization/strategies/CompoundAuthorizationStrategy.java wicket/trunk/wicket/src/main/java/org/apache/wicket/authorization/strategies/action/ActionAuthorizationStrategy.java wicket/trunk/wicket/src/main/java/org/apache/wicket/authorization/strategies/page/AbstractPageAuthorizationStrategy.java wicket/trunk/wicket/src/main/java/org/apache/wicket/authorization/strategies/page/SimplePageAuthorizationStrategy.java wicket/trunk/wicket/src/test/java/org/apache/wicket/ajax/AjaxBehaviorEnabledTest.java wicket/trunk/wicket/src/test/java/org/apache/wicket/redirect/intercept/InterceptTest.java Modified: wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/signin/SignInApplication.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/signin/SignInApplication.java?rev=658004r1=658003r2=658004view=diff == --- wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/signin/SignInApplication.java (original) +++ wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/signin/SignInApplication.java Mon May 19 15:19:46 2008 @@ -72,7 +72,8 @@ return true; } - public boolean isInstantiationAuthorized(Class? extends Component? componentClass) + public T extends Component? boolean isInstantiationAuthorized( + ClassT componentClass) { if (AuthenticatedWebPage.class.isAssignableFrom(componentClass)) { Modified: wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/signin2/SignIn2Application.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/signin2/SignIn2Application.java?rev=658004r1=658003r2=658004view=diff == --- wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/signin2/SignIn2Application.java (original) +++ wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/signin2/SignIn2Application.java Mon May 19 15:19:46 2008 @@ -80,7 +80,8 @@ return true; } - public boolean isInstantiationAuthorized(Class? extends Component? componentClass) + public T extends Component? boolean isInstantiationAuthorized( + ClassT componentClass) { if (AuthenticatedWebPage.class.isAssignableFrom(componentClass)) { Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/authorization/IAuthorizationStrategy.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/authorization/IAuthorizationStrategy.java?rev=658004r1=658003r2=658004view=diff == --- wicket/trunk/wicket/src/main/java/org/apache/wicket/authorization/IAuthorizationStrategy.java (original) +++ wicket/trunk/wicket/src/main/java/org/apache/wicket/authorization/IAuthorizationStrategy.java Mon May 19 15:19:46 2008 @@ -40,7 +40,7 @@ /** * @see org.apache.wicket.authorization.IAuthorizationStrategy#isInstantiationAuthorized(java.lang.Class) */ - public boolean isInstantiationAuthorized(final Class? extends Component? c) + public T extends Component? boolean isInstantiationAuthorized(final ClassT c) { return true; } @@ -66,11 +66,13 @@ * [EMAIL PROTECTED] org.apache.wicket.RestartResponseAtInterceptPageException} in your implementation of * this method. * +* @param T +* * @param componentClass *The component class to check * @return Whether the given component may be created */ - boolean isInstantiationAuthorized(Class? extends Component? componentClass); + T extends Component? boolean isInstantiationAuthorized(ClassT componentClass
svn commit: r657625 - in /wicket/trunk/wicket-spring/src: main/java/org/apache/wicket/spring/ main/java/org/apache/wicket/spring/injection/annot/ main/java/org/apache/wicket/spring/injection/annot/tes
Author: gseitz Date: Sun May 18 13:11:43 2008 New Revision: 657625 URL: http://svn.apache.org/viewvc?rev=657625view=rev Log: cleanup Modified: wicket/trunk/wicket-spring/src/main/java/org/apache/wicket/spring/SpringBeanLocator.java wicket/trunk/wicket-spring/src/main/java/org/apache/wicket/spring/SpringWebApplication.java wicket/trunk/wicket-spring/src/main/java/org/apache/wicket/spring/SpringWebApplicationFactory.java wicket/trunk/wicket-spring/src/main/java/org/apache/wicket/spring/injection/annot/AnnotProxyFieldValueFactory.java wicket/trunk/wicket-spring/src/main/java/org/apache/wicket/spring/injection/annot/AnnotSpringInjector.java wicket/trunk/wicket-spring/src/main/java/org/apache/wicket/spring/injection/annot/AnnotSpringWebApplication.java wicket/trunk/wicket-spring/src/main/java/org/apache/wicket/spring/injection/annot/SpringComponentInjector.java wicket/trunk/wicket-spring/src/main/java/org/apache/wicket/spring/injection/annot/test/AnnotApplicationContextMock.java wicket/trunk/wicket-spring/src/main/java/org/apache/wicket/spring/test/ApplicationContextMock.java wicket/trunk/wicket-spring/src/main/java/org/apache/wicket/spring/test/SpringContextLocatorMock.java wicket/trunk/wicket-spring/src/test/java/org/apache/wicket/spring/Bean.java wicket/trunk/wicket-spring/src/test/java/org/apache/wicket/util/license/ApacheLicenceHeaderTest.java Modified: wicket/trunk/wicket-spring/src/main/java/org/apache/wicket/spring/SpringBeanLocator.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-spring/src/main/java/org/apache/wicket/spring/SpringBeanLocator.java?rev=657625r1=657624r2=657625view=diff == --- wicket/trunk/wicket-spring/src/main/java/org/apache/wicket/spring/SpringBeanLocator.java (original) +++ wicket/trunk/wicket-spring/src/main/java/org/apache/wicket/spring/SpringBeanLocator.java Sun May 18 13:11:43 2008 @@ -36,6 +36,8 @@ */ public class SpringBeanLocator implements IProxyTargetLocator { + private static final long serialVersionUID = 1L; + // Weak reference so we don't hold up WebApp classloader garbage collection. private transient WeakReferenceClass ? beanTypeCache; @@ -51,9 +53,9 @@ * Constructor * * @param beanType -*bean class +* bean class * @param locator -*spring context locator +* spring context locator */ public SpringBeanLocator(Class ? beanType, ISpringContextLocator locator) { @@ -64,11 +66,11 @@ * Constructor * * @param beanName -*bean name +* bean name * @param beanType -*bean class +* bean class * @param locator -*spring context locator +* spring context locator */ public SpringBeanLocator(String beanName, Class ? beanType, ISpringContextLocator locator) { @@ -93,9 +95,9 @@ * or more then one beans are found. * * @param ctx -*spring application context +* spring application context * @param clazz -*bean class +* bean class * @throws IllegalStateException * @return spring name of the bean */ @@ -124,7 +126,7 @@ /** * @return returns whether the bean (the locator is supposed to istantiate) is a singleton or -* not +* not */ public boolean isSingletonBean() { @@ -209,10 +211,10 @@ * are found. * * @param ctx -*spring application context +* spring application context * * @param clazz -*bean class +* bean class * @throws IllegalStateException * @return found bean */ @@ -225,12 +227,12 @@ * Looks up a bean by its name and class. Throws IllegalState exception if bean not found. * * @param ctx -*spring application context +* spring application context * * @param name -*bean name +* bean name * @param clazz -*bean class +* bean class * @throws IllegalStateException * @return found bean */ Modified: wicket/trunk/wicket-spring/src/main/java/org/apache/wicket/spring/SpringWebApplication.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-spring/src/main/java/org/apache/wicket/spring/SpringWebApplication.java?rev=657625r1=657624r2=657625view=diff
svn commit: r657349 - in /wicket/branches/wicket-1.3.x: jdk-1.4/wicket/pom.xml pom.xml
Author: gseitz Date: Sat May 17 05:50:02 2008 New Revision: 657349 URL: http://svn.apache.org/viewvc?rev=657349view=rev Log: WICKET-1641: provide OSGi metadata Modified: wicket/branches/wicket-1.3.x/jdk-1.4/wicket/pom.xml wicket/branches/wicket-1.3.x/pom.xml Modified: wicket/branches/wicket-1.3.x/jdk-1.4/wicket/pom.xml URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.3.x/jdk-1.4/wicket/pom.xml?rev=657349r1=657348r2=657349view=diff == --- wicket/branches/wicket-1.3.x/jdk-1.4/wicket/pom.xml (original) +++ wicket/branches/wicket-1.3.x/jdk-1.4/wicket/pom.xml Sat May 17 05:50:02 2008 @@ -61,17 +61,7 @@ configuration licenseLocation${basedir}/../../../common/lib/clover.license/licenseLocation /configuration - /plugin - plugin - artifactIdmaven-jar-plugin/artifactId - executions - execution - goals - goaltest-jar/goal - /goals - /execution - /executions - /plugin + /plugin /plugins /build /project Modified: wicket/branches/wicket-1.3.x/pom.xml URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.3.x/pom.xml?rev=657349r1=657348r2=657349view=diff == --- wicket/branches/wicket-1.3.x/pom.xml (original) +++ wicket/branches/wicket-1.3.x/pom.xml Sat May 17 05:50:02 2008 @@ -101,6 +101,11 @@ artifactIdmaven-surefire-plugin/artifactId inheritedtrue/inherited /plugin + plugin + groupIdorg.apache.felix/groupId + artifactIdmaven-bundle-plugin/artifactId + inheritedtrue/inherited + /plugin /plugins /build /profile @@ -215,6 +220,11 @@ artifactIdmaven-surefire-plugin/artifactId inheritedtrue/inherited /plugin + plugin + groupIdorg.apache.felix/groupId + artifactIdmaven-bundle-plugin/artifactId + inheritedtrue/inherited + /plugin /plugins /build distributionManagement @@ -238,7 +248,7 @@ modulejdk-1.5/module modulearchetypes/quickstart/module moduletesting/wicket-threadtest/module - /modules + /modules /profile /profiles @@ -615,14 +625,14 @@ inheritedtrue/inherited /plugin plugin + groupIdorg.apache.maven.plugins/groupId artifactIdmaven-jar-plugin/artifactId - executions - execution - goals - goaltest-jar/goal - /goals - /execution - /executions + inheritedtrue/inherited + /plugin +plugin +groupIdorg.apache.felix/groupId +artifactIdmaven-bundle-plugin/artifactId +inheritedtrue/inherited /plugin /plugins @@ -675,8 +685,9 @@ plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-jar-plugin/artifactId - version2.1/version + version2.2/version configuration
svn commit: r657359 - /wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/MarkupFragmentFinder.java
Author: gseitz Date: Sat May 17 07:05:44 2008 New Revision: 657359 URL: http://svn.apache.org/viewvc?rev=657359view=rev Log: WICKET-1560 Modified: wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/MarkupFragmentFinder.java Modified: wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/MarkupFragmentFinder.java URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/MarkupFragmentFinder.java?rev=657359r1=657358r2=657359view=diff == --- wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/MarkupFragmentFinder.java (original) +++ wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/MarkupFragmentFinder.java Sat May 17 07:05:44 2008 @@ -21,6 +21,7 @@ import org.apache.wicket.markup.MarkupStream; import org.apache.wicket.markup.html.border.Border; import org.apache.wicket.markup.html.panel.Fragment; +import org.apache.wicket.markup.repeater.AbstractRepeater; /** * Responding to an AJAX request requires that we position the markup stream at the component @@ -78,6 +79,16 @@ // Ok, found it return markupStream; } + else + { + // WICKET-1560 + Component parent = component.getParent(); + if (parent instanceof AbstractRepeater id != null + id.equals(parent.getId())) + { + return markupStream; + } + } } } catch (IndexOutOfBoundsException ex) @@ -100,8 +111,7 @@ if (parentWithAssociatedMarkup instanceof Fragment) { - markupStream = ((Fragment)parentWithAssociatedMarkup).findComponentIndex(component - .getId()); + markupStream = ((Fragment)parentWithAssociatedMarkup).findComponentIndex(component.getId()); return markupStream; } @@ -110,14 +120,13 @@ // ... if (parentWithAssociatedMarkup instanceof Border) { - parentWithAssociatedMarkup = parentWithAssociatedMarkup - .findParentWithAssociatedMarkup(); + parentWithAssociatedMarkup = parentWithAssociatedMarkup.findParentWithAssociatedMarkup(); } else { throw new WicketRuntimeException( - Unable to find the markup for the component. That may be due to transparent containers or components implementing IComponentResolver: + - component.toString()); + Unable to find the markup for the component. That may be due to transparent containers or components implementing IComponentResolver: + + component.toString()); } // Not found, reset the stream @@ -133,11 +142,10 @@ * @return the relative path */ private String getComponentRelativePath(final Component component, - final MarkupContainer parentWithAssociatedMarkup) + final MarkupContainer parentWithAssociatedMarkup) { final String componentPath = component.getParent().getPageRelativePath(); - final String parentWithAssociatedMarkupPath = parentWithAssociatedMarkup - .getPageRelativePath(); + final String parentWithAssociatedMarkupPath = parentWithAssociatedMarkup.getPageRelativePath(); String relativePath = componentPath.substring(parentWithAssociatedMarkupPath.length()); if (relativePath.startsWith(:)) {
svn commit: r657411 - /wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/link/PopupSettings.java
Author: gseitz Date: Sat May 17 11:16:17 2008 New Revision: 657411 URL: http://svn.apache.org/viewvc?rev=657411view=rev Log: WICKET-1541: replace all non word characters in windowtitle with _ Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/link/PopupSettings.java Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/link/PopupSettings.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/link/PopupSettings.java?rev=657411r1=657410r2=657411view=diff == --- wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/link/PopupSettings.java (original) +++ wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/link/PopupSettings.java Sat May 17 11:16:17 2008 @@ -102,11 +102,11 @@ /** * Construct. If you are not using these popup settings with an external link - in which case we -* don't need to know about a page map - you should use one of the constructors with a -* [EMAIL PROTECTED] PageMap} argument. Typically, you should put any popup in a separate page map as -* Wicket holds references to a limited number of pages/ versions only. If you don't put your -* popup in a separate page map, the user might get page expired exceptions when getting back to -* the main window again. +* don't need to know about a page map - you should use one of the constructors with a [EMAIL PROTECTED] +* PageMap} argument. Typically, you should put any popup in a separate page map as Wicket holds +* references to a limited number of pages/ versions only. If you don't put your popup in a +* separate page map, the user might get page expired exceptions when getting back to the main +* window again. */ public PopupSettings() { @@ -116,44 +116,46 @@ * Construct. * * @param displayFlags -*Display flags +* Display flags */ public PopupSettings(final int displayFlags) { - this.displayFlags = displayFlags; + this(null, displayFlags); } /** * Construct. * * @param pagemap -*The pagemap where this popup must be in. Typically, you should put any popup in a -*separate page map as Wicket holds references to a limited number of pages/ -*versions only. If you don't put your popup in a separate page map, the user might -*get page expired exceptions when getting back to the main window again. +* The pagemap where this popup must be in. Typically, you should put any popup in a +* separate page map as Wicket holds references to a limited number of pages/ versions +* only. If you don't put your popup in a separate page map, the user might get page +* expired exceptions when getting back to the main window again. */ public PopupSettings(IPageMap pagemap) { - pageMapName = pagemap.getName(); - windowName = pageMapName; + this(pagemap, 0); } /** * Construct. * * @param pagemap -*The pagemap where this popup must be in. Typically, you should put any popup in a -*separate page map as Wicket holds references to a limited number of pages/ -*versions only. If you don't put your popup in a separate page map, the user might -*get page expired exceptions when getting back to the main window again. +* The pagemap where this popup must be in. Typically, you should put any popup in a +* separate page map as Wicket holds references to a limited number of pages/ versions +* only. If you don't put your popup in a separate page map, the user might get page +* expired exceptions when getting back to the main window again. * @param displayFlags -*Display flags +* Display flags */ public PopupSettings(IPageMap pagemap, final int displayFlags) { this.displayFlags = displayFlags; - pageMapName = pagemap.getName(); - windowName = pageMapName; + if (pagemap != null) + { + pageMapName = pagemap.getName(); + windowName = pageMapName; + } } /** @@ -172,7 +174,7 @@ else { // Fix for IE bug. - windowTitle = windowTitle.replace
svn commit: r657412 - /wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/link/PopupSettings.java
Author: gseitz Date: Sat May 17 11:17:46 2008 New Revision: 657412 URL: http://svn.apache.org/viewvc?rev=657412view=rev Log: WICKET-1541: replace all non word characters in windowtitle with _ Modified: wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/link/PopupSettings.java Modified: wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/link/PopupSettings.java URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/link/PopupSettings.java?rev=657412r1=657411r2=657412view=diff == --- wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/link/PopupSettings.java (original) +++ wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/link/PopupSettings.java Sat May 17 11:17:46 2008 @@ -102,11 +102,11 @@ /** * Construct. If you are not using these popup settings with an external link - in which case we -* don't need to know about a page map - you should use one of the constructors with a -* [EMAIL PROTECTED] PageMap} argument. Typically, you should put any popup in a separate page map as -* Wicket holds references to a limited number of pages/ versions only. If you don't put your -* popup in a separate page map, the user might get page expired exceptions when getting back to -* the main window again. +* don't need to know about a page map - you should use one of the constructors with a [EMAIL PROTECTED] +* PageMap} argument. Typically, you should put any popup in a separate page map as Wicket holds +* references to a limited number of pages/ versions only. If you don't put your popup in a +* separate page map, the user might get page expired exceptions when getting back to the main +* window again. */ public PopupSettings() { @@ -116,44 +116,46 @@ * Construct. * * @param displayFlags -*Display flags +* Display flags */ public PopupSettings(final int displayFlags) { - this.displayFlags = displayFlags; + this(null, displayFlags); } /** * Construct. * * @param pagemap -*The pagemap where this popup must be in. Typically, you should put any popup in a -*separate page map as Wicket holds references to a limited number of pages/ -*versions only. If you don't put your popup in a separate page map, the user might -*get page expired exceptions when getting back to the main window again. +* The pagemap where this popup must be in. Typically, you should put any popup in a +* separate page map as Wicket holds references to a limited number of pages/ versions +* only. If you don't put your popup in a separate page map, the user might get page +* expired exceptions when getting back to the main window again. */ public PopupSettings(IPageMap pagemap) { - pageMapName = pagemap.getName(); - windowName = pageMapName; + this(pagemap, 0); } /** * Construct. * * @param pagemap -*The pagemap where this popup must be in. Typically, you should put any popup in a -*separate page map as Wicket holds references to a limited number of pages/ -*versions only. If you don't put your popup in a separate page map, the user might -*get page expired exceptions when getting back to the main window again. +* The pagemap where this popup must be in. Typically, you should put any popup in a +* separate page map as Wicket holds references to a limited number of pages/ versions +* only. If you don't put your popup in a separate page map, the user might get page +* expired exceptions when getting back to the main window again. * @param displayFlags -*Display flags +* Display flags */ public PopupSettings(IPageMap pagemap, final int displayFlags) { this.displayFlags = displayFlags; - pageMapName = pagemap.getName(); - windowName = pageMapName; + if (pagemap != null) + { + pageMapName = pagemap.getName(); + windowName = pageMapName; + } } /** @@ -172,11 +174,11 @@ else
svn commit: r656958 - in /wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html: basic/LinkParser.java basic/SmartLinkLabel.java basic/SmartLinkMultiLineLabel.java capt
Author: gseitz Date: Fri May 16 00:57:23 2008 New Revision: 656958 URL: http://svn.apache.org/viewvc?rev=656958view=rev Log: generics Modified: wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/basic/LinkParser.java wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/basic/SmartLinkLabel.java wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/basic/SmartLinkMultiLineLabel.java wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/captcha/CaptchaImageResource.java Modified: wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/basic/LinkParser.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/basic/LinkParser.java?rev=656958r1=656957r2=656958view=diff == --- wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/basic/LinkParser.java (original) +++ wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/basic/LinkParser.java Fri May 16 00:57:23 2008 @@ -31,16 +31,16 @@ */ public class LinkParser implements ILinkParser { - private final Map renderStrategies = new HashMap(); + private final MapString, ILinkRenderStrategy renderStrategies = new HashMapString, ILinkRenderStrategy(); /** * Adds a render strategy to the parser. * * @param pattern -*the pattern to which the provided coderenderStrategy/code should be applied. +* the pattern to which the provided coderenderStrategy/code should be applied. * @param renderStrategy -*the codeILinkRenderStrategy/code which is applied to the text found by the -*provided codepattern/code. +* the codeILinkRenderStrategy/code which is applied to the text found by the provided +* codepattern/code. * @return this codeILinkParser/code. */ public ILinkParser addLinkRenderStrategy(String pattern, ILinkRenderStrategy renderStrategy) @@ -60,11 +60,11 @@ } String work = text; - Iterator iter = renderStrategies.keySet().iterator(); + IteratorString iter = renderStrategies.keySet().iterator(); while (iter.hasNext()) { - String pattern = (String) iter.next(); - ILinkRenderStrategy strategy = (ILinkRenderStrategy)renderStrategies.get(pattern); + String pattern = iter.next(); + ILinkRenderStrategy strategy = renderStrategies.get(pattern); Matcher matcher = Pattern.compile(pattern, Pattern.DOTALL).matcher(work); StringBuffer buffer = new StringBuffer(); Modified: wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/basic/SmartLinkLabel.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/basic/SmartLinkLabel.java?rev=656958r1=656957r2=656958view=diff == --- wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/basic/SmartLinkLabel.java (original) +++ wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/basic/SmartLinkLabel.java Fri May 16 00:57:23 2008 @@ -20,6 +20,7 @@ import org.apache.wicket.markup.MarkupStream; import org.apache.wicket.markup.html.basic.Label; import org.apache.wicket.model.IModel; +import org.apache.wicket.model.Model; /** @@ -35,22 +36,23 @@ * * @author Juergen Donnerstag */ -public class SmartLinkLabel extends Label +public class SmartLinkLabelT extends LabelT { private static final long serialVersionUID = 1L; /** * @see Label#Label(String, String) */ + @SuppressWarnings(unchecked) public SmartLinkLabel(String name, String label) { - super(name, label); + this(name, new Model(label)); } /** * @see Label#Label(String, IModel) */ - public SmartLinkLabel(String name, IModel model) + public SmartLinkLabel(String name, IModelT model) { super(name, model); } @@ -65,8 +67,9 @@ /** * @see org.apache.wicket.Component#onComponentTagBody(org.apache.wicket.markup.MarkupStream, -* org.apache.wicket.markup.ComponentTag) +* org.apache.wicket.markup.ComponentTag) */ + @Override protected void onComponentTagBody(final MarkupStream
svn commit: r657142 - /wicket/trunk/testing/wicket-threadtest/src/main/java/org/apache/wicket/threadtest/App1Test3.java
Author: gseitz Date: Fri May 16 10:32:23 2008 New Revision: 657142 URL: http://svn.apache.org/viewvc?rev=657142view=rev Log: added missing parts (::) of the url Modified: wicket/trunk/testing/wicket-threadtest/src/main/java/org/apache/wicket/threadtest/App1Test3.java Modified: wicket/trunk/testing/wicket-threadtest/src/main/java/org/apache/wicket/threadtest/App1Test3.java URL: http://svn.apache.org/viewvc/wicket/trunk/testing/wicket-threadtest/src/main/java/org/apache/wicket/threadtest/App1Test3.java?rev=657142r1=657141r2=657142view=diff == --- wicket/trunk/testing/wicket-threadtest/src/main/java/org/apache/wicket/threadtest/App1Test3.java (original) +++ wicket/trunk/testing/wicket-threadtest/src/main/java/org/apache/wicket/threadtest/App1Test3.java Fri May 16 10:32:23 2008 @@ -41,12 +41,11 @@ { ListString gets = new ArrayListString(); - gets - .add(/app1?wicket:bookmarkablePage=one:org.apache.wicket.threadtest.apps.app1.ResourceTestPage); + gets.add(/app1?wicket:bookmarkablePage=one:org.apache.wicket.threadtest.apps.app1.ResourceTestPage); for (int i = 0; i ResourceTestPage.IMAGES_PER_PAGE; i++) { - gets.add(/app1?wicket:interface=one:${iteration}:listView: + i - + :image::IResourceListener); + gets.add(/app1?wicket:interface=one:${iteration}:listView: + i + + :image::IResourceListener::); } SimpleGetCommand getCmd = new SimpleGetCommand(gets, 5);
svn commit: r656434 - in /wicket/trunk/wicket/src/main/java/org/apache/wicket/markup: ComponentTag.java parser/filter/HtmlHandler.java parser/filter/TagTypeHandler.java parser/filter/WicketLinkTagHand
Author: gseitz Date: Wed May 14 14:06:51 2008 New Revision: 656434 URL: http://svn.apache.org/viewvc?rev=656434view=rev Log: generics cleanup Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/ComponentTag.java wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/parser/filter/HtmlHandler.java wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/parser/filter/TagTypeHandler.java wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/parser/filter/WicketLinkTagHandler.java Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/ComponentTag.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/ComponentTag.java?rev=656434r1=656433r2=656434view=diff == --- wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/ComponentTag.java (original) +++ wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/ComponentTag.java Wed May 14 14:06:51 2008 @@ -18,7 +18,6 @@ import java.lang.ref.WeakReference; import java.util.ArrayList; -import java.util.Collection; import java.util.Collections; import java.util.HashMap; import java.util.Iterator; @@ -90,7 +89,7 @@ * about the tags origin is lost. In some cases like wicket:head and wicket:link this * information however is required. */ - private WeakReferenceClass ? extends Component ? markupClassRef = null; + private WeakReferenceClass? extends Component? markupClassRef = null; /** * Tags which are detected to have only an open tag, which is allowed with some HTML tags like @@ -109,9 +108,9 @@ * based on this XmlTag. * * @param name -*The name of html tag +* The name of html tag * @param type -*The type of tag +* The type of tag */ public ComponentTag(final String name, final XmlTag.Type type) { @@ -125,7 +124,7 @@ * Construct. * * @param tag -*The underlying xml tag +* The underlying xml tag */ public ComponentTag(final XmlTag tag) { @@ -171,14 +170,14 @@ return lst.iterator(); } -return Collections.unmodifiableCollection(behaviors).iterator(); + return Collections.unmodifiableCollection(behaviors).iterator(); } /** * Gets whether this tag closes the provided open tag. * * @param open -*The open tag +* The open tag * @return True if this tag closes the given open tag */ @Override @@ -197,7 +196,7 @@ * bookmarkable URLs. * * @param autolink -*enable/disable automatic href conversion +* enable/disable automatic href conversion */ public final void enableAutolink(final boolean autolink) { @@ -282,7 +281,7 @@ /** * @see org.apache.wicket.markup.parser.XmlTag#getString(String) * @param key -*The key +* The key * @return The string value */ public final CharSequence getString(String key) @@ -332,7 +331,7 @@ /** * @param id -*Required component id +* Required component id * @return True if this tag is an open tag with the given component name * @see org.apache.wicket.markup.parser.XmlTag#isOpen() */ @@ -352,7 +351,7 @@ /** * @param id -*Required component id +* Required component id * @return True if this tag is an openclose tag with the given component id * @see org.apache.wicket.markup.parser.XmlTag#isOpenClose() */ @@ -401,11 +400,11 @@ } /** -* Copies all internal properties from this tag to codedest/code. This is basically -* cloning without instance creation. +* Copies all internal properties from this tag to codedest/code. This is basically cloning +* without instance creation. * * @param dest -*tag whose properties will be set +* tag whose properties will be set */ void copyPropertiesTo(final ComponentTag dest) { @@ -427,9 +426,9 @@ /** * @see org.apache.wicket.markup.parser.XmlTag#put(String, boolean) * @param key -*The key +* The key * @param value -*The value +* The value */ public final void put(final String key, final boolean value) { @@ -439,9 +438,9
svn commit: r656050 - in /wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html: panel/ resources/
Author: gseitz Date: Tue May 13 16:09:55 2008 New Revision: 656050 URL: http://svn.apache.org/viewvc?rev=656050view=rev Log: generics Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/panel/ComponentFeedbackPanel.java wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/panel/EmptyPanel.java wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/panel/FeedbackPanel.java wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/resources/CompressedPackageResourceReference.java wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/resources/CompressedResourceReference.java wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/resources/JavaScriptReference.java wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/resources/JavascriptResourceReference.java wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/resources/PackagedResourceReference.java wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/resources/StyleSheetReference.java Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/panel/ComponentFeedbackPanel.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/panel/ComponentFeedbackPanel.java?rev=656050r1=656049r2=656050view=diff == --- wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/panel/ComponentFeedbackPanel.java (original) +++ wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/panel/ComponentFeedbackPanel.java Tue May 13 16:09:55 2008 @@ -35,11 +35,11 @@ * Constructor. * * @param id -*the component id. +* the component id. * @param filter -*the component for which the messages need to be filtered. +* the component for which the messages need to be filtered. */ - public ComponentFeedbackPanel(String id, Component filter) + public ComponentFeedbackPanel(String id, Component? filter) { super(id, new ComponentFeedbackMessageFilter(filter)); } Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/panel/EmptyPanel.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/panel/EmptyPanel.java?rev=656050r1=656049r2=656050view=diff == --- wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/panel/EmptyPanel.java (original) +++ wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/panel/EmptyPanel.java Tue May 13 16:09:55 2008 @@ -22,7 +22,7 @@ * Panel that does absolutely nothing and that can be used to display an empty block. If you need to * conditionally display markup, use a [EMAIL PROTECTED] WebMarkupContainer} directly. */ -public final class EmptyPanel extends Panel +public final class EmptyPanel extends PanelVoid { private static final long serialVersionUID = 1L; @@ -30,7 +30,7 @@ * Construct. * * @param id -*component id +* component id */ public EmptyPanel(String id) { Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/panel/FeedbackPanel.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/panel/FeedbackPanel.java?rev=656050r1=656049r2=656050view=diff == --- wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/panel/FeedbackPanel.java (original) +++ wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/panel/FeedbackPanel.java Tue May 13 16:09:55 2008 @@ -18,7 +18,6 @@ import java.util.Collections; import java.util.Comparator; -import java.util.Iterator; import java.util.List; import org.apache.wicket.AttributeModifier; @@ -44,12 +43,12 @@ * @author Jonathan Locke * @author Eelco Hillenius */ -public class FeedbackPanel extends Panel implements IFeedback +public class FeedbackPanel extends PanelVoid implements IFeedback { /** * List for messages. */ - private final class MessageListView extends ListView + private final class MessageListView extends ListViewFeedbackMessage { private static final long serialVersionUID = 1L; @@ -63,12 +62,14 @@ } /** -* @see org.apache.wicket.markup.html.list.ListView#populateItem(org.apache.wicket.markup.html.list.ListItem) +* @see +* org.apache.wicket.markup.html.list.ListView#populateItem(org.apache.wicket.markup.html
svn commit: r656054 - in /wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/image/resource: DefaultButtonImageResource.java LocalizedImageResource.java RenderedDynamicImageResource.java
Author: gseitz Date: Tue May 13 16:22:01 2008 New Revision: 656054 URL: http://svn.apache.org/viewvc?rev=656054view=rev Log: generics Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/image/resource/DefaultButtonImageResource.java wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/image/resource/LocalizedImageResource.java wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/image/resource/RenderedDynamicImageResource.java Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/image/resource/DefaultButtonImageResource.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/image/resource/DefaultButtonImageResource.java?rev=656054r1=656053r2=656054view=diff == --- wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/image/resource/DefaultButtonImageResource.java (original) +++ wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/image/resource/DefaultButtonImageResource.java Tue May 13 16:22:01 2008 @@ -21,6 +21,7 @@ import java.awt.FontMetrics; import java.awt.Graphics2D; import java.awt.RenderingHints; +import java.awt.font.TextAttribute; import java.util.HashMap; import java.util.Map; @@ -50,12 +51,12 @@ private static final int DEFAULT_TEXT_COLOR = Color.WHITE.getRGB(); /** default font: Helvetica bold 16. */ - private static final Map DEFAULT_FONT = new HashMap(new Font(Helvetica, Font.BOLD, 16) - .getAttributes()); + private static final MapTextAttribute, Object DEFAULT_FONT = new HashMapTextAttribute, Object( + new Font(Helvetica, Font.BOLD, 16).getAttributes()); /** * @param defaultHeight -*The defaultHeight to set. +* The defaultHeight to set. */ public static void setDefaultHeight(int defaultHeight) { @@ -64,7 +65,7 @@ /** * @param defaultWidth -*The defaultWidth to set. +* The defaultWidth to set. */ public static void setDefaultWidth(int defaultWidth) { @@ -84,7 +85,7 @@ private int colorRgb = DEFAULT_COLOR; /** The font to use */ - private Map fontAttributes = DEFAULT_FONT; + private MapTextAttribute, Object fontAttributes = DEFAULT_FONT; /** The color of the text */ private int textColorRgb = DEFAULT_TEXT_COLOR; @@ -94,11 +95,11 @@ /** * @param label -*The label for this button image +* The label for this button image * @param width -*Width of image in pixels +* Width of image in pixels * @param height -*Height of image in pixels +* Height of image in pixels */ public DefaultButtonImageResource(int width, int height, final String label) { @@ -110,7 +111,7 @@ /** * @param label -*The label for this button image +* The label for this button image */ public DefaultButtonImageResource(final String label) { @@ -167,7 +168,7 @@ /** * @param arcHeight -*The arcHeight to set. +* The arcHeight to set. */ public synchronized void setArcHeight(int arcHeight) { @@ -177,7 +178,7 @@ /** * @param arcWidth -*The arcWidth to set. +* The arcWidth to set. */ public synchronized void setArcWidth(int arcWidth) { @@ -187,7 +188,7 @@ /** * @param backgroundColor -*The backgroundColor to set. +* The backgroundColor to set. */ public synchronized void setBackgroundColor(Color backgroundColor) { @@ -197,7 +198,7 @@ /** * @param color -*The color to set. +* The color to set. */ public synchronized void setColor(Color color) { @@ -207,17 +208,17 @@ /** * @param font -*The font to set. +* The font to set. */ public synchronized void setFont(Font font) { - fontAttributes = new HashMap(font.getAttributes()); + fontAttributes = new HashMapTextAttribute, Object(font.getAttributes()); invalidate(); } /** * @param textColor -*The textColor to set. +* The textColor to set. */ public synchronized void setTextColor(Color textColor) { @@ -230,6 +231,7 @@ * * @see
svn commit: r655661 - /wicket/trunk/wicket/src/main/java/org/apache/wicket/MarkupFragmentFinder.java
Author: gseitz Date: Mon May 12 14:57:50 2008 New Revision: 655661 URL: http://svn.apache.org/viewvc?rev=655661view=rev Log: WICKET-1560 Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/MarkupFragmentFinder.java Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/MarkupFragmentFinder.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/MarkupFragmentFinder.java?rev=655661r1=655660r2=655661view=diff == --- wicket/trunk/wicket/src/main/java/org/apache/wicket/MarkupFragmentFinder.java (original) +++ wicket/trunk/wicket/src/main/java/org/apache/wicket/MarkupFragmentFinder.java Mon May 12 14:57:50 2008 @@ -21,6 +21,7 @@ import org.apache.wicket.markup.MarkupStream; import org.apache.wicket.markup.html.border.Border; import org.apache.wicket.markup.html.panel.Fragment; +import org.apache.wicket.markup.repeater.AbstractRepeater; /** * Responding to an AJAX request requires that we position the markup stream at the component @@ -44,10 +45,10 @@ * @param component * @return A MarkupStream which is positioned at the component */ - final MarkupStream find(final Component ? component) + final MarkupStream find(final Component? component) { // Get the parent's associated markup stream. - MarkupContainer ? parentWithAssociatedMarkup = component.findParentWithAssociatedMarkup(); + MarkupContainer? parentWithAssociatedMarkup = component.findParentWithAssociatedMarkup(); MarkupStream markupStream = null; // Might be that we have to walk up the component hierarchy @@ -78,6 +79,15 @@ // Ok, found it return markupStream; } + else + { + Component? parent = component.getParent(); + if (parent instanceof AbstractRepeater id != null + id.equals(parent.getId())) + { + return markupStream; + } + } } } catch (IndexOutOfBoundsException ex) @@ -100,7 +110,7 @@ if (parentWithAssociatedMarkup instanceof Fragment) { - markupStream = ((Fragment ? )parentWithAssociatedMarkup).findComponentIndex(component.getId()); + markupStream = ((Fragment?)parentWithAssociatedMarkup).findComponentIndex(component.getId()); return markupStream; } @@ -130,8 +140,8 @@ * @param parentWithAssociatedMarkup * @return the relative path */ - private String getComponentRelativePath(final Component ? component, - final MarkupContainer ? parentWithAssociatedMarkup) + private String getComponentRelativePath(final Component? component, + final MarkupContainer? parentWithAssociatedMarkup) { final String componentPath = component.getParent().getPageRelativePath(); final String parentWithAssociatedMarkupPath = parentWithAssociatedMarkup.getPageRelativePath();
svn commit: r655378 - /wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/RadioGroup.java
Author: gseitz Date: Sun May 11 15:04:26 2008 New Revision: 655378 URL: http://svn.apache.org/viewvc?rev=655378view=rev Log: fixed javadoc typo Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/RadioGroup.java Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/RadioGroup.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/RadioGroup.java?rev=655378r1=655377r2=655378view=diff == --- wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/RadioGroup.java (original) +++ wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/RadioGroup.java Sun May 11 15:04:26 2008 @@ -154,7 +154,7 @@ } /** -* Template method that can be overridsen by clients that implement IOnChangeListener to be +* Template method that can be overridden by clients that implement IOnChangeListener to be * notified by onChange events of a select element. This method does nothing by default. * p * Called when a option is selected of a dropdown list that wants to be notified of this event.
svn commit: r655078 - /wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/AutoCompleteTextField.java
Author: gseitz Date: Sat May 10 06:09:11 2008 New Revision: 655078 URL: http://svn.apache.org/viewvc?rev=655078view=rev Log: WICKET-1608: deprecate constructors with preselect parameter Modified: wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/AutoCompleteTextField.java Modified: wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/AutoCompleteTextField.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/AutoCompleteTextField.java?rev=655078r1=655077r2=655078view=diff == --- wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/AutoCompleteTextField.java (original) +++ wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/AutoCompleteTextField.java Sat May 10 06:09:11 2008 @@ -47,7 +47,7 @@ */ public AutoCompleteTextField(String id, ClassT type) { - this(id, (IModelT)null, type, false); + this(id, (IModelT)null, type, new AutoCompleteSettings()); } /** @@ -56,10 +56,13 @@ * @param type * @param preselect *the first item +* @deprecated use the constructor [EMAIL PROTECTED] [EMAIL PROTECTED] #AutoCompleteTextField(String, IModel, Class, AutoCompleteSettings)} */ + @Deprecated public AutoCompleteTextField(String id, IModelT model, ClassT type, boolean preselect) { - this(id, model, type, StringAutoCompleteRenderer.INSTANCE, preselect); + this(id, model, type, StringAutoCompleteRenderer.INSTANCE, + new AutoCompleteSettings().setPreselect(preselect)); } /** @@ -80,10 +83,12 @@ * @param id * @param object * @param preselect +* @deprecated use the constructor [EMAIL PROTECTED] [EMAIL PROTECTED] #AutoCompleteTextField(String, IModel, AutoCompleteSettings)} */ + @Deprecated public AutoCompleteTextField(String id, IModelT object, boolean preselect) { - this(id, object, (ClassT)null, preselect); + this(id, object, (ClassT)null, new AutoCompleteSettings().setPreselect(preselect)); } /** @@ -105,16 +110,18 @@ */ public AutoCompleteTextField(String id, IModelT object) { - this(id, object, (ClassT)null, false); + this(id, object, (ClassT)null, new AutoCompleteSettings()); } /** * @param id * @param preselect +* @deprecated use the constructor [EMAIL PROTECTED] [EMAIL PROTECTED] #AutoCompleteTextField(String, AutoCompleteSettings)} */ + @Deprecated public AutoCompleteTextField(String id, boolean preselect) { - this(id, (IModelT)null, preselect); + this(id, (IModelT)null, new AutoCompleteSettings().setPreselect(preselect)); } /** @@ -134,7 +141,7 @@ */ public AutoCompleteTextField(String id) { - this(id, (IModelT)null, false); + this(id, (IModelT)null, new AutoCompleteSettings()); } @@ -154,7 +161,7 @@ */ public AutoCompleteTextField(String id, ClassT type, IAutoCompleteRendererT renderer) { - this(id, null, type, renderer, false); + this(id, null, type, renderer, new AutoCompleteSettings()); } /** @@ -164,7 +171,7 @@ */ public AutoCompleteTextField(String id, IModelT model, IAutoCompleteRendererT renderer) { - this(id, model, (ClassT)null, renderer, false); + this(id, model, (ClassT)null, renderer, new AutoCompleteSettings()); } /** @@ -173,7 +180,9 @@ * @param type * @param renderer * @param preselect +* @deprecated use the constructor [EMAIL PROTECTED] [EMAIL PROTECTED] #AutoCompleteTextField(String, IModel, Class, IAutoCompleteRenderer, AutoCompleteSettings)} */ + @Deprecated public AutoCompleteTextField(String id, IModelT model, ClassT type, IAutoCompleteRendererT renderer, boolean preselect) { @@ -222,11 +231,4 @@ * @return iterator over all possible choice objects */ protected abstract IteratorT getChoices(String input); - - protected int getMaxHeightInPx() - { - return 50; - } - - }
svn commit: r654981 - /wicket/branches/wicket-1.3.x/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/
Author: gseitz Date: Fri May 9 16:44:20 2008 New Revision: 654981 URL: http://svn.apache.org/viewvc?rev=654981view=rev Log: WICKET-1608: make AutoCompleteBehavior's configuration more flexible WICKET-1595: provide a scrolling mechanism that's actually usable WICKET-1562: Autocomplete should display the selection list even if the input field is empty Added: wicket/branches/wicket-1.3.x/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/AutoCompleteSettings.java (with props) Modified: wicket/branches/wicket-1.3.x/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/AbstractAutoCompleteBehavior.java wicket/branches/wicket-1.3.x/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/AutoCompleteBehavior.java wicket/branches/wicket-1.3.x/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/AutoCompleteTextField.java wicket/branches/wicket-1.3.x/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/wicket-autocomplete.js Modified: wicket/branches/wicket-1.3.x/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/AbstractAutoCompleteBehavior.java URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.3.x/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/AbstractAutoCompleteBehavior.java?rev=654981r1=654980r2=654981view=diff == --- wicket/branches/wicket-1.3.x/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/AbstractAutoCompleteBehavior.java (original) +++ wicket/branches/wicket-1.3.x/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/AbstractAutoCompleteBehavior.java Fri May 9 16:44:20 2008 @@ -16,6 +16,7 @@ */ package org.apache.wicket.extensions.ajax.markup.html.autocomplete; + import org.apache.wicket.RequestCycle; import org.apache.wicket.ResourceReference; import org.apache.wicket.ajax.AbstractDefaultAjaxBehavior; @@ -37,21 +38,47 @@ protected boolean preselect = false; + protected AutoCompleteSettings settings = new AutoCompleteSettings(); + /** * @see org.apache.wicket.ajax.AbstractDefaultAjaxBehavior#renderHead(org.apache.wicket.markup.html.IHeaderResponse) */ + public void renderHead(IHeaderResponse response) { super.renderHead(response); response.renderJavascriptReference(AUTOCOMPLETE_JS); final String id = getComponent().getMarkupId(); - response.renderOnDomReadyJavascript(new Wicket.AutoComplete(' + id + ',' + - getCallbackUrl() + ', + preselect + );); + String initJS = constructInitJS(); + response.renderOnDomReadyJavascript(initJS); + } + + protected final String constructInitJS() + { + StringBuffer sb = new StringBuffer(); + sb.append(new Wicket.AutoComplete(') + .append(getComponent().getMarkupId()) + .append(',') + .append(getCallbackUrl()) + .append(',) + .append(constructSettingsJS()) + .append();); + return sb.toString(); + } + + protected final String constructSettingsJS() + { + StringBuffer sb = new StringBuffer(); + sb.append({preselect:).append(settings.getPreselect()).append(,maxHeight:).append( + settings.getMaxHeightInPx()).append(,showListOnEmptyInput:).append( + settings.getShowListOnEmptyInput()).append(}); + return sb.toString(); } /** * @see org.apache.wicket.ajax.AbstractDefaultAjaxBehavior#onBind() */ + protected void onBind() { // add empty AbstractDefaultAjaxBehavior to the component, to force @@ -61,6 +88,7 @@ { private static final long serialVersionUID = 1L; + protected void respond(AjaxRequestTarget target) { } @@ -81,6 +109,7 @@ /** * @see org.apache.wicket.ajax.AbstractDefaultAjaxBehavior#respond(org.apache.wicket.ajax.AjaxRequestTarget) */ + protected void respond(AjaxRequestTarget target) { final RequestCycle requestCycle = RequestCycle.get(); Modified: wicket/branches/wicket-1.3.x/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/AutoCompleteBehavior.java URL: http
svn commit: r654002 - /wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableChoiceLabel.java
Author: gseitz Date: Tue May 6 23:27:52 2008 New Revision: 654002 URL: http://svn.apache.org/viewvc?rev=654002view=rev Log: WICKET-1590: use IChoiceRenderer (if available) for the Label Modified: wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableChoiceLabel.java Modified: wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableChoiceLabel.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableChoiceLabel.java?rev=654002r1=654001r2=654002view=diff == --- wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableChoiceLabel.java (original) +++ wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableChoiceLabel.java Tue May 6 23:27:52 2008 @@ -20,6 +20,7 @@ import org.apache.wicket.MarkupContainer; import org.apache.wicket.markup.ComponentTag; +import org.apache.wicket.markup.html.WebComponent; import org.apache.wicket.markup.html.form.DropDownChoice; import org.apache.wicket.markup.html.form.FormComponent; import org.apache.wicket.markup.html.form.IChoiceRenderer; @@ -216,6 +217,32 @@ } @Override + protected WebComponentT newLabel(MarkupContainer ? parent, String componentId, + final IModelT model) + { + IModelT wrapper = new AbstractReadOnlyModelT() + { + private static final long serialVersionUID = 1L; + + @Override + @SuppressWarnings(unchecked) + public T getObject() + { + if (renderer != null) + { + return (T)renderer.getDisplayValue(model.getObject()); + } + else + { + return model.getObject(); + } + } + + }; + return super.newLabel(parent, componentId, wrapper); + } + + @Override protected void onModelChanged() { super.onModelChanged();
svn commit: r654003 - /wicket/branches/wicket-1.3.x/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableChoiceLabel.java
Author: gseitz Date: Tue May 6 23:34:52 2008 New Revision: 654003 URL: http://svn.apache.org/viewvc?rev=654003view=rev Log: WICKET-1590: use IChoiceRenderer (if available) for the Label Modified: wicket/branches/wicket-1.3.x/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableChoiceLabel.java Modified: wicket/branches/wicket-1.3.x/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableChoiceLabel.java URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.3.x/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableChoiceLabel.java?rev=654003r1=654002r2=654003view=diff == --- wicket/branches/wicket-1.3.x/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableChoiceLabel.java (original) +++ wicket/branches/wicket-1.3.x/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableChoiceLabel.java Tue May 6 23:34:52 2008 @@ -19,6 +19,7 @@ import java.io.Serializable; import java.util.List; +import org.apache.wicket.Component; import org.apache.wicket.MarkupContainer; import org.apache.wicket.markup.ComponentTag; import org.apache.wicket.markup.html.form.DropDownChoice; @@ -204,6 +205,29 @@ return editor; } + + protected Component newLabel(MarkupContainer parent, String componentId, final IModel model) + { + IModel wrapper = new AbstractReadOnlyModel() + { + private static final long serialVersionUID = 1L; + + public Object getObject() + { + if (renderer != null) + { + return renderer.getDisplayValue(model.getObject()); + } + else + { + return model.getObject(); + } + } + + }; + return super.newLabel(parent, componentId, wrapper); + } + protected void onModelChanged() { super.onModelChanged();
svn commit: r654044 - /wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableChoiceLabel.java
Author: gseitz Date: Wed May 7 01:54:15 2008 New Revision: 654044 URL: http://svn.apache.org/viewvc?rev=654044view=rev Log: WICKET-1590: use IChoiceRenderer (if available) for the Label, for real now Modified: wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableChoiceLabel.java Modified: wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableChoiceLabel.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableChoiceLabel.java?rev=654044r1=654043r2=654044view=diff == --- wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableChoiceLabel.java (original) +++ wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableChoiceLabel.java Wed May 7 01:54:15 2008 @@ -18,9 +18,12 @@ import java.util.List; +import org.apache.wicket.Application; import org.apache.wicket.MarkupContainer; import org.apache.wicket.markup.ComponentTag; +import org.apache.wicket.markup.MarkupStream; import org.apache.wicket.markup.html.WebComponent; +import org.apache.wicket.markup.html.basic.Label; import org.apache.wicket.markup.html.form.DropDownChoice; import org.apache.wicket.markup.html.form.FormComponent; import org.apache.wicket.markup.html.form.IChoiceRenderer; @@ -28,6 +31,7 @@ import org.apache.wicket.model.AbstractReadOnlyModel; import org.apache.wicket.model.IModel; import org.apache.wicket.model.Model; +import org.apache.wicket.util.convert.IConverter; /** @@ -218,28 +222,53 @@ @Override protected WebComponentT newLabel(MarkupContainer ? parent, String componentId, - final IModelT model) + IModelT model) { - IModelT wrapper = new AbstractReadOnlyModelT() + LabelT label = new LabelT(componentId, model) { private static final long serialVersionUID = 1L; @Override - @SuppressWarnings(unchecked) - public T getObject() + public IConverterT getConverter(ClassT type) + { + IConverterT c = AjaxEditableChoiceLabel.this.getConverter(type); + return c != null ? c : super.getConverter(type); + } + + @Override + protected void onComponentTagBody(MarkupStream markupStream, ComponentTag openTag) { + String displayValue = getModelObjectAsString(); if (renderer != null) { - return (T)renderer.getDisplayValue(model.getObject()); + Object displayObject = renderer.getDisplayValue(getModelObject()); + Class ? objectClass = (displayObject == null ? null + : displayObject.getClass()); + + + if (objectClass != null objectClass != String.class) + { + final IConverter converter = Application.get() + .getConverterLocator() + .getConverter(objectClass); + + displayValue = converter.convertToString(displayObject, getLocale()); + } + } + + if (displayValue == null || .equals(displayValue)) + { + replaceComponentTagBody(markupStream, openTag, defaultNullLabel()); } else { - return model.getObject(); + replaceComponentTagBody(markupStream, openTag, displayValue); } } - }; - return super.newLabel(parent, componentId, wrapper); + label.setOutputMarkupId(true); + label.add(new LabelAjaxBehavior(getLabelAjaxEvent())); + return label; } @Override
svn commit: r654045 - /wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableChoiceLabel.java
Author: gseitz Date: Wed May 7 01:55:42 2008 New Revision: 654045 URL: http://svn.apache.org/viewvc?rev=654045view=rev Log: WICKET-1590: use IChoiceRenderer (if available) for the Label, for real now Modified: wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableChoiceLabel.java Modified: wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableChoiceLabel.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableChoiceLabel.java?rev=654045r1=654044r2=654045view=diff == --- wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableChoiceLabel.java (original) +++ wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableChoiceLabel.java Wed May 7 01:55:42 2008 @@ -32,6 +32,7 @@ import org.apache.wicket.model.IModel; import org.apache.wicket.model.Model; import org.apache.wicket.util.convert.IConverter; +import org.apache.wicket.util.string.Strings; /** @@ -256,7 +257,7 @@ } } - if (displayValue == null || .equals(displayValue)) + if (Strings.isEmpty(displayValue)) { replaceComponentTagBody(markupStream, openTag, defaultNullLabel()); }
svn commit: r654047 - /wicket/branches/wicket-1.3.x/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableChoiceLabel.java
Author: gseitz Date: Wed May 7 02:00:26 2008 New Revision: 654047 URL: http://svn.apache.org/viewvc?rev=654047view=rev Log: WICKET-1590: use IChoiceRenderer (if available) for the Label, for real now Modified: wicket/branches/wicket-1.3.x/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableChoiceLabel.java Modified: wicket/branches/wicket-1.3.x/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableChoiceLabel.java URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.3.x/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableChoiceLabel.java?rev=654047r1=654046r2=654047view=diff == --- wicket/branches/wicket-1.3.x/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableChoiceLabel.java (original) +++ wicket/branches/wicket-1.3.x/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableChoiceLabel.java Wed May 7 02:00:26 2008 @@ -22,6 +22,8 @@ import org.apache.wicket.Component; import org.apache.wicket.MarkupContainer; import org.apache.wicket.markup.ComponentTag; +import org.apache.wicket.markup.MarkupStream; +import org.apache.wicket.markup.html.basic.Label; import org.apache.wicket.markup.html.form.DropDownChoice; import org.apache.wicket.markup.html.form.FormComponent; import org.apache.wicket.markup.html.form.IChoiceRenderer; @@ -29,6 +31,8 @@ import org.apache.wicket.model.AbstractReadOnlyModel; import org.apache.wicket.model.IModel; import org.apache.wicket.model.Model; +import org.apache.wicket.util.convert.IConverter; +import org.apache.wicket.util.string.Strings; /** @@ -206,26 +210,47 @@ } - protected Component newLabel(MarkupContainer parent, String componentId, final IModel model) + protected Component newLabel(MarkupContainer parent, String componentId, IModel model) { - IModel wrapper = new AbstractReadOnlyModel() + Label label = new Label(componentId, model) { private static final long serialVersionUID = 1L; - public Object getObject() + public IConverter getConverter(Class type) { + IConverter c = AjaxEditableChoiceLabel.this.getConverter(type); + return c != null ? c : super.getConverter(type); + } + + protected void onComponentTagBody(MarkupStream markupStream, ComponentTag openTag) + { + String displayValue = getModelObjectAsString(); if (renderer != null) { - return renderer.getDisplayValue(model.getObject()); + Object displayObject = renderer.getDisplayValue(getModelObject()); + Class objectClass = (displayObject == null ? null : displayObject.getClass()); + + if (objectClass != null objectClass != String.class) + { + final IConverter converter = getConverter(objectClass); + + displayValue = converter.convertToString(displayObject, getLocale()); + } + } + + if (Strings.isEmpty(displayValue)) + { + replaceComponentTagBody(markupStream, openTag, defaultNullLabel()); } else { - return model.getObject(); + replaceComponentTagBody(markupStream, openTag, displayValue); } } - }; - return super.newLabel(parent, componentId, wrapper); + label.setOutputMarkupId(true); + label.add(new LabelAjaxBehavior(getLabelAjaxEvent())); + return label; } protected void onModelChanged()
svn commit: r654203 - /wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/Wizard.java
Author: gseitz Date: Wed May 7 11:34:18 2008 New Revision: 654203 URL: http://svn.apache.org/viewvc?rev=654203view=rev Log: generic Wizard Modified: wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/Wizard.java Modified: wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/Wizard.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/Wizard.java?rev=654203r1=654202r2=654203view=diff == --- wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/Wizard.java (original) +++ wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/Wizard.java Wed May 7 11:34:18 2008 @@ -44,9 +44,12 @@ * components you want yourself using methods like [EMAIL PROTECTED] #newButtonBar(String)} et-cetera. * /p * + * @param T + *The model object type + * * @author Eelco Hillenius */ -public class Wizard extends PanelVoid implements IWizardModelListener, IWizard +public class WizardT extends PanelT implements IWizardModelListener, IWizard { /** Component id of the buttons panel as used by the default wizard panel. */ public static final String BUTTONS_ID = buttons;
svn commit: r654206 - /wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/Wizard.java
Author: gseitz Date: Wed May 7 11:43:44 2008 New Revision: 654206 URL: http://svn.apache.org/viewvc?rev=654206view=rev Log: use type names other than T for generic methods Modified: wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/Wizard.java Modified: wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/Wizard.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/Wizard.java?rev=654206r1=654205r2=654206view=diff == --- wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/Wizard.java (original) +++ wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/Wizard.java Wed May 7 11:43:44 2008 @@ -314,16 +314,16 @@ /** * Create a new form. Clients can override this method to provide a custom [EMAIL PROTECTED] Form}. * -* @param T +* @param E *The form's model object type * * @param id *The id to be used to construct the component * @return a new form */ - protected T FormT newForm(String id) + protected E FormE newForm(String id) { - return new FormT(id); + return new FormE(id); } @Override @@ -341,7 +341,7 @@ /** * Create a new overview bar. Clients can override this method to provide a custom bar. * -* @param T +* @param E *The overview bar's model object type * * @param id @@ -349,10 +349,10 @@ * * @return A new overview bar */ - protected T ComponentT newOverviewBar(String id) + protected E ComponentE newOverviewBar(String id) { // return a dummy component by default as we don't have an overview // component - return new WebMarkupContainerT(id).setVisible(false); + return new WebMarkupContainerE(id).setVisible(false); } }
svn commit: r653783 - in /wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/http/documentvalidation: HtmlDocumentParser.java HtmlDocumentValidator.java Tag.java
Author: gseitz Date: Tue May 6 07:13:32 2008 New Revision: 653783 URL: http://svn.apache.org/viewvc?rev=653783view=rev Log: generics Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/http/documentvalidation/HtmlDocumentParser.java wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/http/documentvalidation/HtmlDocumentValidator.java wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/http/documentvalidation/Tag.java Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/http/documentvalidation/HtmlDocumentParser.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/http/documentvalidation/HtmlDocumentParser.java?rev=653783r1=653782r2=653783view=diff == --- wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/http/documentvalidation/HtmlDocumentParser.java (original) +++ wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/http/documentvalidation/HtmlDocumentParser.java Tue May 6 07:13:32 2008 @@ -55,7 +55,7 @@ /** constant for unknown token. */ public static final int UNKNOWN = -1; - private Map attributes; + private MapString, String attributes; /** Extracted content */ private String comment; @@ -88,7 +88,7 @@ * * @return The attributes */ - public Map getAttributes() + public MapString, String getAttributes() { return attributes; } @@ -154,9 +154,9 @@ *The string * @return The map of attributes */ - private Map extractAttributes(String attributeString) + private MapString, String extractAttributes(String attributeString) { - Map m = new HashMap(); + MapString, String m = new HashMapString, String(); attributeString = Strings.replaceAll(attributeString.trim(), \t, ).toString(); attributeString = Strings.replaceAll(attributeString, = , =).toString(); String[] attributeElements = attributeString.split( ); @@ -223,7 +223,7 @@ { // No attributes tag = part.substring(1, part.indexOf(/)).toLowerCase(); - attributes = new HashMap(); + attributes = new HashMapString, String(); } else { @@ -242,7 +242,7 @@ { // No attributes tag = part.substring(1, part.indexOf('')).toLowerCase(); - attributes = new HashMap(); + attributes = new HashMapString, String(); } else { Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/http/documentvalidation/HtmlDocumentValidator.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/http/documentvalidation/HtmlDocumentValidator.java?rev=653783r1=653782r2=653783view=diff == --- wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/http/documentvalidation/HtmlDocumentValidator.java (original) +++ wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/http/documentvalidation/HtmlDocumentValidator.java Tue May 6 07:13:32 2008 @@ -39,7 +39,7 @@ { private static final Logger log = LoggerFactory.getLogger(HtmlDocumentValidator.class); - private final List elements = new ArrayList(); + private final ListDocumentElement elements = new ArrayListDocumentElement(); private boolean skipComments = true; @@ -75,9 +75,9 @@ public boolean isDocumentValid(final String document) { HtmlDocumentParser parser = new HtmlDocumentParser(document); - Iterator expectedElements = elements.iterator(); - ArrayListStack iteratorStack = new ArrayListStack(); - ArrayListStack tagNameStack = new ArrayListStack(); + IteratorDocumentElement expectedElements = elements.iterator(); + ArrayListStackIteratorDocumentElement iteratorStack = new ArrayListStackIteratorDocumentElement(); + ArrayListStackString tagNameStack = new ArrayListStackString(); boolean end = false; boolean valid = true; @@ -108,7 +108,7 @@ else { expectedElements = saveOpenTagState(iteratorStack, expectedElements
svn commit: r653874 - in /wicket/trunk: wicket-examples/src/main/java/org/apache/wicket/examples/forminput/ wicket/src/main/java/org/apache/wicket/util/convert/
Author: gseitz Date: Tue May 6 11:30:24 2008 New Revision: 653874 URL: http://svn.apache.org/viewvc?rev=653874view=rev Log: generics Modified: wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/forminput/FormInput.java wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/forminput/FormInputApplication.java wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/forminput/FormInputModel.java wicket/trunk/wicket/src/main/java/org/apache/wicket/util/convert/ConversionException.java wicket/trunk/wicket/src/main/java/org/apache/wicket/util/convert/MaskConverter.java Modified: wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/forminput/FormInput.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/forminput/FormInput.java?rev=653874r1=653873r2=653874view=diff == --- wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/forminput/FormInput.java (original) +++ wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/forminput/FormInput.java Tue May 6 11:30:24 2008 @@ -78,7 +78,7 @@ add(new LocaleDropDownChoice(localeSelect)); // Link to return to default locale - add(new Link(defaultLocaleLink) + add(new LinkVoid(defaultLocaleLink) { @Override public void onClick() @@ -102,54 +102,54 @@ add(new CheckBox(booleanProperty)); add(new Multiply(multiply)); // display the multiply result - Label multiplyLabel = new Label(multiplyLabel, new PropertyModel(getModel(), - multiply)); + LabelInteger multiplyLabel = new LabelInteger(multiplyLabel, + new PropertyModelInteger(getModel(), multiply)); // just for fun, add a border so that our result will be displayed // as '[ x ]' multiplyLabel.setComponentBorder(new BeforeAndAfterBorder()); add(multiplyLabel); - RadioChoice rc = new RadioChoice(numberRadioChoice, NUMBERS).setSuffix(); - rc.setLabel(new Model(number)); + RadioChoiceString rc = new RadioChoiceString(numberRadioChoice, NUMBERS).setSuffix(); + rc.setLabel(new ModelString(number)); rc.setRequired(true); add(rc); - RadioGroup group = new RadioGroup(numbersGroup); + RadioGroupString group = new RadioGroupString(numbersGroup); add(group); - ListView persons = new ListView(numbers, NUMBERS) + ListViewString persons = new ListViewString(numbers, NUMBERS) { @Override - protected void populateItem(ListItem item) + protected void populateItem(ListItemString item) { - item.add(new Radio(radio, item.getModel())); - item.add(new Label(number, item.getModelObjectAsString())); + item.add(new RadioString(radio, item.getModel())); + item.add(new LabelString(number, item.getModelObjectAsString())); }; }.setReuseItems(true); group.add(persons); - CheckGroup checks = new CheckGroup(numbersCheckGroup); + CheckGroupString checks = new CheckGroupString(numbersCheckGroup); add(checks); - ListView checksList = new ListView(numbers, NUMBERS) + ListViewString checksList = new ListViewString(numbers, NUMBERS) { @Override - protected void populateItem(ListItem item) + protected void populateItem(ListItemString item) { - item.add(new Check(check, item.getModel())); - item.add(new Label(number, item.getModelObjectAsString())); + item.add(new CheckString(check, item.getModel())); + item.add(new LabelString(number, item.getModelObjectAsString
svn commit: r653890 - in /wicket/trunk/wicket/src/main/java/org/apache/wicket/util/file: Folder.java IResourceFinder.java Path.java WebApplicationPath.java
Author: gseitz Date: Tue May 6 12:37:56 2008 New Revision: 653890 URL: http://svn.apache.org/viewvc?rev=653890view=rev Log: generics Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/util/file/Folder.java wicket/trunk/wicket/src/main/java/org/apache/wicket/util/file/IResourceFinder.java wicket/trunk/wicket/src/main/java/org/apache/wicket/util/file/Path.java wicket/trunk/wicket/src/main/java/org/apache/wicket/util/file/WebApplicationPath.java Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/util/file/Folder.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/util/file/Folder.java?rev=653890r1=653889r2=653890view=diff == --- wicket/trunk/wicket/src/main/java/org/apache/wicket/util/file/Folder.java (original) +++ wicket/trunk/wicket/src/main/java/org/apache/wicket/util/file/Folder.java Tue May 6 12:37:56 2008 @@ -172,14 +172,14 @@ */ public File[] getNestedFiles(final FileFilter filter) { - final List files = new ArrayList(); + final ListFile files = new ArrayListFile(); files.addAll(Arrays.asList(getFiles(filter))); final Folder[] folders = getFolders(); for (int i = 0; i folders.length; i++) { files.addAll(Arrays.asList(folders[i].getNestedFiles(filter))); } - return (File[])files.toArray(new File[files.size()]); + return files.toArray(new File[files.size()]); } /** @@ -269,6 +269,7 @@ * * @return True if the folder was successfully removed */ + @Override public boolean remove() { return remove(this); Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/util/file/IResourceFinder.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/util/file/IResourceFinder.java?rev=653890r1=653889r2=653890view=diff == --- wicket/trunk/wicket/src/main/java/org/apache/wicket/util/file/IResourceFinder.java (original) +++ wicket/trunk/wicket/src/main/java/org/apache/wicket/util/file/IResourceFinder.java Tue May 6 12:37:56 2008 @@ -34,5 +34,5 @@ *The filename with possible path * @return The resource stream */ - IResourceStream find(final Class clazz, final String pathname); + IResourceStream find(final Class ? clazz, final String pathname); } Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/util/file/Path.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/util/file/Path.java?rev=653890r1=653889r2=653890view=diff == --- wicket/trunk/wicket/src/main/java/org/apache/wicket/util/file/Path.java (original) +++ wicket/trunk/wicket/src/main/java/org/apache/wicket/util/file/Path.java Tue May 6 12:37:56 2008 @@ -32,7 +32,7 @@ public final class Path implements IResourcePath { /** The list of folders in the path */ - private final List folders = new ArrayList(); + private final ListFolder folders = new ArrayListFolder(); /** * Constructor @@ -97,11 +97,11 @@ * * @see org.apache.wicket.util.file.IResourceFinder#find(Class, String) */ - public IResourceStream find(final Class clazz, final String pathname) + public IResourceStream find(final Class ? clazz, final String pathname) { for (int i = 0; i folders.size(); i++) { - Folder folder = (Folder)folders.get(i); + Folder folder = folders.get(i); final File file = new File(folder, pathname); if (file.exists()) @@ -116,7 +116,7 @@ /** * @return Returns the folders. */ - public List getFolders() + public ListFolder getFolders() { return folders; } @@ -132,6 +132,7 @@ /** * @see java.lang.Object#toString() */ + @Override public String toString() { return [folders = + StringList.valueOf(folders) + ]; Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/util/file/WebApplicationPath.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/util/file/WebApplicationPath.java?rev=653890r1=653889r2=653890view=diff == --- wicket/trunk/wicket/src/main/java/org/apache/wicket/util/file/WebApplicationPath.java (original) +++ wicket/trunk/wicket/src/main/java/org/apache/wicket/util/file
svn commit: r653902 - in /wicket/trunk/wicket/src/main/java/org/apache/wicket/util: license/ listener/ parse/metapattern/ parse/metapattern/parsers/ resource/ resource/locator/
Author: gseitz Date: Tue May 6 13:14:50 2008 New Revision: 653902 URL: http://svn.apache.org/viewvc?rev=653902view=rev Log: generics Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/util/license/ApacheLicenseHeaderTestCase.java wicket/trunk/wicket/src/main/java/org/apache/wicket/util/listener/ListenerSet.java wicket/trunk/wicket/src/main/java/org/apache/wicket/util/parse/metapattern/MetaPattern.java wicket/trunk/wicket/src/main/java/org/apache/wicket/util/parse/metapattern/OptionalMetaPattern.java wicket/trunk/wicket/src/main/java/org/apache/wicket/util/parse/metapattern/parsers/ListParser.java wicket/trunk/wicket/src/main/java/org/apache/wicket/util/resource/PackageResourceStream.java wicket/trunk/wicket/src/main/java/org/apache/wicket/util/resource/XSLTResourceStream.java wicket/trunk/wicket/src/main/java/org/apache/wicket/util/resource/locator/ExtensionResourceNameIterator.java wicket/trunk/wicket/src/main/java/org/apache/wicket/util/resource/locator/IResourceStreamLocator.java wicket/trunk/wicket/src/main/java/org/apache/wicket/util/resource/locator/LocaleResourceNameIterator.java wicket/trunk/wicket/src/main/java/org/apache/wicket/util/resource/locator/OsgiResourceStreamLocator.java wicket/trunk/wicket/src/main/java/org/apache/wicket/util/resource/locator/ResourceNameIterator.java wicket/trunk/wicket/src/main/java/org/apache/wicket/util/resource/locator/ResourceStreamLocator.java wicket/trunk/wicket/src/main/java/org/apache/wicket/util/resource/locator/StyleAndVariationResourceNameIterator.java Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/util/license/ApacheLicenseHeaderTestCase.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/util/license/ApacheLicenseHeaderTestCase.java?rev=653902r1=653901r2=653902view=diff == --- wicket/trunk/wicket/src/main/java/org/apache/wicket/util/license/ApacheLicenseHeaderTestCase.java (original) +++ wicket/trunk/wicket/src/main/java/org/apache/wicket/util/license/ApacheLicenseHeaderTestCase.java Tue May 6 13:14:50 2008 @@ -20,9 +20,9 @@ import java.io.FileFilter; import java.util.ArrayList; import java.util.HashMap; -import java.util.Iterator; import java.util.List; import java.util.Map; +import java.util.Map.Entry; import junit.framework.TestCase; @@ -94,15 +94,15 @@ { String relativePathname = pathname.getAbsolutePath(); relativePathname = Strings.replaceAll(relativePathname, - baseDirectory.getAbsolutePath() + System.getProperty(file.separator), ) - .toString(); + baseDirectory.getAbsolutePath() + System.getProperty(file.separator), ) + .toString(); for (int i = 0; i ignoreFiles.length; i++) { String ignorePath = ignoreFiles[i]; // Will convert '/'s to '\\'s on Windows ignorePath = Strings.replaceAll(ignorePath, /, - System.getProperty(file.separator)).toString(); + System.getProperty(file.separator)).toString(); File ignoreFile = new File(baseDirectory, ignorePath); // Directory ignore @@ -143,8 +143,8 @@ { String relativePathname = pathname.getAbsolutePath(); relativePathname = Strings.replaceAll(relativePathname, - baseDirectory.getAbsolutePath() + System.getProperty(file.separator), ) - .toString(); + baseDirectory.getAbsolutePath() + System.getProperty(file.separator), ) + .toString(); if (relativePathname.equals(target) == false) { boolean found = false; @@ -193,6 +193,7 @@ * * @see junit.framework.TestCase#setUp() */ + @Override public final void setUp() { // setup the base directory for when running inside maven (building a release @@ -217,56 +218,50 @@ new CssLicenseHeaderHandler(cssIgnore), new HtmlLicenseHeaderHandler(htmlIgnore), new VelocityLicenseHeaderHandler(velocityIgnore) }; - final Map
svn commit: r653947 - in /wicket/trunk/wicket-extensions/src: main/java/org/apache/wicket/extensions/wizard/ main/java/org/apache/wicket/extensions/wizard/dynamic/ test/java/org/apache/wicket/extensio
Author: gseitz Date: Tue May 6 15:53:26 2008 New Revision: 653947 URL: http://svn.apache.org/viewvc?rev=653947view=rev Log: generics Modified: wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/AbstractWizardModel.java wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/IWizardModel.java wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/IWizardStep.java wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/StaticContentStep.java wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/Wizard.java wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/WizardButton.java wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/WizardButtonBar.java wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/WizardModel.java wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/WizardStep.java wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/dynamic/DynamicWizardModel.java wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/dynamic/DynamicWizardStep.java wicket/trunk/wicket-extensions/src/test/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableLabelPage.java wicket/trunk/wicket-extensions/src/test/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableTest.java Modified: wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/AbstractWizardModel.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/AbstractWizardModel.java?rev=653947r1=653946r2=653947view=diff == --- wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/AbstractWizardModel.java (original) +++ wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/AbstractWizardModel.java Tue May 6 15:53:26 2008 @@ -17,7 +17,6 @@ package org.apache.wicket.extensions.wizard; import java.util.ArrayList; -import java.util.Iterator; import java.util.List; /** @@ -43,7 +42,8 @@ private boolean lastVisible = false; /** Listeners for [EMAIL PROTECTED] IWizardModelListener model events}. */ - private final List wizardModelListeners = new ArrayList(1); + private final ListIWizardModelListener wizardModelListeners = new ArrayListIWizardModelListener( + 1); /** * Construct. @@ -149,9 +149,8 @@ */ protected final void fireActiveStepChanged(IWizardStep step) { - for (Iterator i = wizardModelListeners.iterator(); i.hasNext();) + for (IWizardModelListener listener : wizardModelListeners) { - IWizardModelListener listener = (IWizardModelListener)i.next(); listener.onActiveStepChanged(step); } } @@ -161,9 +160,8 @@ */ protected final void fireWizardCancelled() { - for (Iterator i = wizardModelListeners.iterator(); i.hasNext();) + for (IWizardModelListener listener : wizardModelListeners) { - IWizardModelListener listener = (IWizardModelListener)i.next(); listener.onCancel(); } } @@ -173,9 +171,8 @@ */ protected final void fireWizardFinished() { - for (Iterator i = wizardModelListeners.iterator(); i.hasNext();) + for (IWizardModelListener listener : wizardModelListeners) { - IWizardModelListener listener = (IWizardModelListener)i.next(); listener.onFinish(); } } Modified: wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/IWizardModel.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/IWizardModel.java?rev=653947r1=653946r2=653947view=diff == --- wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/IWizardModel.java (original) +++ wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/IWizardModel.java Tue May 6 15:53:26 2008 @@ -172,5 +172,5 @@ * * @return an iterator over all the steps of the model or null if the wizard model is not static */ - Iterator stepIterator(); + IteratorIWizardStep stepIterator(); } Modified: wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/IWizardStep.java
svn commit: r653581 - in /wicket/trunk/archetypes/quickstart/src/main/resources/archetype-resources/src: main/java/HomePage.java main/java/WicketApplication.java test/java/TestHomePage.java
Author: gseitz Date: Mon May 5 13:18:53 2008 New Revision: 653581 URL: http://svn.apache.org/viewvc?rev=653581view=rev Log: WICKET-1588: fix quickstart archetype for 1.4 Modified: wicket/trunk/archetypes/quickstart/src/main/resources/archetype-resources/src/main/java/HomePage.java wicket/trunk/archetypes/quickstart/src/main/resources/archetype-resources/src/main/java/WicketApplication.java wicket/trunk/archetypes/quickstart/src/main/resources/archetype-resources/src/test/java/TestHomePage.java Modified: wicket/trunk/archetypes/quickstart/src/main/resources/archetype-resources/src/main/java/HomePage.java URL: http://svn.apache.org/viewvc/wicket/trunk/archetypes/quickstart/src/main/resources/archetype-resources/src/main/java/HomePage.java?rev=653581r1=653580r2=653581view=diff == --- wicket/trunk/archetypes/quickstart/src/main/resources/archetype-resources/src/main/java/HomePage.java (original) +++ wicket/trunk/archetypes/quickstart/src/main/resources/archetype-resources/src/main/java/HomePage.java Mon May 5 13:18:53 2008 @@ -7,7 +7,7 @@ /** * Homepage */ -public class HomePage extends WebPage { +public class HomePage extends WebPageVoid { private static final long serialVersionUID = 1L; @@ -22,7 +22,7 @@ public HomePage(final PageParameters parameters) { // Add the simplest type of label -add(new Label(message, If you see this message wicket is properly configured and running)); +add(new LabelString(message, If you see this message wicket is properly configured and running)); // TODO Add your page's components here } Modified: wicket/trunk/archetypes/quickstart/src/main/resources/archetype-resources/src/main/java/WicketApplication.java URL: http://svn.apache.org/viewvc/wicket/trunk/archetypes/quickstart/src/main/resources/archetype-resources/src/main/java/WicketApplication.java?rev=653581r1=653580r2=653581view=diff == --- wicket/trunk/archetypes/quickstart/src/main/resources/archetype-resources/src/main/java/WicketApplication.java (original) +++ wicket/trunk/archetypes/quickstart/src/main/resources/archetype-resources/src/main/java/WicketApplication.java Mon May 5 13:18:53 2008 @@ -19,7 +19,7 @@ /** * @see wicket.Application#getHomePage() */ - public Class getHomePage() + public ClassHomePage getHomePage() { return HomePage.class; } Modified: wicket/trunk/archetypes/quickstart/src/main/resources/archetype-resources/src/test/java/TestHomePage.java URL: http://svn.apache.org/viewvc/wicket/trunk/archetypes/quickstart/src/main/resources/archetype-resources/src/test/java/TestHomePage.java?rev=653581r1=653580r2=653581view=diff == --- wicket/trunk/archetypes/quickstart/src/main/resources/archetype-resources/src/test/java/TestHomePage.java (original) +++ wicket/trunk/archetypes/quickstart/src/main/resources/archetype-resources/src/test/java/TestHomePage.java Mon May 5 13:18:53 2008 @@ -10,6 +10,7 @@ { private WicketTester tester; + @Override public void setUp() { tester = new WicketTester(new WicketApplication());
svn commit: r653583 - /wicket/trunk/archetypes/quickstart/src/main/resources/archetype-resources/pom.xml
Author: gseitz Date: Mon May 5 13:19:49 2008 New Revision: 653583 URL: http://svn.apache.org/viewvc?rev=653583view=rev Log: WICKET-1588: fix quickstart archetype for 1.4 Modified: wicket/trunk/archetypes/quickstart/src/main/resources/archetype-resources/pom.xml Modified: wicket/trunk/archetypes/quickstart/src/main/resources/archetype-resources/pom.xml URL: http://svn.apache.org/viewvc/wicket/trunk/archetypes/quickstart/src/main/resources/archetype-resources/pom.xml?rev=653583r1=653582r2=653583view=diff == --- wicket/trunk/archetypes/quickstart/src/main/resources/archetype-resources/pom.xml (original) +++ wicket/trunk/archetypes/quickstart/src/main/resources/archetype-resources/pom.xml Mon May 5 13:19:49 2008 @@ -131,7 +131,7 @@ /build properties - wicket.version1.3-SNAPSHOT/wicket.version + wicket.version1.4-SNAPSHOT/wicket.version jetty.version6.1.4/jetty.version /properties
svn commit: r653609 - in /wicket/trunk: wicket-examples/src/main/java/org/apache/wicket/examples/velocity/DynamicPage.java wicket-velocity/src/main/java/org/apache/wicket/velocity/markup/html/Velocity
Author: gseitz Date: Mon May 5 14:41:03 2008 New Revision: 653609 URL: http://svn.apache.org/viewvc?rev=653609view=rev Log: generics + javadoc typo fixes Modified: wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/velocity/DynamicPage.java wicket/trunk/wicket-velocity/src/main/java/org/apache/wicket/velocity/markup/html/VelocityPanel.java Modified: wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/velocity/DynamicPage.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/velocity/DynamicPage.java?rev=653609r1=653608r2=653609view=diff == --- wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/velocity/DynamicPage.java (original) +++ wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/velocity/DynamicPage.java Mon May 5 14:41:03 2008 @@ -33,7 +33,7 @@ * * @author a href=mailto:[EMAIL PROTECTED]Jean-Baptiste Quenot/a */ -public class DynamicPage extends WicketExamplePage +public class DynamicPage extends WicketExamplePageVoid { /** * Constructor @@ -41,10 +41,11 @@ * @param parameters *Page parameters */ + @SuppressWarnings(unchecked) public DynamicPage(final PageParameters parameters) { final IStringResourceStream template = new PackageResourceStream(DynamicPage.class, - fields.vm); + fields.vm); MapString, ListField map = new HashMapString, ListField(); ListField fields = VelocityTemplateApplication.getFields(); Modified: wicket/trunk/wicket-velocity/src/main/java/org/apache/wicket/velocity/markup/html/VelocityPanel.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-velocity/src/main/java/org/apache/wicket/velocity/markup/html/VelocityPanel.java?rev=653609r1=653608r2=653609view=diff == --- wicket/trunk/wicket-velocity/src/main/java/org/apache/wicket/velocity/markup/html/VelocityPanel.java (original) +++ wicket/trunk/wicket-velocity/src/main/java/org/apache/wicket/velocity/markup/html/VelocityPanel.java Mon May 5 14:41:03 2008 @@ -43,19 +43,17 @@ /** * Panel that displays the result of rendering a a * href=http://jakarta.apache.org/velocity;Velocity/a template. The template itself can be any - * codea href=http://wicket.apache.org/wicket/apidocs/org/apache/wicket/util/resource/IStringResourceStream.html;IStringResourceStream/a/code - * implementation, of which there are a number of convenient implementations in the wicket.util - * package. The model can be any normal - * codea href=http://java.sun.com/j2se/1.4.2/docs/api/java/util/Map.html;Map/a/code, - * which will be used to create the - * codea href=http://jakarta.apache.org/velocity/docs/api/org/apache/velocity/VelocityContext.html;VelocityContext/a/code. + * [EMAIL PROTECTED] StringResourceStream} implementation, of which there are a number of convenient + * implementations in the [EMAIL PROTECTED] org.apache.wicket.util} package. The model can be any normal + * [EMAIL PROTECTED] Map}, which will be used to create the [EMAIL PROTECTED] VelocityContext}. * * p * bNote:/b Be sure to properly initialize the Velocity engine before using - * codeVelocityPanel/code. + * [EMAIL PROTECTED] VelocityPanel}. * /p */ -public abstract class VelocityPanel extends Panel [EMAIL PROTECTED](unchecked) +public abstract class VelocityPanel extends PanelMap implements IMarkupResourceStreamProvider, IMarkupCacheKeyProvider @@ -67,12 +65,12 @@ * @param id *Component id * @param model -*optional model for variable substituation. +*optional model for variable substitution. * @param templateResource *The template resource * @return an instance of [EMAIL PROTECTED] VelocityPanel} */ - public static VelocityPanel forTemplateResource(String id, IModel model, + public static VelocityPanel forTemplateResource(String id, IModelMap model, final IStringResourceStream templateResource) { if (templateResource == null) @@ -82,6 +80,7 @@ return new VelocityPanel(id, model) { + @Override protected IStringResourceStream getTemplateResource() { return templateResource; @@ -100,10 +99,9 @@ * @param templateResource *The velocity template as a string resource * @param model -*Model with variables that can be substituted by Velocity
svn commit: r653624 - /wicket/trunk/wicket/src/main/java/org/apache/wicket/model/Model.java
Author: gseitz Date: Mon May 5 15:52:58 2008 New Revision: 653624 URL: http://svn.apache.org/viewvc?rev=653624view=rev Log: changed Model? to Model to fix compile error in DynamicPage Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/model/Model.java Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/model/Model.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/model/Model.java?rev=653624r1=653623r2=653624view=diff == --- wicket/trunk/wicket/src/main/java/org/apache/wicket/model/Model.java (original) +++ wicket/trunk/wicket/src/main/java/org/apache/wicket/model/Model.java Mon May 5 15:52:58 2008 @@ -68,7 +68,7 @@ *The Map, which may or may not be Serializable * @return A Model object wrapping the Map */ - public static Model ? valueOf(final Map map) + public static Model valueOf(final Map map) { return new Model(map instanceof Serializable ? (Serializable)map : new HashMap(map)); }
svn commit: r653625 - in /wicket/trunk: wicket-examples/src/main/java/org/apache/wicket/examples/velocity/ wicket-velocity/src/main/java/org/apache/wicket/velocity/ wicket-velocity/src/main/java/org/a
Author: gseitz Date: Mon May 5 16:06:05 2008 New Revision: 653625 URL: http://svn.apache.org/viewvc?rev=653625view=rev Log: generics Removed: wicket/trunk/wicket-velocity/src/test/java/wicket/contrib/ Modified: wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/velocity/DynamicPage.java wicket/trunk/wicket-velocity/src/main/java/org/apache/wicket/velocity/VelocityContributor.java wicket/trunk/wicket-velocity/src/main/java/org/apache/wicket/velocity/VelocityHeaderContributor.java wicket/trunk/wicket-velocity/src/main/java/org/apache/wicket/velocity/VelocityJavascriptContributor.java wicket/trunk/wicket-velocity/src/main/java/org/apache/wicket/velocity/markup/html/VelocityPanel.java wicket/trunk/wicket-velocity/src/test/java/org/apache/wicket/contrib/markup/html/velocity/VelocityPage.java wicket/trunk/wicket-velocity/src/test/java/org/apache/wicket/contrib/markup/html/velocity/VelocityWithMarkupParsingPage.java wicket/trunk/wicket-velocity/src/test/java/org/apache/wicket/contrib/velocity/VelocityJavascriptPage.java Modified: wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/velocity/DynamicPage.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/velocity/DynamicPage.java?rev=653625r1=653624r2=653625view=diff == --- wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/velocity/DynamicPage.java (original) +++ wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/velocity/DynamicPage.java Mon May 5 16:06:05 2008 @@ -41,7 +41,6 @@ * @param parameters *Page parameters */ - @SuppressWarnings(unchecked) public DynamicPage(final PageParameters parameters) { final IStringResourceStream template = new PackageResourceStream(DynamicPage.class, Modified: wicket/trunk/wicket-velocity/src/main/java/org/apache/wicket/velocity/VelocityContributor.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-velocity/src/main/java/org/apache/wicket/velocity/VelocityContributor.java?rev=653625r1=653624r2=653625view=diff == --- wicket/trunk/wicket-velocity/src/main/java/org/apache/wicket/velocity/VelocityContributor.java (original) +++ wicket/trunk/wicket-velocity/src/main/java/org/apache/wicket/velocity/VelocityContributor.java Mon May 5 16:06:05 2008 @@ -42,24 +42,22 @@ private String encoding = ISO-8859-1; - private final IModel model; + private final IModel ? extends Map ? , ? model; private final String templateName; /** -* Ctor for VelocityContributor -* * The templateName needs to have the full path relative to where the resource loader starts * looking. For example, if there is a template next to this class in the package called foo.vm, * and you have configured the ClassPathResourceLoader, template name will then be * wicket/contrib/util/resource/foo.vm. Wicket provides a nice utility -* [EMAIL PROTECTED] wicket.util.lang.Packages} for this. +* [EMAIL PROTECTED] org.apache.wicket.util.lang.Packages} for this. * * * @param templateName * @param model */ - public VelocityContributor(String templateName, final IModel model) + public VelocityContributor(String templateName, final IModel ? extends Map ? , ? model) { this.templateName = templateName; this.model = model; @@ -68,7 +66,8 @@ /** * @see org.apache.wicket.behavior.AbstractBehavior#detach(org.apache.wicket.Component) */ - public void detach(Component c) + @Override + public void detach(Component ? c) { if (model instanceof IDetachable) { @@ -87,6 +86,7 @@ /** * @see org.apache.wicket.behavior.AbstractBehavior#renderHead(org.apache.wicket.markup.html.IHeaderResponse) */ + @Override public void renderHead(IHeaderResponse response) { CharSequence s = evaluate(); @@ -116,7 +116,7 @@ /** * Evaluate the template. * -* @return The avaluated template +* @return The evaluated template */ protected final CharSequence evaluate() { @@ -125,7 +125,7 @@ return null; } // create a Velocity context object using the model if set - final VelocityContext ctx = new VelocityContext((Map)model.getObject()); + final VelocityContext ctx = new VelocityContext(model.getObject()); // create a writer for capturing the Velocity output
svn commit: r653631 - in /wicket/trunk: wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/ wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/
Author: gseitz Date: Mon May 5 16:26:44 2008 New Revision: 653631 URL: http://svn.apache.org/viewvc?rev=653631view=rev Log: generics Modified: wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/EditableLabelPage.java wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableChoiceLabel.java wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableLabel.java wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableMultiLineLabel.java wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/IndicatingAjaxButton.java wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/IndicatingAjaxFallbackLink.java wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/IndicatingAjaxLink.java wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/IndicatingAjaxSubmitButton.java wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/WicketAjaxIndicatorAppender.java Modified: wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/EditableLabelPage.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/EditableLabelPage.java?rev=653631r1=653630r2=653631view=diff == --- wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/EditableLabelPage.java (original) +++ wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/EditableLabelPage.java Mon May 5 16:26:44 2008 @@ -33,12 +33,12 @@ * * @author Igor Vaynberg (ivaynberg) */ -public class EditableLabelPage extends BasePage +public class EditableLabelPage extends BasePageEditableLabelPage { /** available sites for the multiple select. */ - private static final List SITES = Arrays.asList(new String[] { The Server Side, Java Lobby, - Java.Net }); - private String site = (String)SITES.get(0); + private static final ListString SITES = Arrays.asList(new String[] { The Server Side, + Java Lobby, Java.Net }); + private String site = SITES.get(0); private String text1 = fox; private String text2 = dog; private String text3 = multiple\nlines of\ntextual content; @@ -49,22 +49,24 @@ */ public EditableLabelPage() { - setModel(new CompoundPropertyModel(this)); - add(new AjaxEditableLabel(text1)); - add(new AjaxEditableLabel(text2)); - add(new AjaxEditableMultiLineLabel(text3)); - add(new AjaxEditableChoiceLabel(site, SITES)); + setModel(new CompoundPropertyModelEditableLabelPage(this)); + add(new AjaxEditableLabelString(text1)); + add(new AjaxEditableLabelString(text2)); + add(new AjaxEditableMultiLineLabelString(text3)); + add(new AjaxEditableChoiceLabelString(site, SITES)); - add(new Label(refresh-counter, new AbstractReadOnlyModel() + add(new LabelString(refresh-counter, new AbstractReadOnlyModelString() { - public Object getObject() + @Override + public String getObject() { return + refreshCounter; } })); - add(new Link(refresh-link) + add(new LinkVoid(refresh-link) { + @Override public void onClick() { refreshCounter++; Modified: wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableChoiceLabel.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableChoiceLabel.java?rev=653631r1=653630r2=653631view=diff == --- wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableChoiceLabel.java (original) +++ wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableChoiceLabel.java Mon May 5 16:26:44 2008 @@ -16,7 +16,6 @@ */ package org.apache.wicket.extensions.ajax.markup.html; -import java.io.Serializable; import java.util.List; import org.apache.wicket.MarkupContainer; @@ -34,17 +33,18 @@ * An inplace editor much like [EMAIL PROTECTED
svn commit: r648056 - /wicket/branches/wicket-1.3.x/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/wicket-autocomplete.js
Author: gseitz Date: Mon Apr 14 16:33:41 2008 New Revision: 648056 URL: http://svn.apache.org/viewvc?rev=648056view=rev Log: WICKET-1504 Modified: wicket/branches/wicket-1.3.x/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/wicket-autocomplete.js Modified: wicket/branches/wicket-1.3.x/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/wicket-autocomplete.js URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.3.x/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/wicket-autocomplete.js?rev=648056r1=648055r2=648056view=diff == --- wicket/branches/wicket-1.3.x/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/wicket-autocomplete.js (original) +++ wicket/branches/wicket-1.3.x/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/wicket-autocomplete.js Mon Apr 14 16:33:41 2008 @@ -224,7 +224,7 @@ var input=wicketGet(elementId); var index=getOffsetParentZIndex(elementId); menu.show(); -menu.style.zIndex=index==auto?index:Number(index)+1; +menu.style.zIndex=(Number(index)!=Number.NaN?Number(index)+1:index); menu.style.left=position[0]+'px' menu.style.top=(input.offsetHeight+position[1])+'px'; menu.style.width=input.offsetWidth+'px';
svn commit: r648057 - /wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/wicket-autocomplete.js
Author: gseitz Date: Mon Apr 14 16:33:55 2008 New Revision: 648057 URL: http://svn.apache.org/viewvc?rev=648057view=rev Log: WICKET-1504 Modified: wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/wicket-autocomplete.js Modified: wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/wicket-autocomplete.js URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/wicket-autocomplete.js?rev=648057r1=648056r2=648057view=diff == --- wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/wicket-autocomplete.js (original) +++ wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/wicket-autocomplete.js Mon Apr 14 16:33:55 2008 @@ -224,7 +224,7 @@ var input=wicketGet(elementId); var index=getOffsetParentZIndex(elementId); menu.show(); -menu.style.zIndex=index==auto?index:Number(index)+1; +menu.style.zIndex=(Number(index)!=Number.NaN?Number(index)+1:index); menu.style.left=position[0]+'px' menu.style.top=(input.offsetHeight+position[1])+'px'; menu.style.width=input.offsetWidth+'px';
svn commit: r646763 - /wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/table/DataTable.html
Author: gseitz Date: Thu Apr 10 04:38:02 2008 New Revision: 646763 URL: http://svn.apache.org/viewvc?rev=646763view=rev Log: WICKET-1496 Modified: wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/table/DataTable.html Modified: wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/table/DataTable.html URL: http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/table/DataTable.html?rev=646763r1=646762r2=646763view=diff == --- wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/table/DataTable.html (original) +++ wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/table/DataTable.html Thu Apr 10 04:38:02 2008 @@ -20,6 +20,11 @@ span wicket:id=toolbar/span /span /thead +tfoot + span wicket:id=bottomToolbars + span wicket:id=toolbar/span + /span +/tfoot tbody tr wicket:id=rows td wicket:id=cells @@ -27,9 +32,4 @@ /td /tr /tbody -tfoot - span wicket:id=bottomToolbars - span wicket:id=toolbar/span - /span -/tfoot /wicket:panel
svn commit: r646765 - /wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/table/DataTable.html
Author: gseitz Date: Thu Apr 10 04:39:58 2008 New Revision: 646765 URL: http://svn.apache.org/viewvc?rev=646765view=rev Log: WICKET-1496 Modified: wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/table/DataTable.html Modified: wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/table/DataTable.html URL: http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/table/DataTable.html?rev=646765r1=646764r2=646765view=diff == --- wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/table/DataTable.html (original) +++ wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/table/DataTable.html Thu Apr 10 04:39:58 2008 @@ -20,11 +20,6 @@ span wicket:id=toolbar/span /span /thead -tfoot - span wicket:id=bottomToolbars - span wicket:id=toolbar/span - /span -/tfoot tbody tr wicket:id=rows td wicket:id=cells @@ -32,4 +27,9 @@ /td /tr /tbody +tfoot + span wicket:id=bottomToolbars + span wicket:id=toolbar/span + /span +/tfoot /wicket:panel
svn commit: r646767 - /wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/table/DataTable.html
Author: gseitz Date: Thu Apr 10 04:44:57 2008 New Revision: 646767 URL: http://svn.apache.org/viewvc?rev=646767view=rev Log: WICKET-1496 Modified: wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/table/DataTable.html Modified: wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/table/DataTable.html URL: http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/table/DataTable.html?rev=646767r1=646766r2=646767view=diff == --- wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/table/DataTable.html (original) +++ wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/table/DataTable.html Thu Apr 10 04:44:57 2008 @@ -20,6 +20,11 @@ span wicket:id=toolbar/span /span /thead +tfoot + span wicket:id=bottomToolbars + span wicket:id=toolbar/span + /span +/tfoot tbody tr wicket:id=rows td wicket:id=cells @@ -27,9 +32,4 @@ /td /tr /tbody -tfoot - span wicket:id=bottomToolbars - span wicket:id=toolbar/span - /span -/tfoot /wicket:panel
svn commit: r646768 - /wicket/branches/wicket-1.3.x/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/table/DataTable.html
Author: gseitz Date: Thu Apr 10 04:46:52 2008 New Revision: 646768 URL: http://svn.apache.org/viewvc?rev=646768view=rev Log: WICKET-1496 Modified: wicket/branches/wicket-1.3.x/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/table/DataTable.html Modified: wicket/branches/wicket-1.3.x/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/table/DataTable.html URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.3.x/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/table/DataTable.html?rev=646768r1=646767r2=646768view=diff == --- wicket/branches/wicket-1.3.x/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/table/DataTable.html (original) +++ wicket/branches/wicket-1.3.x/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/table/DataTable.html Thu Apr 10 04:46:52 2008 @@ -20,6 +20,11 @@ span wicket:id=toolbar/span /span /thead +tfoot + span wicket:id=bottomToolbars + span wicket:id=toolbar/span + /span +/tfoot tbody tr wicket:id=rows td wicket:id=cells @@ -27,9 +32,4 @@ /td /tr /tbody -tfoot - span wicket:id=bottomToolbars - span wicket:id=toolbar/span - /span -/tfoot /wicket:panel
svn commit: r646279 - /wicket/branches/wicket-1.3.x/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableMultiLineLabel.java
Author: gseitz Date: Wed Apr 9 04:36:23 2008 New Revision: 646279 URL: http://svn.apache.org/viewvc?rev=646279view=rev Log: WICKET-1499 Modified: wicket/branches/wicket-1.3.x/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableMultiLineLabel.java Modified: wicket/branches/wicket-1.3.x/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableMultiLineLabel.java URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.3.x/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableMultiLineLabel.java?rev=646279r1=646278r2=646279view=diff == --- wicket/branches/wicket-1.3.x/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableMultiLineLabel.java (original) +++ wicket/branches/wicket-1.3.x/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableMultiLineLabel.java Wed Apr 9 04:36:23 2008 @@ -79,7 +79,8 @@ protected void onComponentTagBody(MarkupStream markupStream, ComponentTag openTag) { - if (getModelObject() == null) + Object modelObject = getModelObject(); + if (modelObject == null || .equals(modelObject)) { replaceComponentTagBody(markupStream, openTag, defaultNullLabel()); } @@ -159,7 +160,7 @@ save=true'+this.name+'='+wicketEncode(this.value)); return true;}; final String cancelCall = {wicketAjaxGet(' + getCallbackUrl() + - save=false'); return false;}; + save=false');this.onblur='';return false;}; final String keypress = var kc=wicketKeyCode(event); if (kc==27) + cancelCall + ; ;
svn commit: r646296 - in /wicket/branches/wicket-1.3.x/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html: AjaxEditableChoiceLabel.java AjaxEditableMultiLineLabel.ja
Author: gseitz Date: Wed Apr 9 05:08:28 2008 New Revision: 646296 URL: http://svn.apache.org/viewvc?rev=646296view=rev Log: fixed javadoc typo Modified: wicket/branches/wicket-1.3.x/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableChoiceLabel.java wicket/branches/wicket-1.3.x/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableMultiLineLabel.java Modified: wicket/branches/wicket-1.3.x/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableChoiceLabel.java URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.3.x/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableChoiceLabel.java?rev=646296r1=646295r2=646296view=diff == --- wicket/branches/wicket-1.3.x/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableChoiceLabel.java (original) +++ wicket/branches/wicket-1.3.x/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableChoiceLabel.java Wed Apr 9 05:08:28 2008 @@ -31,7 +31,7 @@ /** - * And inplace editor much like [EMAIL PROTECTED] AjaxEditableLabel}, but instead of a [EMAIL PROTECTED] TextField} a + * An inplace editor much like [EMAIL PROTECTED] AjaxEditableLabel}, but instead of a [EMAIL PROTECTED] TextField} a * [EMAIL PROTECTED] DropDownChoice} is displayed. * * @author Eelco Hillenius Modified: wicket/branches/wicket-1.3.x/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableMultiLineLabel.java URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.3.x/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableMultiLineLabel.java?rev=646296r1=646295r2=646296view=diff == --- wicket/branches/wicket-1.3.x/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableMultiLineLabel.java (original) +++ wicket/branches/wicket-1.3.x/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableMultiLineLabel.java Wed Apr 9 05:08:28 2008 @@ -28,7 +28,7 @@ import org.apache.wicket.model.IModel; /** - * And inplace editor much like [EMAIL PROTECTED] AjaxEditableLabel}, but now with support for multi line + * An inplace editor much like [EMAIL PROTECTED] AjaxEditableLabel}, but now with support for multi line * content and a [EMAIL PROTECTED] TextArea text area} as its editor. * * @author eelcohillenius
svn commit: r646297 - in /wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html: AjaxEditableChoiceLabel.java AjaxEditableMultiLineLabel.java
Author: gseitz Date: Wed Apr 9 05:08:30 2008 New Revision: 646297 URL: http://svn.apache.org/viewvc?rev=646297view=rev Log: fixed javadoc typo Modified: wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableChoiceLabel.java wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableMultiLineLabel.java Modified: wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableChoiceLabel.java URL: http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableChoiceLabel.java?rev=646297r1=646296r2=646297view=diff == --- wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableChoiceLabel.java (original) +++ wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableChoiceLabel.java Wed Apr 9 05:08:30 2008 @@ -31,7 +31,7 @@ /** - * And inplace editor much like [EMAIL PROTECTED] AjaxEditableLabel}, but instead of a [EMAIL PROTECTED] TextField} a + * An inplace editor much like [EMAIL PROTECTED] AjaxEditableLabel}, but instead of a [EMAIL PROTECTED] TextField} a * [EMAIL PROTECTED] DropDownChoice} is displayed. * * @author Eelco Hillenius @@ -155,6 +155,7 @@ * @see org.apache.wicket.extensions.ajax.markup.html.AjaxEditableLabel#newEditor(org.apache.wicket.MarkupContainer, * java.lang.String, org.apache.wicket.model.IModel) */ + @Override protected FormComponent newEditor(MarkupContainer parent, String componentId, IModel model) { IModel choiceModel = new AbstractReadOnlyModel() @@ -162,6 +163,7 @@ private static final long serialVersionUID = 1L; + @Override public Object getObject() { return choices.getObject(); @@ -172,11 +174,13 @@ { private static final long serialVersionUID = 1L; + @Override protected void onModelChanged() { AjaxEditableChoiceLabel.this.onModelChanged(); } + @Override protected void onModelChanging() { AjaxEditableChoiceLabel.this.onModelChanging(); @@ -189,6 +193,7 @@ { private static final long serialVersionUID = 1L; + @Override protected void onComponentTag(ComponentTag tag) { super.onComponentTag(tag); @@ -204,11 +209,13 @@ return editor; } + @Override protected void onModelChanged() { super.onModelChanged(); } + @Override protected void onModelChanging() { super.onModelChanging(); Modified: wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableMultiLineLabel.java URL: http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableMultiLineLabel.java?rev=646297r1=646296r2=646297view=diff == --- wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableMultiLineLabel.java (original) +++ wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableMultiLineLabel.java Wed Apr 9 05:08:30 2008 @@ -27,7 +27,7 @@ import org.apache.wicket.model.IModel; /** - * And inplace editor much like [EMAIL PROTECTED] AjaxEditableLabel}, but now with support for multi line + * An inplace editor much like [EMAIL PROTECTED] AjaxEditableLabel}, but now with support for multi line * content and a [EMAIL PROTECTED] TextArea text area} as its editor. * * @author eelcohillenius
svn commit: r645177 - in /wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html: AjaxEditableChoiceLabel.java AjaxEditableMultiLineLabel.java
Author: gseitz Date: Sat Apr 5 14:02:53 2008 New Revision: 645177 URL: http://svn.apache.org/viewvc?rev=645177view=rev Log: WICKET-1239: delegate onModelChanged, onModelChanging from the editor to AjaxEditable*Label Modified: wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableChoiceLabel.java wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableMultiLineLabel.java Modified: wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableChoiceLabel.java URL: http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableChoiceLabel.java?rev=645177r1=645176r2=645177view=diff == --- wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableChoiceLabel.java (original) +++ wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableChoiceLabel.java Sat Apr 5 14:02:53 2008 @@ -33,7 +33,7 @@ /** * And inplace editor much like [EMAIL PROTECTED] AjaxEditableLabel}, but instead of a [EMAIL PROTECTED] TextField} a * [EMAIL PROTECTED] DropDownChoice} is displayed. - * + * * @author Eelco Hillenius */ public class AjaxEditableChoiceLabel extends AjaxEditableLabel @@ -48,7 +48,7 @@ /** * Construct. -* +* * @param id *The component id */ @@ -59,7 +59,7 @@ /** * Construct. -* +* * @param id *The component id * @param model @@ -72,7 +72,7 @@ /** * Construct. -* +* * @param id *The component id * @param choices @@ -85,7 +85,7 @@ /** * Construct. -* +* * @param id *The component id * @param model @@ -101,7 +101,7 @@ /** * Construct. -* +* * @param id *The component id * @param model @@ -120,7 +120,7 @@ /** * Construct. -* +* * @param id *The component id * @param model @@ -135,7 +135,7 @@ /** * Construct. -* +* * @param id *The component id * @param model @@ -157,7 +157,7 @@ */ protected FormComponent newEditor(MarkupContainer parent, String componentId, IModel model) { - DropDownChoice editor = new DropDownChoice(componentId, model, new AbstractReadOnlyModel() + IModel choiceModel = new AbstractReadOnlyModel() { private static final long serialVersionUID = 1L; @@ -167,7 +167,22 @@ return choices.getObject(); } - }, renderer); + }; + DropDownChoice editor = new DropDownChoice(componentId, model, choiceModel, renderer) + { + private static final long serialVersionUID = 1L; + + protected void onModelChanged() + { + AjaxEditableChoiceLabel.this.onModelChanged(); + } + + protected void onModelChanging() + { + AjaxEditableChoiceLabel.this.onModelChanging(); + } + + }; editor.setOutputMarkupId(true); editor.setVisible(false); editor.add(new EditorAjaxBehavior() @@ -187,5 +202,15 @@ } }); return editor; + } + + protected void onModelChanged() + { + super.onModelChanged(); + } + + protected void onModelChanging() + { + super.onModelChanging(); } } Modified: wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableMultiLineLabel.java URL: http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableMultiLineLabel.java?rev=645177r1=645176r2=645177view=diff == --- wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableMultiLineLabel.java (original) +++ wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableMultiLineLabel.java Sat Apr 5 14:02:53
svn commit: r643758 - in /wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/form/upload: FileUpload.java FileUploadField.java
Author: gseitz Date: Tue Apr 1 23:39:03 2008 New Revision: 643758 URL: http://svn.apache.org/viewvc?rev=643758view=rev Log: WICKET-1472: javadoc fixes Modified: wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/form/upload/FileUpload.java wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/form/upload/FileUploadField.java Modified: wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/form/upload/FileUpload.java URL: http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/form/upload/FileUpload.java?rev=643758r1=643757r2=643758view=diff == --- wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/form/upload/FileUpload.java (original) +++ wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/form/upload/FileUpload.java Tue Apr 1 23:39:03 2008 @@ -30,7 +30,8 @@ /** - * Model for file uploads. + * Model for file uploads. Objects of this class should not be kept between requests, and should + * therefore be marked as codetransient/code if they become a property of an IModel. * * @author Jonathan Locke */ Modified: wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/form/upload/FileUploadField.java URL: http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/form/upload/FileUploadField.java?rev=643758r1=643757r2=643758view=diff == --- wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/form/upload/FileUploadField.java (original) +++ wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/form/upload/FileUploadField.java Tue Apr 1 23:39:03 2008 @@ -28,8 +28,8 @@ /** * Form component that corresponds to a lt;input type=quot;filequot;gt;. When a FileInput * component is nested in a [EMAIL PROTECTED] org.apache.wicket.markup.html.form.Form}, that has multipart == - * true, its model is updated with the [EMAIL PROTECTED] org.apache.wicket.util.upload.FileItem}for this - * component. + * true, its model is updated with the [EMAIL PROTECTED] org.apache.wicket.markup.html.form.upload.FileUpload} + * for this component. * * @author Eelco Hillenius */
svn commit: r643760 - /wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/resolver/WicketMessageResolver.java
Author: gseitz Date: Tue Apr 1 23:40:40 2008 New Revision: 643760 URL: http://svn.apache.org/viewvc?rev=643760view=rev Log: fixed typo in javadoc Modified: wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/resolver/WicketMessageResolver.java Modified: wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/resolver/WicketMessageResolver.java URL: http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/resolver/WicketMessageResolver.java?rev=643760r1=643759r2=643760view=diff == --- wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/resolver/WicketMessageResolver.java (original) +++ wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/resolver/WicketMessageResolver.java Tue Apr 1 23:40:40 2008 @@ -74,7 +74,7 @@ * @return true, if componentId was handle by the resolver. False, otherwise */ public boolean resolve(final MarkupContainer container, final MarkupStream markupStream, - final ComponentTag tag) + final ComponentTag tag) { if (tag instanceof WicketTag) { @@ -85,13 +85,14 @@ if ((messageKey == null) || (messageKey.trim().length() == 0)) { throw new MarkupException( - Wrong format of wicket:message key='xxx': attribute 'key' is missing); + Wrong format of wicket:message key='xxx': attribute 'key' is missing); } final String id = _message_ + container.getPage().getAutoIndex(); MessageLabel label = new MessageLabel(id, messageKey); - label.setRenderBodyOnly(container.getApplication().getMarkupSettings() - .getStripWicketTags()); + label.setRenderBodyOnly(container.getApplication() + .getMarkupSettings() + .getStripWicketTags()); container.autoAdd(label, markupStream); // Yes, we handled the tag @@ -104,7 +105,7 @@ } /** -* A Label with expands open-close tags to open-body-close if required +* A Label which expands open-close tags to open-body-close if required */ public static class MessageLabel extends WebComponent {
svn commit: r643763 - /wicket/trunk/archetypes/quickstart/src/main/resources/archetype-resources/pom.xml
Author: gseitz Date: Wed Apr 2 00:13:39 2008 New Revision: 643763 URL: http://svn.apache.org/viewvc?rev=643763view=rev Log: WICKET-1468: set downloadSources=true as default Modified: wicket/trunk/archetypes/quickstart/src/main/resources/archetype-resources/pom.xml Modified: wicket/trunk/archetypes/quickstart/src/main/resources/archetype-resources/pom.xml URL: http://svn.apache.org/viewvc/wicket/trunk/archetypes/quickstart/src/main/resources/archetype-resources/pom.xml?rev=643763r1=643762r2=643763view=diff == --- wicket/trunk/archetypes/quickstart/src/main/resources/archetype-resources/pom.xml (original) +++ wicket/trunk/archetypes/quickstart/src/main/resources/archetype-resources/pom.xml Wed Apr 2 00:13:39 2008 @@ -120,6 +120,13 @@ groupIdorg.mortbay.jetty/groupId artifactIdmaven-jetty-plugin/artifactId /plugin + plugin + groupIdorg.apache.maven.plugins/groupId + artifactIdmaven-eclipse-plugin/artifactId + configuration + downloadSourcestrue/downloadSources + /configuration + /plugin /plugins /build
svn commit: r644023 - in /wicket/common/site/docs: ./ style/ wicket-1.3.2/
Author: gseitz Date: Wed Apr 2 12:49:28 2008 New Revision: 644023 URL: http://svn.apache.org/viewvc?rev=644023view=rev Log: added basic structure of docs sites Added: wicket/common/site/docs/ wicket/common/site/docs/index.html wicket/common/site/docs/style/ wicket/common/site/docs/style/apache.png (with props) wicket/common/site/docs/style/background.gif (with props) wicket/common/site/docs/style/bg_container.png (with props) wicket/common/site/docs/style/bg_menu.png (with props) wicket/common/site/docs/style/footer.png (with props) wicket/common/site/docs/style/ie.css wicket/common/site/docs/style/logo.png (with props) wicket/common/site/docs/style/logo_graduated.png (with props) wicket/common/site/docs/style/menuknop.png (with props) wicket/common/site/docs/style/nowincubating.png (with props) wicket/common/site/docs/style/wicket.css wicket/common/site/docs/style/wicket.png (with props) wicket/common/site/docs/wicket-1.3.2/ wicket/common/site/docs/wicket-1.3.2/index.html Added: wicket/common/site/docs/index.html URL: http://svn.apache.org/viewvc/wicket/common/site/docs/index.html?rev=644023view=auto == --- wicket/common/site/docs/index.html (added) +++ wicket/common/site/docs/index.html Wed Apr 2 12:49:28 2008 @@ -0,0 +1,32 @@ +!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; +html +head + titleApache Wicket - Wicket - /title + link href=style/wicket.css rel=stylesheet media=screen / + link rel=icon href=favicon.ico / +/head +body +div id=container + div id=headera href=http://incubator.apache.org/wicket;h1 id=logospanApache Wicket/span/h1/a/div + div id=contentwrapper + div id=contentbody + div class=sectionh2Apache Wicket/h2pApache Wicket is an open source, java, component based, web application framework. With proper mark-up/logic separation, a POJO data model, and a refreshing lack of XML, Apache Wicket makes developing web-apps simple and enjoyable again. Swap the boilerplate, complex debugging and brittle code for powerful, reusable components written with plain Java and HTML./pulliRead the a href=http://wicket.apache.org;online documentation/a available on our website/liliRead the a href=http://cwiki.apache.org/WICKET/migrate-13.html;migration guide/a/liliRead the a href=http://www.nabble.com/Wicket-f13974.html;mailing archives/a available on nabble/liliSend a complete message containing your problem, stacktrace and problem you're trying to solve to the user list (a href=mailto:[EMAIL PROTECTED][EMAIL PROTECTED]/a)/liliAsk a question on IRC at freenode.net, channel ##wicket/li/uldiv class=sectionh3License/h3pWicket is distributed under the terms of the Apache Software Foundation license, version 2.0. The text is included in the file LICENSE.txt in the root of the project./p/divdiv class=sectionh3Java/Application server requirements/h3pWicket requires at least Java 1.4. The application server for running your web application should adhere to the servlet specification version 2.3 or newer. All necessary dependencies are located in the /lib directory of this package./p/div/divdiv class=sectionh2Getting started/h2pThe Wicket project has several projects where you can learn from, and get started quickly:/pulliwicket-examples : shows all components in short usage examples, also available live on: a href=http://wicketstuff.org/wicket13;http://wicketstuff.org/wicket13/a/liliwicket-quickstart : provides a skeleton project for use in NetBeans, Eclipse, IntelliJ IDEA and other major IDE's, without having to con figure anything yourself. You can copy'n'paste the examples from the website into your pages and see them running on your own box./li/uldiv class=sectionh3Building Wicket from source/h3pThe Wicket distribution contains the final Wicket jar. You can use this directly in your applications. The Wicket project also uploads the source-jars together with the final jar to the Ibiblio repository used by the Maven build tool. So there is actually no specific need to build Wicket yourself from the distribution./ppNow if you do with to do so, you can build Wicket using Ant or Maven 2. Support for Maven 1 is limited to downloading the artifacts from the Ibiblio repository and the conversion of the pom.xml file is done automatically by the Maven project./ppBuilding using maven 2:/pdldtmvn package/dtdd creates wicket-x.y.z.jar in target/ subdirectory./dddtmvn install/dtdd creates wicket-x.y.z.jar in target/ subdirectory and installs the file into yo ur local repository for use in other projects./dd/dl/divdiv class=sectionh3Migrating from 1.2/h3pThere is a migration guide available on our Wiki: a href=http://cwiki.apache.org/WICKET/migrate-13.html;http
svn commit: r643133 - /wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/wicket-autocomplete.js
Author: gseitz Date: Mon Mar 31 13:30:31 2008 New Revision: 643133 URL: http://svn.apache.org/viewvc?rev=643133view=rev Log: WICKET-1329: detect zIndex of offsetParent Modified: wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/wicket-autocomplete.js Modified: wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/wicket-autocomplete.js URL: http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/wicket-autocomplete.js?rev=643133r1=643132r2=643133view=diff == --- wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/wicket-autocomplete.js (original) +++ wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/wicket-autocomplete.js Mon Mar 31 13:30:31 2008 @@ -164,15 +164,16 @@ } function getAutocompleteMenu() { -var choiceDiv = document.getElementById(getMenuId()); -if (choiceDiv == null) { -choiceDiv = document.createElement(div); +var choiceDiv=document.getElementById(getMenuId()); +if (choiceDiv==null) { +choiceDiv=document.createElement(div); document.body.appendChild(choiceDiv); -choiceDiv.id = getMenuId(); -choiceDiv.className = wicket-aa; -choiceDiv.style.display = none; -choiceDiv.style.position = absolute; -choiceDiv.style.zIndex = 3; +choiceDiv.id=getMenuId(); +choiceDiv.className=wicket-aa; +choiceDiv.style.display=none; +choiceDiv.style.position=absolute; +var index=getOffsetParentZIndex(elementId); +choiceDiv.style.zIndex=index==auto?index:Number(index)+1; // WICKET-1350/WICKET-1351 choiceDiv.onmouseout=function() {mouseactive=0;}; @@ -353,20 +354,39 @@ } } +// From http://www.robertnyman.com/2006/04/24/get-the-rendered-style-of-an-element/ +function getStyle(obj,cssRule) { + var cssRuleAlt = cssRule.replace(/\-(\w)/g,function(strMatch,p1){return p1.toUpperCase();}); +var value=obj.style[cssRuleAlt]; +if (!value) { + if (document.defaultView document.defaultView.getComputedStyle) { + value = document.defaultView.getComputedStyle(obj,).getPropertyValue(cssRule); + } + else if (obj.currentStyle) + { + value=obj.currentStyle[cssRuleAlt]; + } +} +return value; +} function isVisible(obj) { - var value = obj.style.visibility; - if (!value) { - if (document.defaultView typeof(document.defaultView.getComputedStyle)==function) { - value=document.defaultView.getComputedStyle(obj,).getPropertyValue(visibility); - } else if (obj.currentStyle) { - value = obj.currentStyle.visibility; - } else { - value=''; - } - } - return value; + return getStyle(obj,visibility); } + +function getOffsetParentZIndex(obj) { + obj=typeof obj==string?Wicket.$(obj):obj; + obj=obj.offsetParent; + var index=auto; + do { + var pos=getStyle(obj,position); + if(pos==relative||pos==absolute||pos==fixed) { + index=getStyle(obj,z-index); + } + obj=obj.offsetParent; + } while (obj index == auto); + return index; +} function hideShowCovered(){ if (!/msie/i.test(navigator.userAgent) !/opera/i.test(navigator.userAgent)) {
svn commit: r643140 - /wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/wicket-autocomplete.js
Author: gseitz Date: Mon Mar 31 13:41:54 2008 New Revision: 643140 URL: http://svn.apache.org/viewvc?rev=643140view=rev Log: WICKET-1329: calculate correct zIndex everytime the autocomplete menu is shown. Modified: wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/wicket-autocomplete.js Modified: wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/wicket-autocomplete.js URL: http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/wicket-autocomplete.js?rev=643140r1=643139r2=643140view=diff == --- wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/wicket-autocomplete.js (original) +++ wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/wicket-autocomplete.js Mon Mar 31 13:41:54 2008 @@ -172,8 +172,6 @@ choiceDiv.className=wicket-aa; choiceDiv.style.display=none; choiceDiv.style.position=absolute; -var index=getOffsetParentZIndex(elementId); -choiceDiv.style.zIndex=index==auto?index:Number(index)+1; // WICKET-1350/WICKET-1351 choiceDiv.onmouseout=function() {mouseactive=0;}; @@ -224,7 +222,9 @@ var position=getPosition(wicketGet(elementId)); var menu = getAutocompleteMenu(); var input=wicketGet(elementId); +var index=getOffsetParentZIndex(elementId); menu.show(); +menu.style.zIndex=index==auto?index:Number(index)+1; menu.style.left=position[0]+'px' menu.style.top=(input.offsetHeight+position[1])+'px'; menu.style.width=input.offsetWidth+'px';
svn commit: r642135 - /wicket/trunk/jdk-1.4/wicket-velocity/src/main/java/org/apache/wicket/velocity/markup/html/VelocityPanel.java
Author: gseitz Date: Fri Mar 28 01:31:02 2008 New Revision: 642135 URL: http://svn.apache.org/viewvc?rev=642135view=rev Log: WICKET-1268: minor fix Modified: wicket/trunk/jdk-1.4/wicket-velocity/src/main/java/org/apache/wicket/velocity/markup/html/VelocityPanel.java Modified: wicket/trunk/jdk-1.4/wicket-velocity/src/main/java/org/apache/wicket/velocity/markup/html/VelocityPanel.java URL: http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket-velocity/src/main/java/org/apache/wicket/velocity/markup/html/VelocityPanel.java?rev=642135r1=642134r2=642135view=diff == --- wicket/trunk/jdk-1.4/wicket-velocity/src/main/java/org/apache/wicket/velocity/markup/html/VelocityPanel.java (original) +++ wicket/trunk/jdk-1.4/wicket-velocity/src/main/java/org/apache/wicket/velocity/markup/html/VelocityPanel.java Fri Mar 28 01:31:02 2008 @@ -144,8 +144,12 @@ } else if (!parseGeneratedMarkup()) { - replaceComponentTagBody(markupStream, openTag, - evaluateVelocityTemplate(getTemplateReader())); + // initialize evaluatedTemplate + if (evaluatedTemplate == null) + { + getMarkupResourceStream(null, null); + } + replaceComponentTagBody(markupStream, openTag, evaluatedTemplate); } else {
svn commit: r642208 - /wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/res/modal.css
Author: gseitz Date: Fri Mar 28 05:36:48 2008 New Revision: 642208 URL: http://svn.apache.org/viewvc?rev=642208view=rev Log: WICKET-1457 Modified: wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/res/modal.css Modified: wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/res/modal.css URL: http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/res/modal.css?rev=642208r1=642207r2=642208view=diff == --- wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/res/modal.css (original) +++ wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/res/modal.css Fri Mar 28 05:36:48 2008 @@ -152,6 +152,7 @@ width: 100%; background-color: white; padding-top: 0.1em; + _overflow: auto; } div.wicket-modal div.w_content_3 {
svn commit: r642334 - /wicket/trunk/jdk-1.4/wicket-velocity/src/main/java/org/apache/wicket/velocity/markup/html/VelocityPanel.java
Author: gseitz Date: Fri Mar 28 11:53:05 2008 New Revision: 642334 URL: http://svn.apache.org/viewvc?rev=642334view=rev Log: WICKET-1268: moved check from onBeforeRender to onComponentTagBody Modified: wicket/trunk/jdk-1.4/wicket-velocity/src/main/java/org/apache/wicket/velocity/markup/html/VelocityPanel.java Modified: wicket/trunk/jdk-1.4/wicket-velocity/src/main/java/org/apache/wicket/velocity/markup/html/VelocityPanel.java URL: http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket-velocity/src/main/java/org/apache/wicket/velocity/markup/html/VelocityPanel.java?rev=642334r1=642333r2=642334view=diff == --- wicket/trunk/jdk-1.4/wicket-velocity/src/main/java/org/apache/wicket/velocity/markup/html/VelocityPanel.java (original) +++ wicket/trunk/jdk-1.4/wicket-velocity/src/main/java/org/apache/wicket/velocity/markup/html/VelocityPanel.java Fri Mar 28 11:53:05 2008 @@ -144,9 +144,17 @@ } else if (!parseGeneratedMarkup()) { - // initialize evaluatedTemplate + // check that no components have been added in case the generated markup should not be + // parsed + if (size() 0) + { + throw new WicketRuntimeException( + Components cannot be added if the generated markup should not be parsed.); + } + if (evaluatedTemplate == null) { + // initialize evaluatedTemplate getMarkupResourceStream(null, null); } replaceComponentTagBody(markupStream, openTag, evaluatedTemplate); @@ -158,21 +166,6 @@ } /** -* @see org.apache.wicket.Component#onBeforeRender() -*/ - protected void onBeforeRender() - { - // check that no components have been added in case the generated markup should not be - // parsed - if (!parseGeneratedMarkup() size() 0) - { - throw new WicketRuntimeException( - Components cannot be added if the generated markup should not be parsed.); - } - super.onBeforeRender(); - } - - /** * Either print or rethrow the throwable. * * @param exception @@ -306,7 +299,8 @@ * @see org.apache.wicket.markup.IMarkupResourceStreamProvider#getMarkupResourceStream(org.apache.wicket.MarkupContainer, * java.lang.Class) */ - public IResourceStream getMarkupResourceStream(MarkupContainer container, Class containerClass) + public final IResourceStream getMarkupResourceStream(MarkupContainer container, + Class containerClass) { Reader reader = getTemplateReader(); if (reader == null) @@ -326,7 +320,7 @@ * @see org.apache.wicket.markup.IMarkupCacheKeyProvider#getCacheKey(org.apache.wicket.MarkupContainer, * java.lang.Class) */ - public String getCacheKey(MarkupContainer container, Class containerClass) + public final String getCacheKey(MarkupContainer container, Class containerClass) { // don't cache the evaluated template return null;
svn commit: r641801 - /wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/wicket-autocomplete.js
Author: gseitz Date: Thu Mar 27 05:57:41 2008 New Revision: 641801 URL: http://svn.apache.org/viewvc?rev=641801view=rev Log: WICKET-310: added call to Wicket.Ajax.invokePostCallHandlers Modified: wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/wicket-autocomplete.js Modified: wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/wicket-autocomplete.js URL: http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/wicket-autocomplete.js?rev=641801r1=641800r2=641801view=diff == --- wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/wicket-autocomplete.js (original) +++ wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/wicket-autocomplete.js Thu Mar 27 05:57:41 2008 @@ -294,6 +294,9 @@ render(); scheduleEmptyCheck(); + +Wicket.Log.info(Response processed successfully.); +Wicket.Ajax.invokePostCallHandlers(); } function scheduleEmptyCheck() {
svn commit: r641994 - /wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/wicket-autocomplete.js
Author: gseitz Date: Thu Mar 27 14:45:33 2008 New Revision: 641994 URL: http://svn.apache.org/viewvc?rev=641994view=rev Log: WICKET-1372 WICKET-1454 Modified: wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/wicket-autocomplete.js Modified: wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/wicket-autocomplete.js URL: http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/wicket-autocomplete.js?rev=641994r1=641993r2=641994view=diff == --- wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/wicket-autocomplete.js (original) +++ wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/wicket-autocomplete.js Thu Mar 27 14:45:33 2008 @@ -72,9 +72,10 @@ obj.onblur=function(event){ if(mouseactive==1){ Wicket.$(elementId).focus(); - return false; + return killEvent(event); } hideAutoComplete(); + if(typeof objonblur==function)objonblur(); } obj.onkeydown=function(event){ @@ -109,13 +110,13 @@ obj.value=getSelectedValue(); hideAutoComplete(); hidingAutocomplete=1; + if(typeof objonchange==function)objonchange(); } else if (Wicket.AutoCompleteSettings.enterHidesWithNoSelection==true) { hideAutoComplete(); hidingAutocomplete=1; } mouseactive=0; - if(typeof objonkeydown==function)objonkeydown(); - if(typeof objonchange==function)objonchange(); + if(typeof objonkeydown==function)objonkeydown(); if(selected-1){ //return killEvent(event); @@ -151,7 +152,7 @@ if(wicketKeyCode(Wicket.fixEvent(event))==KEY_ENTER){ if(selected-1 || hidingAutocomplete==1){ hidingAutocomplete=0; - return killEvent(event); + return killEvent(event); } } if(typeof objonkeypress==function)objonkeypress(); @@ -231,7 +232,6 @@ } function hideAutoComplete(){ -hidingAutocomplete=1; visible=0; selected=-1; if ( document.getElementById(getMenuId()) )
svn commit: r642021 - /wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/wicket-autocomplete.js
Author: gseitz Date: Thu Mar 27 16:14:01 2008 New Revision: 642021 URL: http://svn.apache.org/viewvc?rev=642021view=rev Log: WICKET-1329: set z-index to 3 (higher than modal window) Modified: wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/wicket-autocomplete.js Modified: wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/wicket-autocomplete.js URL: http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/wicket-autocomplete.js?rev=642021r1=642020r2=642021view=diff == --- wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/wicket-autocomplete.js (original) +++ wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/wicket-autocomplete.js Thu Mar 27 16:14:01 2008 @@ -172,7 +172,7 @@ choiceDiv.className = wicket-aa; choiceDiv.style.display = none; choiceDiv.style.position = absolute; -choiceDiv.style.zIndex = 1; +choiceDiv.style.zIndex = 3; // WICKET-1350/WICKET-1351 choiceDiv.onmouseout=function() {mouseactive=0;};
svn commit: r642034 - in /wicket/trunk/jdk-1.4/wicket-velocity/src: main/java/org/apache/wicket/velocity/markup/html/VelocityPanel.java test/java/org/apache/wicket/contrib/markup/html/velocity/Velocit
Author: gseitz Date: Thu Mar 27 16:53:24 2008 New Revision: 642034 URL: http://svn.apache.org/viewvc?rev=642034view=rev Log: WICKET-1268 Modified: wicket/trunk/jdk-1.4/wicket-velocity/src/main/java/org/apache/wicket/velocity/markup/html/VelocityPanel.java wicket/trunk/jdk-1.4/wicket-velocity/src/test/java/org/apache/wicket/contrib/markup/html/velocity/VelocityWithMarkupParsingPage.java Modified: wicket/trunk/jdk-1.4/wicket-velocity/src/main/java/org/apache/wicket/velocity/markup/html/VelocityPanel.java URL: http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket-velocity/src/main/java/org/apache/wicket/velocity/markup/html/VelocityPanel.java?rev=642034r1=642033r2=642034view=diff == --- wicket/trunk/jdk-1.4/wicket-velocity/src/main/java/org/apache/wicket/velocity/markup/html/VelocityPanel.java (original) +++ wicket/trunk/jdk-1.4/wicket-velocity/src/main/java/org/apache/wicket/velocity/markup/html/VelocityPanel.java Thu Mar 27 16:53:24 2008 @@ -67,7 +67,7 @@ *optional model for variable substituation. * @param templateResource *The template resource -* @return +* @return an instance of [EMAIL PROTECTED] VelocityPanel} */ public static VelocityPanel forTemplateResource(String id, IModel model, final IStringResourceStream templateResource) @@ -87,6 +87,23 @@ } /** +* Is used to cache the evaluated template and is nulled in onDetach(). +*/ + private transient String evaluatedTemplate; + + /** +* Is used to store the markupStream parameter in onComponentTagBody and is nulled in +* onDetach(). +*/ + private transient MarkupStream currentMarkupStream; + + /** +* Is used to store the markupStream parameter in onComponentTagBody and is nulled in +* onDetach(). +*/ + private transient ComponentTag currentOpenTag; + + /** * Construct. * * @param id @@ -173,9 +190,44 @@ */ protected void onComponentTagBody(final MarkupStream markupStream, final ComponentTag openTag) { + currentMarkupStream = markupStream; + currentOpenTag = openTag; + final Reader templateReader = getTemplateReader(); if (templateReader != null) { + String result = evaluateVelocityTemplate(templateReader); + if (!parseGeneratedMarkup()) + { + // now replace the body of the tag with the velocity merge + // result + replaceComponentTagBody(markupStream, openTag, result); + } + else + { + Markup markup = getMarkup(result); + markupStream.skipRawMarkup(); + renderAll(new MarkupStream(markup)); + } + } + else + { + replaceComponentTagBody(markupStream, openTag, ); // just empty it + } + } + + + /** +* Evaluates the template and returns the result. +* +* @param templateReader +*used to read the template +* @return the result of evaluating the velocity template +*/ + private String evaluateVelocityTemplate(Reader templateReader) + { + if (evaluatedTemplate == null) + { // Get model as a map final Map map = (Map)getModelObject(); @@ -202,53 +254,62 @@ // does not break the rest of the page result = Strings.escapeMarkup(result).toString(); } - - if (!parseGeneratedMarkup()) - { - // now replace the body of the tag with the velocity merge - // result - replaceComponentTagBody(markupStream, openTag, result); - } - else - { - // now parse the velocity merge result - Markup markup; - try - { - MarkupParser parser = getApplication().getMarkupSettings() - .getMarkupParserFactory().newMarkupParser
svn commit: r642063 - /wicket/trunk/jdk-1.4/wicket-velocity/src/main/java/org/apache/wicket/velocity/markup/html/VelocityPanel.java
Author: gseitz Date: Thu Mar 27 19:07:34 2008 New Revision: 642063 URL: http://svn.apache.org/viewvc?rev=642063view=rev Log: WICKET-1268: use IMarkupResourceStreamProvider for the velocity template Modified: wicket/trunk/jdk-1.4/wicket-velocity/src/main/java/org/apache/wicket/velocity/markup/html/VelocityPanel.java Modified: wicket/trunk/jdk-1.4/wicket-velocity/src/main/java/org/apache/wicket/velocity/markup/html/VelocityPanel.java URL: http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket-velocity/src/main/java/org/apache/wicket/velocity/markup/html/VelocityPanel.java?rev=642063r1=642062r2=642063view=diff == --- wicket/trunk/jdk-1.4/wicket-velocity/src/main/java/org/apache/wicket/velocity/markup/html/VelocityPanel.java (original) +++ wicket/trunk/jdk-1.4/wicket-velocity/src/main/java/org/apache/wicket/velocity/markup/html/VelocityPanel.java Thu Mar 27 19:07:34 2008 @@ -27,16 +27,16 @@ import org.apache.velocity.exception.MethodInvocationException; import org.apache.velocity.exception.ParseErrorException; import org.apache.velocity.exception.ResourceNotFoundException; +import org.apache.wicket.MarkupContainer; import org.apache.wicket.WicketRuntimeException; import org.apache.wicket.markup.ComponentTag; -import org.apache.wicket.markup.Markup; -import org.apache.wicket.markup.MarkupParser; -import org.apache.wicket.markup.MarkupResourceStream; +import org.apache.wicket.markup.IMarkupCacheKeyProvider; +import org.apache.wicket.markup.IMarkupResourceStreamProvider; import org.apache.wicket.markup.MarkupStream; import org.apache.wicket.markup.html.panel.Panel; import org.apache.wicket.model.IModel; +import org.apache.wicket.util.resource.IResourceStream; import org.apache.wicket.util.resource.IStringResourceStream; -import org.apache.wicket.util.resource.ResourceStreamNotFoundException; import org.apache.wicket.util.resource.StringResourceStream; import org.apache.wicket.util.string.Strings; @@ -56,6 +56,9 @@ * /p */ public abstract class VelocityPanel extends Panel + implements + IMarkupResourceStreamProvider, + IMarkupCacheKeyProvider { /** * Convenience factory method to create a [EMAIL PROTECTED] VelocityPanel} instance with a given @@ -86,24 +89,10 @@ }; } - /** -* Is used to cache the evaluated template and is nulled in onDetach(). -*/ + private transient String stackTraceAsString; private transient String evaluatedTemplate; /** -* Is used to store the markupStream parameter in onComponentTagBody and is nulled in -* onDetach(). -*/ - private transient MarkupStream currentMarkupStream; - - /** -* Is used to store the markupStream parameter in onComponentTagBody and is nulled in -* onDetach(). -*/ - private transient ComponentTag currentOpenTag; - - /** * Construct. * * @param id @@ -142,6 +131,44 @@ } /** +* @see org.apache.wicket.markup.html.panel.Panel#onComponentTagBody(org.apache.wicket.markup.MarkupStream, +* org.apache.wicket.markup.ComponentTag) +*/ + protected void onComponentTagBody(MarkupStream markupStream, ComponentTag openTag) + { + if (!Strings.isEmpty(stackTraceAsString)) + { + // TODO: only display the velocity error/stacktrace in development mode? + replaceComponentTagBody(markupStream, openTag, Strings + .toMultilineMarkup(stackTraceAsString)); + } + else if (!parseGeneratedMarkup()) + { + replaceComponentTagBody(markupStream, openTag, + evaluateVelocityTemplate(getTemplateReader())); + } + else + { + super.onComponentTagBody(markupStream, openTag); + } + } + + /** +* @see org.apache.wicket.Component#onBeforeRender() +*/ + protected void onBeforeRender() + { + // check that no components have been added in case the generated markup should not be + // parsed + if (!parseGeneratedMarkup() size() 0) + { + throw new WicketRuntimeException( + Components cannot be added if the generated markup should not be parsed.); + } + super.onBeforeRender(); + } + + /** * Either print or rethrow the throwable. * * @param exception @@ -151,14 +178,12 @@ * @param openTag *the open tag */ - private void onException(final Exception
svn commit: r641235 - /wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/wicket-autocomplete.js
Author: gseitz Date: Wed Mar 26 03:26:48 2008 New Revision: 641235 URL: http://svn.apache.org/viewvc?rev=641235view=rev Log: WICKET-1280: onchange gets called twice after selection with click Modified: wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/wicket-autocomplete.js Modified: wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/wicket-autocomplete.js URL: http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/wicket-autocomplete.js?rev=641235r1=641234r2=641235view=diff == --- wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/wicket-autocomplete.js (original) +++ wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/wicket-autocomplete.js Wed Mar 26 03:26:48 2008 @@ -59,13 +59,21 @@ objonblur = obj.onblur; objonkeyup = obj.onkeyup; objonkeypress = obj.onkeypress; + +// WICKET-1280 +objonchangeoriginal = obj.onchange; +obj.onchange=function(event){ + if(mouseactive==1) return false; + if(typeof objonchangeoriginal == function)objonchangeoriginal(); + } objonchange = obj.onchange; - - obj.onblur=function(event){ + + obj.onblur=function(event){ + Wicket.Log.info('onBlur:' + mouseactive); if(mouseactive==1)return false; hideAutoComplete(); } - + obj.onkeydown=function(event){ switch(wicketKeyCode(Wicket.fixEvent(event))){ case KEY_UP: @@ -102,7 +110,7 @@ hideAutoComplete(); hidingAutocomplete=1; } - + mouseactive=0; if(typeof objonkeydown == function)objonkeydown(); if(typeof objonchange == function)objonchange(); @@ -255,6 +263,7 @@ var node=element.firstChild.childNodes[i]; node.onclick = function(event){ + mouseactive=0; wicketGet(elementId).value=getSelectedValue(); if(typeof objonchange == function)objonchange(); hideAutoComplete();
svn commit: r641248 - /wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/wicket-autocomplete.js
Author: gseitz Date: Wed Mar 26 03:57:40 2008 New Revision: 641248 URL: http://svn.apache.org/viewvc?rev=641248view=rev Log: removed log statement Modified: wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/wicket-autocomplete.js Modified: wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/wicket-autocomplete.js URL: http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/wicket-autocomplete.js?rev=641248r1=641247r2=641248view=diff == --- wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/wicket-autocomplete.js (original) +++ wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/wicket-autocomplete.js Wed Mar 26 03:57:40 2008 @@ -69,7 +69,6 @@ objonchange = obj.onchange; obj.onblur=function(event){ - Wicket.Log.info('onBlur:' + mouseactive); if(mouseactive==1)return false; hideAutoComplete(); }
svn commit: r641655 - /wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/authentication/MySignInPage.java
Author: gseitz Date: Wed Mar 26 17:22:19 2008 New Revision: 641655 URL: http://svn.apache.org/viewvc?rev=641655view=rev Log: WICKET-1452: javadoc fix Modified: wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/authentication/MySignInPage.java Modified: wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/authentication/MySignInPage.java URL: http://svn.apache.org/viewvc/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/authentication/MySignInPage.java?rev=641655r1=641654r2=641655view=diff == --- wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/authentication/MySignInPage.java (original) +++ wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/authentication/MySignInPage.java Wed Mar 26 17:22:19 2008 @@ -21,7 +21,7 @@ /** - * Simple example of a sign in page. It extends MySignInPage, a base class which provide standard + * Simple example of a sign in page. It extends SignInPage, a base class which provide standard * functionality for typical log-in pages * * @author Jonathan Locke
svn commit: r640239 - in /wicket/trunk/jdk-1.5/wicket-auth-roles/src: main/java/org/apache/wicket/authentication/AuthenticatedWebApplication.java test/java/wicket/authorization/strategies/role/
Author: gseitz Date: Sun Mar 23 12:28:47 2008 New Revision: 640239 URL: http://svn.apache.org/viewvc?rev=640239view=rev Log: WICKET-1423 Removed: wicket/trunk/jdk-1.5/wicket-auth-roles/src/test/java/wicket/authorization/strategies/role/ Modified: wicket/trunk/jdk-1.5/wicket-auth-roles/src/main/java/org/apache/wicket/authentication/AuthenticatedWebApplication.java Modified: wicket/trunk/jdk-1.5/wicket-auth-roles/src/main/java/org/apache/wicket/authentication/AuthenticatedWebApplication.java URL: http://svn.apache.org/viewvc/wicket/trunk/jdk-1.5/wicket-auth-roles/src/main/java/org/apache/wicket/authentication/AuthenticatedWebApplication.java?rev=640239r1=640238r2=640239view=diff == --- wicket/trunk/jdk-1.5/wicket-auth-roles/src/main/java/org/apache/wicket/authentication/AuthenticatedWebApplication.java (original) +++ wicket/trunk/jdk-1.5/wicket-auth-roles/src/main/java/org/apache/wicket/authentication/AuthenticatedWebApplication.java Sun Mar 23 12:28:47 2008 @@ -53,7 +53,7 @@ public AuthenticatedWebApplication() { // Get web session class to instantiate - this.webSessionClassRef = new WeakReferenceClass ? extends AuthenticatedWebSession( + webSessionClassRef = new WeakReferenceClass ? extends AuthenticatedWebSession( getWebSessionClass()); } @@ -111,9 +111,8 @@ { try { - return webSessionClassRef.get().getDeclaredConstructor( - AuthenticatedWebApplication.class, Request.class).newInstance( - AuthenticatedWebApplication.this, request); + return webSessionClassRef.get().getDeclaredConstructor(Request.class).newInstance( + request); } catch (Exception e) {
svn commit: r640096 - /wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/form/Form.java
Author: gseitz Date: Sat Mar 22 15:21:11 2008 New Revision: 640096 URL: http://svn.apache.org/viewvc?rev=640096view=rev Log: WICKET-1442: skip multipart handling during ajax request Modified: wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/form/Form.java Modified: wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/form/Form.java URL: http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/form/Form.java?rev=640096r1=640095r2=640096view=diff == --- wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/form/Form.java (original) +++ wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/form/Form.java Sat Mar 22 15:21:11 2008 @@ -1409,7 +1409,7 @@ */ protected boolean handleMultiPart() { - if (multiPart) + if (multiPart !((WebRequest)getRequest()).isAjax()) { // Change the request to a multipart web request so parameters are // parsed out correctly
svn commit: r636162 - in /wicket/common/wicket-site-skin/src/main/resources: META-INF/maven/site.vm style/wicket.css
Author: gseitz Date: Tue Mar 11 17:36:26 2008 New Revision: 636162 URL: http://svn.apache.org/viewvc?rev=636162view=rev Log: updated to post-graduation Modified: wicket/common/wicket-site-skin/src/main/resources/META-INF/maven/site.vm wicket/common/wicket-site-skin/src/main/resources/style/wicket.css Modified: wicket/common/wicket-site-skin/src/main/resources/META-INF/maven/site.vm URL: http://svn.apache.org/viewvc/wicket/common/wicket-site-skin/src/main/resources/META-INF/maven/site.vm?rev=636162r1=636161r2=636162view=diff == --- wicket/common/wicket-site-skin/src/main/resources/META-INF/maven/site.vm (original) +++ wicket/common/wicket-site-skin/src/main/resources/META-INF/maven/site.vm Tue Mar 11 17:36:26 2008 @@ -38,7 +38,7 @@ #if ( $alignedFileName == $subitemHref ) #set ( $display = true ) #end - + $display $subitem #displayTree( $display $subitem ) #end #end @@ -112,16 +112,14 @@ /head body div id=container - div id=headera href=http://incubator.apache.org/wicket;h1 id=logospanApache Wicket/span/h1/a/div + div id=headera href=http://wicket.apache.org/;h1 id=logospanApache Wicket/span/h1/a/div div id=contentwrapper div id=contentbody $bodyContent /div /div div id=navigation - #mainMenu( $decoration.body.menus ) - div id=clearer/div - a href=http://incubator.apache.org/projects/wicket;h3 id=incubatorspanNow incubating!/span/h3/a + #mainMenu( $decoration.body.menus ) /div div id=clearer/div Modified: wicket/common/wicket-site-skin/src/main/resources/style/wicket.css URL: http://svn.apache.org/viewvc/wicket/common/wicket-site-skin/src/main/resources/style/wicket.css?rev=636162r1=636161r2=636162view=diff == --- wicket/common/wicket-site-skin/src/main/resources/style/wicket.css (original) +++ wicket/common/wicket-site-skin/src/main/resources/style/wicket.css Tue Mar 11 17:36:26 2008 @@ -36,7 +36,7 @@ } #header{ - background:#e8590a url('logo_graduated.png'); + background:#e8590a url('logo.png'); width:899px; margin-left: 28px; height:108px; @@ -132,21 +132,13 @@ } #logo { - background: #ff url('logo_graduated.png') no-repeat left bottom; + background: #ff url('logo.png') no-repeat left bottom; height : 108px; width : 300px; position : absolute; //top : -9px; margin-top : 0px; top: 0px; -} - -#incubator { - display : none; - background: #ff url('nowincubating.png') no-repeat left bottom; - height : 97px; - width : 139px; - padding-top : 4em; } #footer{
svn commit: r634869 - /wicket/trunk/jdk-1.4/wicket-datetime/src/main/java/org/apache/wicket/datetime/StyleDateConverter.java
Author: gseitz Date: Fri Mar 7 15:59:04 2008 New Revision: 634869 URL: http://svn.apache.org/viewvc?rev=634869view=rev Log: WICKET-1401 Modified: wicket/trunk/jdk-1.4/wicket-datetime/src/main/java/org/apache/wicket/datetime/StyleDateConverter.java Modified: wicket/trunk/jdk-1.4/wicket-datetime/src/main/java/org/apache/wicket/datetime/StyleDateConverter.java URL: http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket-datetime/src/main/java/org/apache/wicket/datetime/StyleDateConverter.java?rev=634869r1=634868r2=634869view=diff == --- wicket/trunk/jdk-1.4/wicket-datetime/src/main/java/org/apache/wicket/datetime/StyleDateConverter.java (original) +++ wicket/trunk/jdk-1.4/wicket-datetime/src/main/java/org/apache/wicket/datetime/StyleDateConverter.java Fri Mar 7 15:59:04 2008 @@ -115,7 +115,8 @@ */ protected DateTimeFormatter getFormat() { - DateTimeFormatter dtf = DateTimeFormat.forPattern(getDatePattern()).withPivotYear(2000); + DateTimeFormatter dtf = DateTimeFormat.forPattern(getDatePattern()).withLocale(getLocale()) + .withPivotYear(2000); return dtf; } }
svn commit: r634871 - /wicket/trunk/jdk-1.4/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/AbstractCalendar.java
Author: gseitz Date: Fri Mar 7 16:04:23 2008 New Revision: 634871 URL: http://svn.apache.org/viewvc?rev=634871view=rev Log: WICKET-1377 Modified: wicket/trunk/jdk-1.4/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/AbstractCalendar.java Modified: wicket/trunk/jdk-1.4/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/AbstractCalendar.java URL: http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/AbstractCalendar.java?rev=634871r1=634870r2=634871view=diff == --- wicket/trunk/jdk-1.4/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/AbstractCalendar.java (original) +++ wicket/trunk/jdk-1.4/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/AbstractCalendar.java Fri Mar 7 16:04:23 2008 @@ -89,11 +89,11 @@ *false), your page header should look like: * * pre -* lt;script type=quot;text/javascriptquot; src=quot;yahoo.jsquot;gt;lt;/scriptgt; -* lt;script type=quot;text/javascriptquot; src=quot;dom.jsquot;gt;lt;/scriptgt; -* lt;script type=quot;text/javascriptquot; src=quot;event.jsquot;gt;lt;/scriptgt; -* lt;script type=quot;text/javascriptquot; src=quot;calendar.jsquot;gt;lt;/scriptgt; -* lt;link rel=quot;stylesheetquot; type=quot;text/cssquot; href=quot;calendar.cssquot; /gt; +* lt;script type=quot;text/javascriptquot; src=quot;yahoo.jsquot;gt;lt;/scriptgt; +* lt;script type=quot;text/javascriptquot; src=quot;dom.jsquot;gt;lt;/scriptgt; +* lt;script type=quot;text/javascriptquot; src=quot;event.jsquot;gt;lt;/scriptgt; +* lt;script type=quot;text/javascriptquot; src=quot;calendar.jsquot;gt;lt;/scriptgt; +* lt;link rel=quot;stylesheetquot; type=quot;text/cssquot; href=quot;calendar.cssquot; /gt; * /pre */ public AbstractCalendar(String id, boolean contributeDependencies) @@ -229,11 +229,9 @@ */ private void contributeDependencies() { - add(HeaderContributor.forJavaScript(YuiLib.class, yahoo.js)); - add(HeaderContributor.forJavaScript(YuiLib.class, event.js)); - add(HeaderContributor.forJavaScript(YuiLib.class, dom.js)); - add(HeaderContributor.forJavaScript(AbstractCalendar.class, calendar.js)); - add(HeaderContributor.forCss(AbstractCalendar.class, assets/calendar.css)); + add(HeaderContributor.forJavaScript(YuiLib.class, yahoo-dom-event/yahoo-dom-event.js)); + add(HeaderContributor.forJavaScript(AbstractCalendar.class, calendar-min.js)); + add(HeaderContributor.forCss(AbstractCalendar.class, assets/skins/sam/calendar.css)); } /**