svn commit: r1221136 - /wicket/branches/wicket-1.5.x/wicket-core/
Author: jcompagner Date: Tue Dec 20 08:22:09 2011 New Revision: 1221136 URL: http://svn.apache.org/viewvc?rev=1221136view=rev Log: just some merge properties on the project igor already did my port (was very busy yesterday afternoon) Modified: wicket/branches/wicket-1.5.x/wicket-core/ (props changed) Propchange: wicket/branches/wicket-1.5.x/wicket-core/ -- --- svn:mergeinfo (original) +++ svn:mergeinfo Tue Dec 20 08:22:09 2011 @@ -1,5 +1,5 @@ /wicket/branches/wicket-1.3.x/jdk-1.4/wicket:653208,653212,653215,653226,653231,654304,655446,655466,655786,658141,658189,659118,659120,662360,663058,671549,671885,687144-688996,698530-698577,701132-701133,701843,701850-701877,704231,708127,722099-722105,726536,728467-728490,731960,734478,739647,739951,745468-745497,749817,755171-755176,759905,760374,764756,769389,769440,774373,781715,781719,790879 -/wicket/branches/wicket-1.4.x/wicket:963681,998663,1005194-1005196,1005201,1005205,1024347,1027877,1210482 +/wicket/branches/wicket-1.4.x/wicket:963681,998663,1005194-1005196,1005201,1005205,1024347,1027877,1210482,1220820 /wicket/sandbox/jthomerson/experimental/wicket-devutils/wicket:760296-760351,760353-760355 /wicket/trunk/wicket:1005201 /wicket/trunk/wicket-core:1204836,1204865,1211037
svn commit: r1221142 - /wicket/branches/wicket-1.5.x/wicket-core/src/main/java/org/apache/wicket/markup/html/panel/FeedbackPanel.java
Author: svenmeier Date: Tue Dec 20 08:38:26 2011 New Revision: 1221142 URL: http://svn.apache.org/viewvc?rev=1221142view=rev Log: WICKET-4258 feedback messages are cleared before wicket-devutils's PageView accesses the model object Modified: wicket/branches/wicket-1.5.x/wicket-core/src/main/java/org/apache/wicket/markup/html/panel/FeedbackPanel.java Modified: wicket/branches/wicket-1.5.x/wicket-core/src/main/java/org/apache/wicket/markup/html/panel/FeedbackPanel.java URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.5.x/wicket-core/src/main/java/org/apache/wicket/markup/html/panel/FeedbackPanel.java?rev=1221142r1=1221141r2=1221142view=diff == --- wicket/branches/wicket-1.5.x/wicket-core/src/main/java/org/apache/wicket/markup/html/panel/FeedbackPanel.java (original) +++ wicket/branches/wicket-1.5.x/wicket-core/src/main/java/org/apache/wicket/markup/html/panel/FeedbackPanel.java Tue Dec 20 08:38:26 2011 @@ -31,8 +31,10 @@ import org.apache.wicket.markup.html.Web import org.apache.wicket.markup.html.basic.Label; import org.apache.wicket.markup.html.list.ListItem; import org.apache.wicket.markup.html.list.ListView; +import org.apache.wicket.model.AbstractReadOnlyModel; import org.apache.wicket.model.IModel; import org.apache.wicket.model.Model; +import org.apache.wicket.protocol.http.WebSession; /** @@ -63,10 +65,36 @@ public class FeedbackPanel extends Panel } @Override + protected IModelFeedbackMessage getListItemModel( + final IModel? extends ListFeedbackMessage listViewModel, final int index) + { + return new AbstractReadOnlyModelFeedbackMessage() + { + private static final long serialVersionUID = 1L; + + /** +* WICKET-4258 Feedback messages might be cleared already. +* +* @see WebSession#cleanupFeedbackMessages() +*/ + @Override + public FeedbackMessage getObject() + { + if (index = listViewModel.getObject().size()) + { + return null; + } + else + { + return listViewModel.getObject().get(index); + } + } + }; + } + + @Override protected void populateItem(final ListItemFeedbackMessage listItem) { - final FeedbackMessage message = listItem.getModelObject(); - message.markRendered(); final IModelString replacementModel = new ModelString() { private static final long serialVersionUID = 1L; @@ -80,10 +108,12 @@ public class FeedbackPanel extends Panel @Override public String getObject() { - return getCSSClass(message); + return getCSSClass(listItem.getModelObject()); } }; + final FeedbackMessage message = listItem.getModelObject(); + message.markRendered(); final Component label = newMessageDisplayComponent(message, message); final AttributeModifier levelModifier = new AttributeModifier(class, replacementModel); label.add(levelModifier);
svn commit: r1221143 - /wicket/trunk/wicket-core/src/main/java/org/apache/wicket/markup/html/panel/FeedbackPanel.java
Author: svenmeier Date: Tue Dec 20 08:38:33 2011 New Revision: 1221143 URL: http://svn.apache.org/viewvc?rev=1221143view=rev Log: WICKET-4258 feedback messages are cleared before wicket-devutils's PageView accesses the model object Modified: wicket/trunk/wicket-core/src/main/java/org/apache/wicket/markup/html/panel/FeedbackPanel.java Modified: wicket/trunk/wicket-core/src/main/java/org/apache/wicket/markup/html/panel/FeedbackPanel.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/main/java/org/apache/wicket/markup/html/panel/FeedbackPanel.java?rev=1221143r1=1221142r2=1221143view=diff == --- wicket/trunk/wicket-core/src/main/java/org/apache/wicket/markup/html/panel/FeedbackPanel.java (original) +++ wicket/trunk/wicket-core/src/main/java/org/apache/wicket/markup/html/panel/FeedbackPanel.java Tue Dec 20 08:38:33 2011 @@ -31,8 +31,10 @@ import org.apache.wicket.markup.html.Web import org.apache.wicket.markup.html.basic.Label; import org.apache.wicket.markup.html.list.ListItem; import org.apache.wicket.markup.html.list.ListView; +import org.apache.wicket.model.AbstractReadOnlyModel; import org.apache.wicket.model.IModel; import org.apache.wicket.model.Model; +import org.apache.wicket.protocol.http.WebSession; /** @@ -63,10 +65,36 @@ public class FeedbackPanel extends Panel } @Override + protected IModelFeedbackMessage getListItemModel( + final IModel? extends ListFeedbackMessage listViewModel, final int index) + { + return new AbstractReadOnlyModelFeedbackMessage() + { + private static final long serialVersionUID = 1L; + + /** +* WICKET-4258 Feedback messages might be cleared already. +* +* @see WebSession#cleanupFeedbackMessages() +*/ + @Override + public FeedbackMessage getObject() + { + if (index = listViewModel.getObject().size()) + { + return null; + } + else + { + return listViewModel.getObject().get(index); + } + } + }; + } + + @Override protected void populateItem(final ListItemFeedbackMessage listItem) { - final FeedbackMessage message = listItem.getModelObject(); - message.markRendered(); final IModelString replacementModel = new ModelString() { private static final long serialVersionUID = 1L; @@ -80,10 +108,12 @@ public class FeedbackPanel extends Panel @Override public String getObject() { - return getCSSClass(message); + return getCSSClass(listItem.getModelObject()); } }; + final FeedbackMessage message = listItem.getModelObject(); + message.markRendered(); final Component label = newMessageDisplayComponent(message, message); final AttributeModifier levelModifier = new AttributeModifier(class, replacementModel); label.add(levelModifier);
[jira] [Resolved] (WICKET-4258) DebugBar displays stacktrace with FeedbackPanels
[ https://issues.apache.org/jira/browse/WICKET-4258?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sven Meier resolved WICKET-4258. Resolution: Fixed Fix Version/s: 6.0.0 1.5.4 added check for message in list model DebugBar displays stacktrace with FeedbackPanels Key: WICKET-4258 URL: https://issues.apache.org/jira/browse/WICKET-4258 Project: Wicket Issue Type: Bug Components: wicket-devutils Affects Versions: 1.5.3 Reporter: Juha Syrjälä Assignee: Sven Meier Priority: Minor Fix For: 1.5.4, 6.0.0 Attachments: WICKET-4258-quickstart.tar.gz, WICKET-4258.patch Clicking Inspector from DebugBar when a FeedbackPanel is displaying a message results in this stacktrace in log. Everything seems to work, extra stuff in logs is just annoying. ERROR - Component - Error while getting default model object for Component: [ListItem [Component id = 0, page = com.mycompany.HomePage, path = 8:form:feedback:feedbackul:messages:0.ListItem, isVisible = true, isVersioned = false], children = [Component id = message]] java.lang.IndexOutOfBoundsException: Index: 0 at java.util.Collections$EmptyList.get(Collections.java:3204) at org.apache.wicket.markup.html.list.ListItemModel.getObject(ListItemModel.java:58) at org.apache.wicket.Component.getDefaultModelObject(Component.java:1640) at org.apache.wicket.Component.getDefaultModelObjectAsString(Component.java:1668) at org.apache.wicket.markup.html.debug.PageView$4.component(PageView.java:211) at org.apache.wicket.markup.html.debug.PageView$4.component(PageView.java:184) at org.apache.wicket.util.visit.Visits.visitChildren(Visits.java:143) at org.apache.wicket.util.visit.Visits.visitChildren(Visits.java:161) at org.apache.wicket.util.visit.Visits.visitChildren(Visits.java:161) at org.apache.wicket.util.visit.Visits.visitChildren(Visits.java:161) at org.apache.wicket.util.visit.Visits.visitChildren(Visits.java:161) at org.apache.wicket.util.visit.Visits.visitChildren(Visits.java:122) at org.apache.wicket.util.visit.Visits.visitChildren(Visits.java:191) at org.apache.wicket.MarkupContainer.visitChildren(MarkupContainer.java:923) at org.apache.wicket.markup.html.debug.PageView.getComponentData(PageView.java:182) at org.apache.wicket.markup.html.debug.PageView.init(PageView.java:130) at org.apache.wicket.devutils.inspector.InspectorPage.init(InspectorPage.java:66) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:525) at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:173) at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:97) at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:47) at org.apache.wicket.DefaultMapperContext.newPageInstance(DefaultMapperContext.java:107) at org.apache.wicket.request.handler.PageProvider.resolvePageInstance(PageProvider.java:264) at org.apache.wicket.request.handler.PageProvider.getPageInstance(PageProvider.java:165) at org.apache.wicket.request.handler.render.PageRenderer.getPage(PageRenderer.java:78) at org.apache.wicket.request.handler.render.WebPageRenderer.renderPage(WebPageRenderer.java:105) at org.apache.wicket.request.handler.render.WebPageRenderer.respond(WebPageRenderer.java:224) at org.apache.wicket.request.handler.RenderPageRequestHandler.respond(RenderPageRequestHandler.java:167) at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:750) at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64) at org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:252) at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:209) at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:280) at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:162) at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:218) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1326) at
[jira] [Commented] (WICKET-4303) may be a 404 error when using mountPackage
[ https://issues.apache.org/jira/browse/WICKET-4303?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13173057#comment-13173057 ] Sven Meier commented on WICKET-4303: Works fine here with Firefox. Could you please retry with wicket-1.5.x head? may be a 404 error when using mountPackage -- Key: WICKET-4303 URL: https://issues.apache.org/jira/browse/WICKET-4303 Project: Wicket Issue Type: Bug Components: wicket Affects Versions: 1.5.3 Environment: Internet Explorer,Chrome (Probably occurs in any browser) Reporter: Masaya Seko Labels: wicket Attachments: wicket153mount.zip If the transition destination page mountPackage HomePage, which displays a 404 error when you click on the link the normal component. This would not be a bug? When you reload before click, the issue does not occur. Wicket 1.4 this issue does not happen. The stack trace below. WARN - WicketObjects - Could not resolve class [wicket153mount...] java.lang.ClassNotFoundException: wicket153mount/// at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:242) at org.apache.wicket.application.AbstractClassResolver.resolveClass(AbstractClassResolver.java:108) at org.apache.wicket.util.lang.WicketObjects.resolveClass(WicketObjects.java:68) at org.apache.wicket.request.mapper.AbstractComponentMapper.getPageClass(AbstractComponentMapper.java:138) at org.apache.wicket.request.mapper.PackageMapper.parseRequest(PackageMapper.java:142) at org.apache.wicket.request.mapper.AbstractBookmarkableMapper.mapRequest(AbstractBookmarkableMapper.java:263) at org.apache.wicket.request.mapper.mount.UnmountedMapperAdapter.mapRequest(UnmountedMapperAdapter.java:73) at org.apache.wicket.request.mapper.mount.MountMapper.mapRequest(MountMapper.java:131) at org.apache.wicket.request.mapper.CompoundRequestMapper.mapRequest(CompoundRequestMapper.java:130) at org.apache.wicket.request.cycle.RequestCycle.resolveRequestHandler(RequestCycle.java:181) at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:206) at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:280) at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:162) at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:218) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) at java.lang.Thread.run(Thread.java:595) -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira
svn commit: r1221169 - /wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/ModalWindow.java
Author: mgrigorov Date: Tue Dec 20 09:38:35 2011 New Revision: 1221169 URL: http://svn.apache.org/viewvc?rev=1221169view=rev Log: WICKET-3607 make ModalWindow CSS contibution more configurable cross link CSS configuration methods Modified: wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/ModalWindow.java Modified: wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/ModalWindow.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/ModalWindow.java?rev=1221169r1=1221168r2=1221169view=diff == --- wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/ModalWindow.java (original) +++ wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/ModalWindow.java Tue Dec 20 09:38:35 2011 @@ -278,6 +278,7 @@ public class ModalWindow extends Panel * other sources, e.g. a global CSS resource. * * @return The CSS resource reference or null if CSS is contributed via other means. +* @see #setCssClassName(String) */ protected ResourceReference newCssResource() { @@ -493,6 +494,7 @@ public class ModalWindow extends Panel * * @param cssClassName * @return this +* @see #newCssResource() */ public ModalWindow setCssClassName(final String cssClassName) {
svn commit: r1221173 - /wicket/trunk/wicket-core/src/test/java/org/apache/wicket/page/persistent/disk/DiskDataStoreTest.java
Author: mgrigorov Date: Tue Dec 20 09:59:58 2011 New Revision: 1221173 URL: http://svn.apache.org/viewvc?rev=1221173view=rev Log: Mark test as slow Modified: wicket/trunk/wicket-core/src/test/java/org/apache/wicket/page/persistent/disk/DiskDataStoreTest.java Modified: wicket/trunk/wicket-core/src/test/java/org/apache/wicket/page/persistent/disk/DiskDataStoreTest.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/test/java/org/apache/wicket/page/persistent/disk/DiskDataStoreTest.java?rev=1221173r1=1221172r2=1221173view=diff == --- wicket/trunk/wicket-core/src/test/java/org/apache/wicket/page/persistent/disk/DiskDataStoreTest.java (original) +++ wicket/trunk/wicket-core/src/test/java/org/apache/wicket/page/persistent/disk/DiskDataStoreTest.java Tue Dec 20 09:59:58 2011 @@ -31,14 +31,17 @@ import org.apache.wicket.pageStore.DiskD import org.apache.wicket.pageStore.IDataStore; import org.apache.wicket.settings.IStoreSettings; import org.apache.wicket.settings.def.StoreSettings; +import org.apache.wicket.util.SlowTests; import org.apache.wicket.util.lang.Bytes; import org.junit.Assert; import org.junit.Test; +import org.junit.experimental.categories.Category; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** */ +@Category(SlowTests.class) public class DiskDataStoreTest extends Assert { /** Log for reporting. */
svn commit: r1221177 - in /wicket/trunk: wicket-core/src/main/java/org/apache/wicket/markup/html/link/ wicket-core/src/main/java/org/apache/wicket/util/tester/ wicket-examples/src/main/java/org/apache
Author: mgrigorov Date: Tue Dec 20 10:04:28 2011 New Revision: 1221177 URL: http://svn.apache.org/viewvc?rev=1221177view=rev Log: Remove deprecated classes and methods. ITestPanelSource, ITestPageSource and BookmarkablePageLink#setParameter() Removed: wicket/trunk/wicket-core/src/main/java/org/apache/wicket/util/tester/ITestPageSource.java wicket/trunk/wicket-core/src/main/java/org/apache/wicket/util/tester/ITestPanelSource.java Modified: wicket/trunk/wicket-core/src/main/java/org/apache/wicket/markup/html/link/BookmarkablePageLink.java wicket/trunk/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java wicket/trunk/wicket-core/src/main/java/org/apache/wicket/util/tester/DummyHomePage.java wicket/trunk/wicket-core/src/main/java/org/apache/wicket/util/tester/DummyPanelPage.java wicket/trunk/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTester.java wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/library/BookDetails.java wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/linkomatic/Home.java Modified: wicket/trunk/wicket-core/src/main/java/org/apache/wicket/markup/html/link/BookmarkablePageLink.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/main/java/org/apache/wicket/markup/html/link/BookmarkablePageLink.java?rev=1221177r1=1221176r2=1221177view=diff == --- wicket/trunk/wicket-core/src/main/java/org/apache/wicket/markup/html/link/BookmarkablePageLink.java (original) +++ wicket/trunk/wicket-core/src/main/java/org/apache/wicket/markup/html/link/BookmarkablePageLink.java Tue Dec 20 10:04:28 2011 @@ -139,62 +139,6 @@ public class BookmarkablePageLinkT ext // Instead they are dispatched by the request handling servlet. } - private void setParameterImpl(String key, Object value) - { - getPageParameters().set(key, value); - } - - /** -* Adds a given page property value to this link. -* -* @param property -*The property -* @param value -*The value -* @return This -* @deprecated Use {@link #getPageParameters()}.set() instead -*/ - @Deprecated - public BookmarkablePageLinkT setParameter(final String property, final int value) - { - setParameterImpl(property, Integer.toString(value)); - return this; - } - - /** -* Adds a given page property value to this link. -* -* @param property -*The property -* @param value -*The value -* @return This -* @deprecated Use {@link #getPageParameters()}.set() instead -*/ - @Deprecated - public BookmarkablePageLinkT setParameter(final String property, final long value) - { - setParameterImpl(property, Long.toString(value)); - return this; - } - - /** -* Adds a given page property value to this link. -* -* @param property -*The property -* @param value -*The value -* @return This -* @deprecated Use {@link #getPageParameters()}.set() instead -*/ - @Deprecated - public BookmarkablePageLinkT setParameter(final String property, final String value) - { - setParameterImpl(property, value); - return this; - } - /** * Gets the url to use for this link. * Modified: wicket/trunk/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java?rev=1221177r1=1221176r2=1221177view=diff == --- wicket/trunk/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java (original) +++ wicket/trunk/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java Tue Dec 20 10:04:28 2011 @@ -952,35 +952,6 @@ public class BaseWicketTester } /** -* Renders a codePage/code defined in codeTestPageSource/code. This is usually used when -* a page does not have default constructor. For example, a codeViewBook/code page requires -* a codeBook/code instance: -* -* pre -* tester.startPage(new TestPageSource() -* { -* public Page getTestPage() -* { -* Book mockBook = new Book(quot;myBookNamequot;); -* return new ViewBook(mockBook); -* } -* }); -* /pre -* -* @param testPageSource -*a
svn commit: r1221180 - in /wicket/trunk/wicket-core/src: main/java/org/apache/wicket/pageStore/memory/ test/java/org/apache/wicket/pageStore/memory/
Author: mgrigorov Date: Tue Dec 20 10:10:07 2011 New Revision: 1221180 URL: http://svn.apache.org/viewvc?rev=1221180view=rev Log: WICKET-4304 Rename interface DataStoreEvictionStrategy to IDataStoreEvictionStrategy Added: wicket/trunk/wicket-core/src/main/java/org/apache/wicket/pageStore/memory/IDataStoreEvictionStrategy.java (contents, props changed) - copied, changed from r1221150, wicket/trunk/wicket-core/src/main/java/org/apache/wicket/pageStore/memory/DataStoreEvictionStrategy.java Removed: wicket/trunk/wicket-core/src/main/java/org/apache/wicket/pageStore/memory/DataStoreEvictionStrategy.java Modified: wicket/trunk/wicket-core/src/main/java/org/apache/wicket/pageStore/memory/HttpSessionDataStore.java wicket/trunk/wicket-core/src/main/java/org/apache/wicket/pageStore/memory/MemorySizeEvictionStrategy.java wicket/trunk/wicket-core/src/main/java/org/apache/wicket/pageStore/memory/PageNumberEvictionStrategy.java wicket/trunk/wicket-core/src/test/java/org/apache/wicket/pageStore/memory/HttpSessionDataStoreTest.java Modified: wicket/trunk/wicket-core/src/main/java/org/apache/wicket/pageStore/memory/HttpSessionDataStore.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/main/java/org/apache/wicket/pageStore/memory/HttpSessionDataStore.java?rev=1221180r1=1221179r2=1221180view=diff == --- wicket/trunk/wicket-core/src/main/java/org/apache/wicket/pageStore/memory/HttpSessionDataStore.java (original) +++ wicket/trunk/wicket-core/src/main/java/org/apache/wicket/pageStore/memory/HttpSessionDataStore.java Tue Dec 20 10:10:07 2011 @@ -26,7 +26,7 @@ import org.slf4j.LoggerFactory; /** * A {@link DataStore} which stores the pages in the {@link HttpSession}. Uses - * {@link DataStoreEvictionStrategy} to keep the memory footprint reasonable. + * {@link IDataStoreEvictionStrategy} to keep the memory footprint reasonable. * * p * Usage: @@ -56,7 +56,7 @@ public class HttpSessionDataStore implem private final IPageManagerContext pageManagerContext; - private final DataStoreEvictionStrategy evictionStrategy; + private final IDataStoreEvictionStrategy evictionStrategy; /** * Construct. @@ -65,7 +65,7 @@ public class HttpSessionDataStore implem * @param evictionStrategy */ public HttpSessionDataStore(IPageManagerContext pageManagerContext, - DataStoreEvictionStrategy evictionStrategy) + IDataStoreEvictionStrategy evictionStrategy) { this.pageManagerContext = pageManagerContext; this.evictionStrategy = evictionStrategy; Copied: wicket/trunk/wicket-core/src/main/java/org/apache/wicket/pageStore/memory/IDataStoreEvictionStrategy.java (from r1221150, wicket/trunk/wicket-core/src/main/java/org/apache/wicket/pageStore/memory/DataStoreEvictionStrategy.java) URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/main/java/org/apache/wicket/pageStore/memory/IDataStoreEvictionStrategy.java?p2=wicket/trunk/wicket-core/src/main/java/org/apache/wicket/pageStore/memory/IDataStoreEvictionStrategy.javap1=wicket/trunk/wicket-core/src/main/java/org/apache/wicket/pageStore/memory/DataStoreEvictionStrategy.javar1=1221150r2=1221180rev=1221180view=diff == --- wicket/trunk/wicket-core/src/main/java/org/apache/wicket/pageStore/memory/DataStoreEvictionStrategy.java (original) +++ wicket/trunk/wicket-core/src/main/java/org/apache/wicket/pageStore/memory/IDataStoreEvictionStrategy.java Tue Dec 20 10:10:07 2011 @@ -21,7 +21,7 @@ package org.apache.wicket.pageStore.memo * An eviction strategy that decides whether the in-memory data structure used as page store should * be compacted */ -public interface DataStoreEvictionStrategy +public interface IDataStoreEvictionStrategy { /** Propchange: wicket/trunk/wicket-core/src/main/java/org/apache/wicket/pageStore/memory/IDataStoreEvictionStrategy.java -- svn:eol-style = native Modified: wicket/trunk/wicket-core/src/main/java/org/apache/wicket/pageStore/memory/MemorySizeEvictionStrategy.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/main/java/org/apache/wicket/pageStore/memory/MemorySizeEvictionStrategy.java?rev=1221180r1=1221179r2=1221180view=diff == --- wicket/trunk/wicket-core/src/main/java/org/apache/wicket/pageStore/memory/MemorySizeEvictionStrategy.java (original) +++ wicket/trunk/wicket-core/src/main/java/org/apache/wicket/pageStore/memory/MemorySizeEvictionStrategy.java Tue Dec 20 10:10:07 2011 @@ -23,7 +23,7 @@ import org.apache.wicket.util.lang.Wicke /** * An eviction strategy that keeps the data store size up to
[jira] [Resolved] (WICKET-4304) Rename interface DataStoreEvictionStrategy to IDataStoreEvictionStrategy
[ https://issues.apache.org/jira/browse/WICKET-4304?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Martin Grigorov resolved WICKET-4304. - Resolution: Fixed Fix Version/s: 6.0.0 Assignee: Martin Grigorov Rename interface DataStoreEvictionStrategy to IDataStoreEvictionStrategy -- Key: WICKET-4304 URL: https://issues.apache.org/jira/browse/WICKET-4304 Project: Wicket Issue Type: Improvement Components: wicket Affects Versions: 1.5.3 Reporter: Ernesto Reinaldo Barreiro Assignee: Martin Grigorov Priority: Trivial Labels: api-change Fix For: 6.0.0 Original Estimate: 0h Remaining Estimate: 0h Rename interface DataStoreEvictionStrategy to IDataStoreEvictionStrategy -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira
svn commit: r1221183 - /wicket/trunk/wicket-core/src/main/java/org/apache/wicket/request/resource/PackageResource.java
Author: mgrigorov Date: Tue Dec 20 10:15:05 2011 New Revision: 1221183 URL: http://svn.apache.org/viewvc?rev=1221183view=rev Log: WICKET-4306 Content type overriding in PackageResource Modified: wicket/trunk/wicket-core/src/main/java/org/apache/wicket/request/resource/PackageResource.java Modified: wicket/trunk/wicket-core/src/main/java/org/apache/wicket/request/resource/PackageResource.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/main/java/org/apache/wicket/request/resource/PackageResource.java?rev=1221183r1=1221182r2=1221183view=diff == --- wicket/trunk/wicket-core/src/main/java/org/apache/wicket/request/resource/PackageResource.java (original) +++ wicket/trunk/wicket-core/src/main/java/org/apache/wicket/request/resource/PackageResource.java Tue Dec 20 10:15:05 2011 @@ -254,15 +254,13 @@ public class PackageResource extends Abs return sendResourceError(resourceResponse, HttpServletResponse.SC_NOT_FOUND, Unable to find resource); - final String contentType; - if (Application.exists()) + String contentType = resourceStream.getContentType(); + + if (contentType == null Application.exists()) { contentType = Application.get().getMimeType(path); } - else - { - contentType = resourceStream.getContentType(); - } + // set Content-Type (may be null) resourceResponse.setContentType(contentType);
svn commit: r1221184 - /wicket/branches/wicket-1.5.x/wicket-core/src/main/java/org/apache/wicket/request/resource/PackageResource.java
Author: mgrigorov Date: Tue Dec 20 10:16:16 2011 New Revision: 1221184 URL: http://svn.apache.org/viewvc?rev=1221184view=rev Log: WICKET-4306 Content type overriding in PackageResource Modified: wicket/branches/wicket-1.5.x/wicket-core/src/main/java/org/apache/wicket/request/resource/PackageResource.java Modified: wicket/branches/wicket-1.5.x/wicket-core/src/main/java/org/apache/wicket/request/resource/PackageResource.java URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.5.x/wicket-core/src/main/java/org/apache/wicket/request/resource/PackageResource.java?rev=1221184r1=1221183r2=1221184view=diff == --- wicket/branches/wicket-1.5.x/wicket-core/src/main/java/org/apache/wicket/request/resource/PackageResource.java (original) +++ wicket/branches/wicket-1.5.x/wicket-core/src/main/java/org/apache/wicket/request/resource/PackageResource.java Tue Dec 20 10:16:16 2011 @@ -252,15 +252,13 @@ public class PackageResource extends Abs return sendResourceError(resourceResponse, HttpServletResponse.SC_NOT_FOUND, Unable to find resource); - final String contentType; - if (Application.exists()) + String contentType = resourceStream.getContentType(); + + if (contentType == null Application.exists()) { contentType = Application.get().getMimeType(path); } - else - { - contentType = resourceStream.getContentType(); - } + // set Content-Type (may be null) resourceResponse.setContentType(contentType);
[jira] [Resolved] (WICKET-4306) Content type overriding in PackageResource
[ https://issues.apache.org/jira/browse/WICKET-4306?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Martin Grigorov resolved WICKET-4306. - Resolution: Fixed Fix Version/s: 6.0.0 1.5.4 Assignee: Martin Grigorov Content type overriding in PackageResource -- Key: WICKET-4306 URL: https://issues.apache.org/jira/browse/WICKET-4306 Project: Wicket Issue Type: Bug Components: wicket Affects Versions: 1.5.3 Reporter: Guillaume Smet Assignee: Martin Grigorov Priority: Minor Fix For: 1.5.4, 6.0.0 Hello, From my email on the dev@ list: In a Resource extending PackageResource (a LessCSS implementation), we set the content type on the ResourceStream to text/css. The problem is that PackageResource overrides it in newResourceResponse (starting from line 255 in 1.5.3): final String contentType; if (Application.exists()) { contentType = Application.get().getMimeType(path); } else { contentType = resourceStream.getContentType(); } If not null, shouldn't we give the resourceStream's content type a higher priority and use Application.get().getMimeType(path) only if it is null? IMHO we should probably have something like that: final String contentType = resourceStream.getContentType(); if (contentType == null Application.exists()) { contentType = Application.get().getMimeType(path); } Thanks. -- Guillaume -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Created] (WICKET-4308) onNewBrowserWindow wanted
onNewBrowserWindow wanted - Key: WICKET-4308 URL: https://issues.apache.org/jira/browse/WICKET-4308 Project: Wicket Issue Type: Wish Components: wicket Affects Versions: 1.5.3, 1.5.2, 1.5.1, 1.5.0 Reporter: count negative Priority: Minor I can't find the onNewBrowserWindow method on WebPage or org.apache.wicket.markup.html.INewBrowserWindowListener. So how do I detect a new opened window/browser tab in wicket 1.5+ -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira
svn commit: r1221191 - /wicket/trunk/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js
Author: mgrigorov Date: Tue Dec 20 10:33:29 2011 New Revision: 1221191 URL: http://svn.apache.org/viewvc?rev=1221191view=rev Log: Remove forgotten debug statement Modified: wicket/trunk/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js Modified: wicket/trunk/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js?rev=1221191r1=1221190r2=1221191view=diff == --- wicket/trunk/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js (original) +++ wicket/trunk/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js Tue Dec 20 10:33:29 2011 @@ -2266,7 +2266,6 @@ default: event.type = inputchange; var args = Array.prototype.slice.call( arguments, 0 ); -console.log('4', event.type, jQuery.event.special.inputchange.keyDownPressed); return jQuery.event.handle.apply( event.target, args ); } }
svn commit: r1221193 - in /wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete: AbstractAutoCompleteBehavior.java AutoCompleteSettings.java wicket-a
Author: mgrigorov Date: Tue Dec 20 10:46:31 2011 New Revision: 1221193 URL: http://svn.apache.org/viewvc?rev=1221193view=rev Log: WICKET-4305 Problems with AbstractAutoCompleteBehavior on BookmarkablePages Make it possible to configure custom name of the request parameter that brings the user input. Modified: wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/AbstractAutoCompleteBehavior.java wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/AutoCompleteSettings.java 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/AbstractAutoCompleteBehavior.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/AbstractAutoCompleteBehavior.java?rev=1221193r1=1221192r2=1221193view=diff == --- wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/AbstractAutoCompleteBehavior.java (original) +++ wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/AbstractAutoCompleteBehavior.java Tue Dec 20 10:46:31 2011 @@ -114,6 +114,7 @@ public abstract class AbstractAutoComple sb.append(,showListOnEmptyInput: ).append(settings.getShowListOnEmptyInput()); sb.append(,showListOnFocusGain: ).append(settings.getShowListOnFocusGain()); sb.append(,throttleDelay: ).append(settings.getThrottleDelay()); + sb.append(,parameterName: ').append(settings.getParameterName()).append('\''); sb.append(,showCompleteListOnFocusGain: ).append( settings.getShowCompleteListOnFocusGain()); if (settings.getCssClassName() != null) @@ -141,9 +142,10 @@ public abstract class AbstractAutoComple final RequestCycle requestCycle = RequestCycle.get(); final String val = requestCycle.getRequest() .getRequestParameters() - .getParameterValue(q) + .getParameterValue(settings.getParameterName()) .toOptionalString(); onRequest(val, requestCycle); } + } Modified: wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/AutoCompleteSettings.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/AutoCompleteSettings.java?rev=1221193r1=1221192r2=1221193view=diff == --- wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/AutoCompleteSettings.java (original) +++ wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/AutoCompleteSettings.java Tue Dec 20 10:46:31 2011 @@ -69,6 +69,8 @@ public final class AutoCompleteSettings private int throttleDelay = 300; + private String parameterName = q; + /** * Indicates whether the first item in the list is automatically selected when the autocomplete * list is shown. @@ -334,4 +336,25 @@ public final class AutoCompleteSettings this.useHideShowCoveredIEFix = useHideShowCoveredIEFix; return this; } + + /** +* Sets the name of the request parameter that will bring the value of the user input +* +* @param parameterName +* the name of the request parameter that will bring the value of the user input +* @return this {@link AutoCompleteSettings} +*/ + public AutoCompleteSettings setParameterName(final String parameterName) + { + this.parameterName = parameterName; + return this; + } + + /** +* @return the name of the request parameter that will bring the value of the user input +*/ + public String getParameterName() + { + return parameterName; + } } 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=1221193r1=1221192r2=1221193view=diff == ---
[jira] [Commented] (WICKET-4305) Problems with AbstractAutoCompleteBehavior on BookmarkablePages
[ https://issues.apache.org/jira/browse/WICKET-4305?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13173072#comment-13173072 ] Martin Grigorov commented on WICKET-4305: - Check the Subversion commits tab here to see how I did it in Wicket 6.0. The change revision is r1221193. If you like it and want it in Wicket 1.5 please port it and attach the patch here. There are minor differences in the .js part. Problems with AbstractAutoCompleteBehavior on BookmarkablePages --- Key: WICKET-4305 URL: https://issues.apache.org/jira/browse/WICKET-4305 Project: Wicket Issue Type: Bug Components: wicket-extensions Affects Versions: 1.5.3 Reporter: Daniel Peters AbstractAutoCompleteBehavior internally uses the GET parameter q. If you are on a bookmarkable page that also uses the parameter q (very common for searches), AutoCompleteTextFields wont work anymore. They will only see the original q parameter that has been used to call the page. The autocomplete appends the q= param to the URL and read it with getParameter(q). Since there are 2 params with the same name now, it will always get the first. My first fix was to rename the autocomplete parameter to something like wicketac:q, but this breaks WicketStuff-objectautocomplete which uses the same JS, so this is probably not a good idea. Another idea was to get the _last_ q-parameter of the URL in AbstractAutoCompleteBehavior. This works quite well... Code: protected void respond(final AjaxRequestTarget target) { final RequestCycle requestCycle = RequestCycle.get(); final ListStringValue values = requestCycle.getRequest().getRequestParameters() .getParameterValues(q); final String val = (values != null values.size() 0) ? values.get(values.size() - 1) .toOptionalString() : null; onRequest(val, requestCycle); } -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (WICKET-4307) Support javax.inject.Inject annotation in Guice and Spring integration
[ https://issues.apache.org/jira/browse/WICKET-4307?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Martin Grigorov updated WICKET-4307: Fix Version/s: 6.0.0 Support javax.inject.Inject annotation in Guice and Spring integration -- Key: WICKET-4307 URL: https://issues.apache.org/jira/browse/WICKET-4307 Project: Wicket Issue Type: New Feature Components: wicket-guice, wicket-spring Affects Versions: 1.5.3 Reporter: Mikko Tiihonen Fix For: 6.0.0 Attachments: wicket-javax.inject.patch With the attached patch wicket both GuiceComponentInjector and SpringComponentInjector will support wicket components fields injected with javax.inject.Inject - which is the standardized annotation supported by guice, spring and javaee6. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (WICKET-4064) Guice 3.0 integration does not support JSR-330 @javax.inject.Inject annotations
[ https://issues.apache.org/jira/browse/WICKET-4064?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Martin Grigorov resolved WICKET-4064. - Resolution: Duplicate Closing this ticket as duplicate of WICKET-4307 because it has attached patch. Guice 3.0 integration does not support JSR-330 @javax.inject.Inject annotations --- Key: WICKET-4064 URL: https://issues.apache.org/jira/browse/WICKET-4064 Project: Wicket Issue Type: New Feature Components: wicket-guice Affects Versions: 1.4.18, 1.5.0 Reporter: Lasse Lindgård Priority: Minor Fix For: 6.0.0 GuiceComponentInjector only checks for com.google.inject.Inject annotations, but Guice 3.0 also supports the JSR-330 javax.inject.Inject annotation. http://code.google.com/p/google-guice/wiki/JSR330 It would be nice if the wicket integration also supported the standard annotations. http://svn.apache.org/viewvc/wicket/trunk/wicket-guice/src/main/java/org/apache/wicket/guice/GuiceComponentInjector.java?revision=1062356view=markup -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (WICKET-3555) hasError() returns false on nested form with FileUploadField and defined max file upload size
[ https://issues.apache.org/jira/browse/WICKET-3555?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13173074#comment-13173074 ] Stein Desmet commented on WICKET-3555: -- I still have this problem in wicket 1.4.18. The issue actually comes from AjaxFormSubmitBehaviour, which does in onEvent(): getForm().getRootForm().onFormSubmitted(); but then does: if (!getForm().hasError()) { onSubmit(target); } However, if the file size was to big, only the root form will receive an error status, and not the submitting form (see Form.onFileUploadException() ). hasError() returns false on nested form with FileUploadField and defined max file upload size - Key: WICKET-3555 URL: https://issues.apache.org/jira/browse/WICKET-3555 Project: Wicket Issue Type: Bug Components: wicket Affects Versions: 1.4.16 Reporter: Alexander Morozov Assignee: Igor Vaynberg Attachments: modalproject2.zip The nested form have FileUploadField added and defined setMaxSize is set to 100K. In case of submitting the form thru Ajax file more than 100K, hasError() on the nested form return false. But I expect here 'true' - because of setMaxSize constraint violation. See also http://apache-wicket.1842946.n4.nabble.com/Nested-Forms-and-Multipart-Fileupload-Issue-td1844365.html -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira
svn commit: r1221201 - in /wicket/trunk: wicket-guice/src/main/java/org/apache/wicket/guice/ wicket-guice/src/test/java/org/apache/wicket/guice/ wicket-spring/src/main/java/org/apache/wicket/spring/in
Author: mgrigorov Date: Tue Dec 20 11:11:11 2011 New Revision: 1221201 URL: http://svn.apache.org/viewvc?rev=1221201view=rev Log: WICKET-4307 Support javax.inject.Inject annotation in Guice and Spring integration Added: wicket/trunk/wicket-guice/src/test/java/org/apache/wicket/guice/JavaxInjectGuiceInjectorTest.java wicket/trunk/wicket-guice/src/test/java/org/apache/wicket/guice/JavaxInjectTestBehavior.java wicket/trunk/wicket-guice/src/test/java/org/apache/wicket/guice/JavaxInjectTestComponent.java wicket/trunk/wicket-guice/src/test/java/org/apache/wicket/guice/JavaxInjectTestNoComponent.java wicket/trunk/wicket-guice/src/test/java/org/apache/wicket/guice/TestComponentInterface.java wicket/trunk/wicket-guice/src/test/java/org/apache/wicket/guice/TestNoComponentInterface.java wicket/trunk/wicket-spring/src/test/java/org/apache/wicket/spring/injection/annot/JavaxInjectAnnotProxyFieldValueFactoryTest.java wicket/trunk/wicket-spring/src/test/java/org/apache/wicket/spring/injection/util/InjectableInterface.java wicket/trunk/wicket-spring/src/test/java/org/apache/wicket/spring/injection/util/JavaxInjectable.java Modified: wicket/trunk/wicket-guice/src/main/java/org/apache/wicket/guice/GuiceFieldValueFactory.java wicket/trunk/wicket-guice/src/test/java/org/apache/wicket/guice/GuiceInjectorTest.java wicket/trunk/wicket-guice/src/test/java/org/apache/wicket/guice/TestComponent.java wicket/trunk/wicket-guice/src/test/java/org/apache/wicket/guice/TestNoComponent.java wicket/trunk/wicket-spring/src/main/java/org/apache/wicket/spring/injection/annot/AnnotProxyFieldValueFactory.java wicket/trunk/wicket-spring/src/test/java/org/apache/wicket/spring/injection/annot/AnnotProxyFieldValueFactoryTest.java wicket/trunk/wicket-spring/src/test/java/org/apache/wicket/spring/injection/util/Injectable.java Modified: wicket/trunk/wicket-guice/src/main/java/org/apache/wicket/guice/GuiceFieldValueFactory.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-guice/src/main/java/org/apache/wicket/guice/GuiceFieldValueFactory.java?rev=1221201r1=1221200r2=1221201view=diff == --- wicket/trunk/wicket-guice/src/main/java/org/apache/wicket/guice/GuiceFieldValueFactory.java (original) +++ wicket/trunk/wicket-guice/src/main/java/org/apache/wicket/guice/GuiceFieldValueFactory.java Tue Dec 20 11:11:11 2011 @@ -55,13 +55,14 @@ public class GuiceFieldValueFactory impl if (supportsField(field)) { Inject injectAnnotation = field.getAnnotation(Inject.class); - if (!Modifier.isStatic(field.getModifiers()) (injectAnnotation != null)) + javax.inject.Inject javaxInjectAnnotation = field.getAnnotation(javax.inject.Inject.class); + if (!Modifier.isStatic(field.getModifiers()) (injectAnnotation != null || javaxInjectAnnotation != null)) { try { Annotation bindingAnnotation = findBindingAnnotation(field.getAnnotations()); final IProxyTargetLocator locator = new GuiceProxyTargetLocator(field, - bindingAnnotation, injectAnnotation.optional()); + bindingAnnotation, injectAnnotation != null ? injectAnnotation.optional() : false); if (wrapInProxies) { @@ -101,7 +102,7 @@ public class GuiceFieldValueFactory impl */ public boolean supportsField(final Field field) { - return field.isAnnotationPresent(Inject.class); + return field.isAnnotationPresent(Inject.class) || field.isAnnotationPresent(javax.inject.Inject.class); } /** Modified: wicket/trunk/wicket-guice/src/test/java/org/apache/wicket/guice/GuiceInjectorTest.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-guice/src/test/java/org/apache/wicket/guice/GuiceInjectorTest.java?rev=1221201r1=1221200r2=1221201view=diff == --- wicket/trunk/wicket-guice/src/test/java/org/apache/wicket/guice/GuiceInjectorTest.java (original) +++ wicket/trunk/wicket-guice/src/test/java/org/apache/wicket/guice/GuiceInjectorTest.java Tue Dec 20 11:11:11 2011 @@ -90,15 +90,15 @@ public class GuiceInjectorTest extends A // Create a new component, which should be automatically injected, // and test to make sure the injection has worked. - TestComponent testComponent = new TestComponent(id); + TestComponentInterface testComponent = newTestComponent(id);
[jira] [Commented] (WICKET-4307) Support javax.inject.Inject annotation in Guice and Spring integration
[ https://issues.apache.org/jira/browse/WICKET-4307?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13173084#comment-13173084 ] Martin Grigorov commented on WICKET-4307: - The patch is applied in trunk. Probably we will make further improvements here so I'll leave the ticket open for now. The changes and the tests look good! Thanks! Support javax.inject.Inject annotation in Guice and Spring integration -- Key: WICKET-4307 URL: https://issues.apache.org/jira/browse/WICKET-4307 Project: Wicket Issue Type: New Feature Components: wicket-guice, wicket-spring Affects Versions: 1.5.3 Reporter: Mikko Tiihonen Fix For: 6.0.0 Attachments: wicket-javax.inject.patch With the attached patch wicket both GuiceComponentInjector and SpringComponentInjector will support wicket components fields injected with javax.inject.Inject - which is the standardized annotation supported by guice, spring and javaee6. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Issue Comment Edited] (WICKET-3555) hasError() returns false on nested form with FileUploadField and defined max file upload size
[ https://issues.apache.org/jira/browse/WICKET-3555?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13173074#comment-13173074 ] Stein Desmet edited comment on WICKET-3555 at 12/20/11 11:12 AM: - I still have this problem in wicket 1.4.18. The issue actually comes from AjaxFormSubmitBehaviour (which is used in AjaxButton to submit forms), doing the following in onEvent(): getForm().getRootForm().onFormSubmitted(); but then does: if (!getForm().hasError()) { onSubmit(target); } However, if the file size was to big, only the root form will receive an error status, and not the submitting form (see Form.onFileUploadException() ). was (Author: sgdesmet): I still have this problem in wicket 1.4.18. The issue actually comes from AjaxFormSubmitBehaviour, which does in onEvent(): getForm().getRootForm().onFormSubmitted(); but then does: if (!getForm().hasError()) { onSubmit(target); } However, if the file size was to big, only the root form will receive an error status, and not the submitting form (see Form.onFileUploadException() ). hasError() returns false on nested form with FileUploadField and defined max file upload size - Key: WICKET-3555 URL: https://issues.apache.org/jira/browse/WICKET-3555 Project: Wicket Issue Type: Bug Components: wicket Affects Versions: 1.4.16 Reporter: Alexander Morozov Assignee: Igor Vaynberg Attachments: modalproject2.zip The nested form have FileUploadField added and defined setMaxSize is set to 100K. In case of submitting the form thru Ajax file more than 100K, hasError() on the nested form return false. But I expect here 'true' - because of setMaxSize constraint violation. See also http://apache-wicket.1842946.n4.nabble.com/Nested-Forms-and-Multipart-Fileupload-Issue-td1844365.html -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (WICKET-3555) hasError() returns false on nested form with FileUploadField and defined max file upload size
[ https://issues.apache.org/jira/browse/WICKET-3555?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13173088#comment-13173088 ] Martin Grigorov commented on WICKET-3555: - Stein, create a new ticket with a quickstart. With a patch even better! hasError() returns false on nested form with FileUploadField and defined max file upload size - Key: WICKET-3555 URL: https://issues.apache.org/jira/browse/WICKET-3555 Project: Wicket Issue Type: Bug Components: wicket Affects Versions: 1.4.16 Reporter: Alexander Morozov Assignee: Igor Vaynberg Attachments: modalproject2.zip The nested form have FileUploadField added and defined setMaxSize is set to 100K. In case of submitting the form thru Ajax file more than 100K, hasError() on the nested form return false. But I expect here 'true' - because of setMaxSize constraint violation. See also http://apache-wicket.1842946.n4.nabble.com/Nested-Forms-and-Multipart-Fileupload-Issue-td1844365.html -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira
svn commit: r1221219 - /wicket/trunk/wicket-core/src/main/java/org/apache/wicket/ajax/markup/html/form/AjaxCheckBox.java
Author: mgrigorov Date: Tue Dec 20 12:15:58 2011 New Revision: 1221219 URL: http://svn.apache.org/viewvc?rev=1221219view=rev Log: WICKET-4302 Allow set Ajax settings for AjaxCheckBox Modified: wicket/trunk/wicket-core/src/main/java/org/apache/wicket/ajax/markup/html/form/AjaxCheckBox.java Modified: wicket/trunk/wicket-core/src/main/java/org/apache/wicket/ajax/markup/html/form/AjaxCheckBox.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/main/java/org/apache/wicket/ajax/markup/html/form/AjaxCheckBox.java?rev=1221219r1=1221218r2=1221219view=diff == --- wicket/trunk/wicket-core/src/main/java/org/apache/wicket/ajax/markup/html/form/AjaxCheckBox.java (original) +++ wicket/trunk/wicket-core/src/main/java/org/apache/wicket/ajax/markup/html/form/AjaxCheckBox.java Tue Dec 20 12:15:58 2011 @@ -16,6 +16,7 @@ */ package org.apache.wicket.ajax.markup.html.form; +import org.apache.wicket.ajax.AjaxRequestAttributes; import org.apache.wicket.ajax.AjaxRequestTarget; import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior; import org.apache.wicket.markup.html.form.CheckBox; @@ -59,6 +60,13 @@ public abstract class AjaxCheckBox exten private static final long serialVersionUID = 1L; @Override + protected void updateAjaxAttributes(AjaxRequestAttributes attributes) + { + super.updateAjaxAttributes(attributes); + AjaxCheckBox.this.updateAjaxAttributes(attributes); + } + + @Override protected void onUpdate(AjaxRequestTarget target) { AjaxCheckBox.this.onUpdate(target); @@ -67,6 +75,15 @@ public abstract class AjaxCheckBox exten } /** +* @param attributes +* the attributes to use for the Ajax request +* @see org.apache.wicket.ajax.AbstractDefaultAjaxBehavior#updateAjaxAttributes(org.apache.wicket.ajax.AjaxRequestAttributes) +*/ + protected void updateAjaxAttributes(final AjaxRequestAttributes attributes) + { + } + + /** * Listener method invoked on an ajax update call * * @param target
[jira] [Updated] (WICKET-4302) Allow set Ajax settings for AjaxCheckBox
[ https://issues.apache.org/jira/browse/WICKET-4302?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Martin Grigorov updated WICKET-4302: Fix Version/s: 6.0.0 1.5.4 Assignee: Martin Grigorov Summary: Allow set Ajax settings for AjaxCheckBox (was: AjaxCheckBox ) Allow set Ajax settings for AjaxCheckBox - Key: WICKET-4302 URL: https://issues.apache.org/jira/browse/WICKET-4302 Project: Wicket Issue Type: Improvement Components: wicket Affects Versions: 1.5.3 Reporter: Johannes Odland Assignee: Martin Grigorov Priority: Minor Fix For: 1.5.4, 6.0.0 Original Estimate: 4h Remaining Estimate: 4h AjaxCheckBox does not support providing an IAjaxCallDecorator the same way AjaxLink does. Beeing able to provide your own ajax decorator is convenient, if you want to run your own code before or after the ajax call is triggered. Suggested implementation as in AjaxLink follows: public abstract class AjaxCheckBox extends CheckBox { public AjaxCheckBox(final String id) { this(id, null); } public AjaxCheckBox(final String id, final IModelBoolean model) { super(id, model); setOutputMarkupId(true); add(new AjaxFormComponentUpdatingBehavior(onclick) { private static final long serialVersionUID = 1L; @Override protected void onUpdate(AjaxRequestTarget target) { AjaxCheckBox.this.onUpdate(target); } @Override protected IAjaxCallDecorator getAjaxCallDecorator() { return AjaxCheckBox.this.getAjaxCallDecorator(); } }); } /** * Returns ajax call decorator that will be used to decorate the ajax call. * * @return ajax call decorator */ protected IAjaxCallDecorator getAjaxCallDecorator() { return null; } /** * Listener method invoked on an ajax update call * * @param target target */ protected abstract void onUpdate(AjaxRequestTarget target); } -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira
svn commit: r1221220 - /wicket/branches/wicket-1.5.x/wicket-core/src/main/java/org/apache/wicket/ajax/markup/html/form/AjaxCheckBox.java
Author: mgrigorov Date: Tue Dec 20 12:18:23 2011 New Revision: 1221220 URL: http://svn.apache.org/viewvc?rev=1221220view=rev Log: WICKET-4302 Allow set Ajax settings for AjaxCheckBox Modified: wicket/branches/wicket-1.5.x/wicket-core/src/main/java/org/apache/wicket/ajax/markup/html/form/AjaxCheckBox.java Modified: wicket/branches/wicket-1.5.x/wicket-core/src/main/java/org/apache/wicket/ajax/markup/html/form/AjaxCheckBox.java URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.5.x/wicket-core/src/main/java/org/apache/wicket/ajax/markup/html/form/AjaxCheckBox.java?rev=1221220r1=1221219r2=1221220view=diff == --- wicket/branches/wicket-1.5.x/wicket-core/src/main/java/org/apache/wicket/ajax/markup/html/form/AjaxCheckBox.java (original) +++ wicket/branches/wicket-1.5.x/wicket-core/src/main/java/org/apache/wicket/ajax/markup/html/form/AjaxCheckBox.java Tue Dec 20 12:18:23 2011 @@ -16,7 +16,9 @@ */ package org.apache.wicket.ajax.markup.html.form; +import org.apache.wicket.ajax.AjaxChannel; import org.apache.wicket.ajax.AjaxRequestTarget; +import org.apache.wicket.ajax.IAjaxCallDecorator; import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior; import org.apache.wicket.markup.html.form.CheckBox; import org.apache.wicket.model.IModel; @@ -59,6 +61,18 @@ public abstract class AjaxCheckBox exten private static final long serialVersionUID = 1L; @Override + protected IAjaxCallDecorator getAjaxCallDecorator() + { + return AjaxCheckBox.this.getAjaxCallDecorator(); + } + + @Override + protected AjaxChannel getChannel() + { + return AjaxCheckBox.this.getChannel(); + } + + @Override protected void onUpdate(AjaxRequestTarget target) { AjaxCheckBox.this.onUpdate(target); @@ -66,6 +80,16 @@ public abstract class AjaxCheckBox exten }); } + protected AjaxChannel getChannel() + { + return null; + } + + protected IAjaxCallDecorator getAjaxCallDecorator() + { + return null; + } + /** * Listener method invoked on an ajax update call *
[jira] [Resolved] (WICKET-4302) Allow set Ajax settings for AjaxCheckBox
[ https://issues.apache.org/jira/browse/WICKET-4302?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Martin Grigorov resolved WICKET-4302. - Resolution: Fixed Allow set Ajax settings for AjaxCheckBox - Key: WICKET-4302 URL: https://issues.apache.org/jira/browse/WICKET-4302 Project: Wicket Issue Type: Improvement Components: wicket Affects Versions: 1.5.3 Reporter: Johannes Odland Assignee: Martin Grigorov Priority: Minor Fix For: 1.5.4, 6.0.0 Original Estimate: 4h Remaining Estimate: 4h AjaxCheckBox does not support providing an IAjaxCallDecorator the same way AjaxLink does. Beeing able to provide your own ajax decorator is convenient, if you want to run your own code before or after the ajax call is triggered. Suggested implementation as in AjaxLink follows: public abstract class AjaxCheckBox extends CheckBox { public AjaxCheckBox(final String id) { this(id, null); } public AjaxCheckBox(final String id, final IModelBoolean model) { super(id, model); setOutputMarkupId(true); add(new AjaxFormComponentUpdatingBehavior(onclick) { private static final long serialVersionUID = 1L; @Override protected void onUpdate(AjaxRequestTarget target) { AjaxCheckBox.this.onUpdate(target); } @Override protected IAjaxCallDecorator getAjaxCallDecorator() { return AjaxCheckBox.this.getAjaxCallDecorator(); } }); } /** * Returns ajax call decorator that will be used to decorate the ajax call. * * @return ajax call decorator */ protected IAjaxCallDecorator getAjaxCallDecorator() { return null; } /** * Listener method invoked on an ajax update call * * @param target target */ protected abstract void onUpdate(AjaxRequestTarget target); } -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (WICKET-4285) PageSavingThread.stop() blocks forever
[ https://issues.apache.org/jira/browse/WICKET-4285?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13173153#comment-13173153 ] Martin Grigorov commented on WICKET-4285: - Your fix for 1.5 breaks the unit tests. They hang now. See org.apache.wicket.page.persistent.disk.DiskDataStoreTest#store The patch for 1.4 is not very clear. Did you just wrap it with try/finally {stop = null; } ? PageSavingThread.stop() blocks forever -- Key: WICKET-4285 URL: https://issues.apache.org/jira/browse/WICKET-4285 Project: Wicket Issue Type: Improvement Components: wicket Affects Versions: 1.4.19 Reporter: Ortwin Glück Labels: patch Attachments: patch.diff, patch.diff The PageSavingThread may exit without nulling the stop flag. For example when an OutOfMemoryError or any other runtime exception is thrown in the run method. Properly set the flag in a finally clause. Is this class still present in 1.5? -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira
svn commit: r1221235 - /wicket/trunk/wicket-core/src/main/java/org/apache/wicket/request/resource/ResourceReference.java
Author: mgrigorov Date: Tue Dec 20 12:59:24 2011 New Revision: 1221235 URL: http://svn.apache.org/viewvc?rev=1221235view=rev Log: WICKET-4284 make getkey() in resourereference public Modified: wicket/trunk/wicket-core/src/main/java/org/apache/wicket/request/resource/ResourceReference.java Modified: wicket/trunk/wicket-core/src/main/java/org/apache/wicket/request/resource/ResourceReference.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/main/java/org/apache/wicket/request/resource/ResourceReference.java?rev=1221235r1=1221234r2=1221235view=diff == --- wicket/trunk/wicket-core/src/main/java/org/apache/wicket/request/resource/ResourceReference.java (original) +++ wicket/trunk/wicket-core/src/main/java/org/apache/wicket/request/resource/ResourceReference.java Tue Dec 20 12:59:24 2011 @@ -109,7 +109,7 @@ public abstract class ResourceReference * ResourceReferenceRegistry to make up the key under which the resource reference gets * stored. */ - Key getKey() + public Key getKey() { return data; } @@ -338,11 +338,11 @@ public abstract class ResourceReference { private static final long serialVersionUID = 1L; - final String scope; - final String name; - final Locale locale; - final String style; - final String variation; + private final String scope; + private final String name; + private final Locale locale; + private final String style; + private final String variation; /** * Construct.
[jira] [Resolved] (WICKET-4284) make getkey() in resourereference public
[ https://issues.apache.org/jira/browse/WICKET-4284?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Martin Grigorov resolved WICKET-4284. - Resolution: Fixed Assignee: Martin Grigorov make getkey() in resourereference public Key: WICKET-4284 URL: https://issues.apache.org/jira/browse/WICKET-4284 Project: Wicket Issue Type: Improvement Components: wicket Affects Versions: 1.5.3 Reporter: vineet semwal Assignee: Martin Grigorov Priority: Minor Fix For: 6.0.0 getKey() in resourcereference is not public ,it should be made public . thanks -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (WICKET-4285) PageSavingThread.stop() blocks forever
[ https://issues.apache.org/jira/browse/WICKET-4285?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ortwin Glück updated WICKET-4285: - Attachment: (was: patch.diff) PageSavingThread.stop() blocks forever -- Key: WICKET-4285 URL: https://issues.apache.org/jira/browse/WICKET-4285 Project: Wicket Issue Type: Improvement Components: wicket Affects Versions: 1.4.19 Reporter: Ortwin Glück Labels: patch Attachments: patch.diff The PageSavingThread may exit without nulling the stop flag. For example when an OutOfMemoryError or any other runtime exception is thrown in the run method. Properly set the flag in a finally clause. Is this class still present in 1.5? -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (WICKET-4285) PageSavingThread.stop() blocks forever
[ https://issues.apache.org/jira/browse/WICKET-4285?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ortwin Glück updated WICKET-4285: - Attachment: patch-1.5.diff patch for 1.5 that passes the test case PageSavingThread.stop() blocks forever -- Key: WICKET-4285 URL: https://issues.apache.org/jira/browse/WICKET-4285 Project: Wicket Issue Type: Improvement Components: wicket Affects Versions: 1.4.19 Reporter: Ortwin Glück Labels: patch Attachments: patch-1.5.diff, patch.diff The PageSavingThread may exit without nulling the stop flag. For example when an OutOfMemoryError or any other runtime exception is thrown in the run method. Properly set the flag in a finally clause. Is this class still present in 1.5? -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (WICKET-4285) PageSavingThread.stop() blocks forever
[ https://issues.apache.org/jira/browse/WICKET-4285?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13173166#comment-13173166 ] Ortwin Glück commented on WICKET-4285: -- Martin, yes the 1.4 patch is as trivial as you think it is :) PageSavingThread.stop() blocks forever -- Key: WICKET-4285 URL: https://issues.apache.org/jira/browse/WICKET-4285 Project: Wicket Issue Type: Improvement Components: wicket Affects Versions: 1.4.19 Reporter: Ortwin Glück Labels: patch Attachments: patch-1.5.diff, patch.diff The PageSavingThread may exit without nulling the stop flag. For example when an OutOfMemoryError or any other runtime exception is thrown in the run method. Properly set the flag in a finally clause. Is this class still present in 1.5? -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Created] (WICKET-4309) StringValueConversionException for correct situation
StringValueConversionException for correct situation Key: WICKET-4309 URL: https://issues.apache.org/jira/browse/WICKET-4309 Project: Wicket Issue Type: Bug Components: wicket Affects Versions: 1.5.3 Environment: Java 1.6, Jboss Reporter: Ilia Naryzhny StringValue.toOptionalLong() produces org.apache.wicket.util.string.StringValueConversionException if empty string was passed. Let me suggest, that this behavior should be changes for all toOptionalXXX methods except getOptionalString method. The problem in inner code: The problem in following code: public final Long toOptionalLong() throws StringValueConversionException { return (text == null) ? null : toLongObject(); } Should be something like this: The problem in following code: public final Long toOptionalLong() throws StringValueConversionException { return Strings.isEmpty() ? null : toLongObject(); } But there is another problem: what to do if incorrect param was passed - for example abc for parameter of Long type? -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (WICKET-3669) script element in Ajax requests is executed twice in Opera 11
[ https://issues.apache.org/jira/browse/WICKET-3669?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Martin Grigorov resolved WICKET-3669. - Resolution: Fixed Fix Version/s: (was: 1.4.20) 6.0.0 Fixed with the usage of JQuery to replace the DOM. Tested with Opera 11.60 on Ubuntu. script element in Ajax requests is executed twice in Opera 11 --- Key: WICKET-3669 URL: https://issues.apache.org/jira/browse/WICKET-3669 Project: Wicket Issue Type: Bug Components: wicket Affects Versions: 1.4.17 Environment: Opera 11.10, Linux Ubuntu 10.10 Reporter: Martin Schayna Assignee: Martin Grigorov Labels: ajax, javascript, opera, rendering Fix For: 6.0.0, 1.5-RC5 Attachments: testcase-WICKET-3669-second.tar.gz, testcase-WICKET-3669.tar.gz I have component with behavior which adds script element in Behavior.onComponentRendered() to respons. This javascript is to be processed in browser when component is rendered. This works pretty well when component is rendered during standard HTTP request. But when the same code is called from Ajax request, this script runs on browser two times! There is some magic in Ajax request processing in wicket-ajax.js: only for Opera and IE these script elements from responses are added to HTML and page header element as well. Comment says that this is workaround for these browsers, maybe in older versions of Opera dynamically adding element into HTML doesn't run script elements within, but now could be obsolete. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira
svn commit: r1221256 - in /wicket/branches/wicket-1.5.x/wicket-core/src: main/java/org/apache/wicket/pageStore/AsynchronousDataStore.java test/java/org/apache/wicket/page/persistent/disk/DiskDataStore
Author: mgrigorov Date: Tue Dec 20 13:38:39 2011 New Revision: 1221256 URL: http://svn.apache.org/viewvc?rev=1221256view=rev Log: WICKET-4285 PageSavingThread.stop() blocks forever Modified: wicket/branches/wicket-1.5.x/wicket-core/src/main/java/org/apache/wicket/pageStore/AsynchronousDataStore.java wicket/branches/wicket-1.5.x/wicket-core/src/test/java/org/apache/wicket/page/persistent/disk/DiskDataStoreTest.java Modified: wicket/branches/wicket-1.5.x/wicket-core/src/main/java/org/apache/wicket/pageStore/AsynchronousDataStore.java URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.5.x/wicket-core/src/main/java/org/apache/wicket/pageStore/AsynchronousDataStore.java?rev=1221256r1=1221255r2=1221256view=diff == --- wicket/branches/wicket-1.5.x/wicket-core/src/main/java/org/apache/wicket/pageStore/AsynchronousDataStore.java (original) +++ wicket/branches/wicket-1.5.x/wicket-core/src/main/java/org/apache/wicket/pageStore/AsynchronousDataStore.java Tue Dec 20 13:38:39 2011 @@ -22,7 +22,6 @@ import java.util.concurrent.ConcurrentHa import java.util.concurrent.ConcurrentMap; import java.util.concurrent.LinkedBlockingQueue; import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicBoolean; import org.apache.wicket.util.lang.Args; import org.slf4j.Logger; @@ -58,9 +57,9 @@ public class AsynchronousDataStore imple private static final long POLL_WAIT = 1000L; /** -* A flag indicating that this {@link IDataStore} should stop +* The page saving thread. */ - private final AtomicBoolean destroy; + private final Thread pageSavingThread; /** * The wrapped {@link IDataStore} that actually stores that pages @@ -89,15 +88,13 @@ public class AsynchronousDataStore imple public AsynchronousDataStore(final IDataStore dataStore, final int capacity) { this.dataStore = dataStore; - destroy = new AtomicBoolean(false); entries = new LinkedBlockingQueueEntry(capacity); entryMap = new ConcurrentHashMapString, Entry(); - PageSavingRunnable savingRunnable = new PageSavingRunnable(dataStore, entries, entryMap, - destroy); - Thread thread = new Thread(savingRunnable, Wicket-PageSavingThread); - thread.setDaemon(true); - thread.start(); + PageSavingRunnable savingRunnable = new PageSavingRunnable(dataStore, entries, entryMap); + pageSavingThread = new Thread(savingRunnable, Wicket-PageSavingThread); + pageSavingThread.setDaemon(true); + pageSavingThread.start(); } /** @@ -105,19 +102,17 @@ public class AsynchronousDataStore imple */ public void destroy() { - destroy.set(true); - - try + if (pageSavingThread.isAlive()) { - synchronized (destroy) + pageSavingThread.interrupt(); + try + { + pageSavingThread.join(); + } catch (InterruptedException e) { - destroy.wait(); + log.error(e.getMessage(), e); } } - catch (InterruptedException e) - { - log.error(e.getMessage(), e); - } dataStore.destroy(); } @@ -319,8 +314,6 @@ public class AsynchronousDataStore imple { private static final Logger log = LoggerFactory.getLogger(PageSavingRunnable.class); - private final AtomicBoolean destroy; - private final BlockingQueueEntry entries; private final ConcurrentMapString, Entry entryMap; @@ -328,17 +321,16 @@ public class AsynchronousDataStore imple private final IDataStore dataStore; private PageSavingRunnable(IDataStore dataStore, BlockingQueueEntry entries, - ConcurrentMapString, Entry entryMap, AtomicBoolean destroy) + ConcurrentMapString, Entry entryMap) { this.dataStore = dataStore; this.entries = entries; this.entryMap = entryMap; - this.destroy = destroy; } public void run() { - while (destroy.get() == false) + while (!Thread.interrupted()) { Entry entry = null; try @@ -347,7 +339,7 @@ public class AsynchronousDataStore imple
svn commit: r1221257 - in /wicket/trunk/wicket-core/src: main/java/org/apache/wicket/pageStore/AsynchronousDataStore.java test/java/org/apache/wicket/page/persistent/disk/DiskDataStoreTest.java
Author: mgrigorov Date: Tue Dec 20 13:45:53 2011 New Revision: 1221257 URL: http://svn.apache.org/viewvc?rev=1221257view=rev Log: WICKET-4285 PageSavingThread.stop() blocks forever Modified: wicket/trunk/wicket-core/src/main/java/org/apache/wicket/pageStore/AsynchronousDataStore.java wicket/trunk/wicket-core/src/test/java/org/apache/wicket/page/persistent/disk/DiskDataStoreTest.java Modified: wicket/trunk/wicket-core/src/main/java/org/apache/wicket/pageStore/AsynchronousDataStore.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/main/java/org/apache/wicket/pageStore/AsynchronousDataStore.java?rev=1221257r1=1221256r2=1221257view=diff == --- wicket/trunk/wicket-core/src/main/java/org/apache/wicket/pageStore/AsynchronousDataStore.java (original) +++ wicket/trunk/wicket-core/src/main/java/org/apache/wicket/pageStore/AsynchronousDataStore.java Tue Dec 20 13:45:53 2011 @@ -22,7 +22,6 @@ import java.util.concurrent.ConcurrentHa import java.util.concurrent.ConcurrentMap; import java.util.concurrent.LinkedBlockingQueue; import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicBoolean; import org.apache.wicket.util.lang.Args; import org.slf4j.Logger; @@ -58,9 +57,9 @@ public class AsynchronousDataStore imple private static final long POLL_WAIT = 1000L; /** -* A flag indicating that this {@link IDataStore} should stop +* The page saving thread. */ - private final AtomicBoolean destroy; + private final Thread pageSavingThread; /** * The wrapped {@link IDataStore} that actually stores that pages @@ -89,15 +88,13 @@ public class AsynchronousDataStore imple public AsynchronousDataStore(final IDataStore dataStore, final int capacity) { this.dataStore = dataStore; - destroy = new AtomicBoolean(false); entries = new LinkedBlockingQueueEntry(capacity); entryMap = new ConcurrentHashMapString, Entry(); - PageSavingRunnable savingRunnable = new PageSavingRunnable(dataStore, entries, entryMap, - destroy); - Thread thread = new Thread(savingRunnable, Wicket-PageSavingThread); - thread.setDaemon(true); - thread.start(); + PageSavingRunnable savingRunnable = new PageSavingRunnable(dataStore, entries, entryMap); + pageSavingThread = new Thread(savingRunnable, Wicket-PageSavingThread); + pageSavingThread.setDaemon(true); + pageSavingThread.start(); } /** @@ -106,19 +103,17 @@ public class AsynchronousDataStore imple @Override public void destroy() { - destroy.set(true); - - try + if (pageSavingThread.isAlive()) { - synchronized (destroy) + pageSavingThread.interrupt(); + try + { + pageSavingThread.join(); + } catch (InterruptedException e) { - destroy.wait(); + log.error(e.getMessage(), e); } } - catch (InterruptedException e) - { - log.error(e.getMessage(), e); - } dataStore.destroy(); } @@ -325,8 +320,6 @@ public class AsynchronousDataStore imple { private static final Logger log = LoggerFactory.getLogger(PageSavingRunnable.class); - private final AtomicBoolean destroy; - private final BlockingQueueEntry entries; private final ConcurrentMapString, Entry entryMap; @@ -334,18 +327,17 @@ public class AsynchronousDataStore imple private final IDataStore dataStore; private PageSavingRunnable(IDataStore dataStore, BlockingQueueEntry entries, - ConcurrentMapString, Entry entryMap, AtomicBoolean destroy) + ConcurrentMapString, Entry entryMap) { this.dataStore = dataStore; this.entries = entries; this.entryMap = entryMap; - this.destroy = destroy; } @Override public void run() { - while (destroy.get() == false) + while (!Thread.interrupted()) { Entry entry = null; try @@ -354,7 +346,7 @@ public class AsynchronousDataStore imple } catch
svn commit: r1221258 - /wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/protocol/http/pagestore/DiskPageStore.java
Author: mgrigorov Date: Tue Dec 20 13:46:21 2011 New Revision: 1221258 URL: http://svn.apache.org/viewvc?rev=1221258view=rev Log: WICKET-4285 PageSavingThread.stop() blocks forever Wrap the while loop in try/finally. Modified: wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/protocol/http/pagestore/DiskPageStore.java Modified: wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/protocol/http/pagestore/DiskPageStore.java URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/protocol/http/pagestore/DiskPageStore.java?rev=1221258r1=1221257r2=1221258view=diff == --- wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/protocol/http/pagestore/DiskPageStore.java (original) +++ wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/protocol/http/pagestore/DiskPageStore.java Tue Dec 20 13:46:21 2011 @@ -966,47 +966,49 @@ public class DiskPageStore extends Abstr public void run() { - while (stop == Boolean.FALSE) - { - // TODO: At some point change to wait/notify - // wait until we have something to save - while (pagesToSaveActive.isEmpty() stop == false) - { - try - { - Thread.sleep(getSavingThreadSleepTime()); - } - catch (InterruptedException ignore) - { - } - } - - // iterate through lists of pages to be saved - for (IteratorEntryString, ListSerializedPage i = pagesToSaveActive.entrySet() - .iterator(); i.hasNext();) + try { + while (stop == Boolean.FALSE) { - EntryString, ListSerializedPage entry = i.next(); - String sessionId = entry.getKey(); - ListSerializedPage pages = entry.getValue(); - - synchronized (pages) + // TODO: At some point change to wait/notify + // wait until we have something to save + while (pagesToSaveActive.isEmpty() stop == false) { try { - flushPagesToSaveList(sessionId, pages); + Thread.sleep(getSavingThreadSleepTime()); + } + catch (InterruptedException ignore) + { } - catch (Exception e) + } + + // iterate through lists of pages to be saved + for (IteratorEntryString, ListSerializedPage i = pagesToSaveActive.entrySet() + .iterator(); i.hasNext();) + { + EntryString, ListSerializedPage entry = i.next(); + String sessionId = entry.getKey(); + ListSerializedPage pages = entry.getValue(); + + synchronized (pages) { - log.error( - Error flushing serialized pages from worker thread for session + - sessionId, e); + try + { + flushPagesToSaveList(sessionId, pages); + } + catch (Exception e) + { +
[jira] [Resolved] (WICKET-4285) PageSavingThread.stop() blocks forever
[ https://issues.apache.org/jira/browse/WICKET-4285?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Martin Grigorov resolved WICKET-4285. - Resolution: Fixed Fix Version/s: 6.0.0 1.5.4 1.4.20 Assignee: Martin Grigorov PageSavingThread.stop() blocks forever -- Key: WICKET-4285 URL: https://issues.apache.org/jira/browse/WICKET-4285 Project: Wicket Issue Type: Improvement Components: wicket Affects Versions: 1.4.19 Reporter: Ortwin Glück Assignee: Martin Grigorov Labels: patch Fix For: 1.4.20, 1.5.4, 6.0.0 Attachments: patch-1.5.diff, patch.diff The PageSavingThread may exit without nulling the stop flag. For example when an OutOfMemoryError or any other runtime exception is thrown in the run method. Properly set the flag in a finally clause. Is this class still present in 1.5? -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (WICKET-1143) Modify InjectorHolder to allow for storage of multiple types of Injectors (for Guice support)
[ https://issues.apache.org/jira/browse/WICKET-1143?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Martin Grigorov resolved WICKET-1143. - Resolution: Won't Fix I see there is no much demand for this functionality. Won't do it for now. Modify InjectorHolder to allow for storage of multiple types of Injectors (for Guice support) - Key: WICKET-1143 URL: https://issues.apache.org/jira/browse/WICKET-1143 Project: Wicket Issue Type: Improvement Components: wicket, wicket-guice Affects Versions: 1.3.0-beta4 Reporter: Peter Mularien Assignee: Martin Grigorov As per discussion on the mailing list: http://www.nabble.com/Question-about-Guice-integration-with-Wicket-1.3-beta-4-tf4778901.html#a13672025 InjectorHolder should play nicely with GuiceComponentInjector, and allow for mixed systems using both Spring and Guice. Thanks! -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira
svn commit: r1221290 - /wicket/trunk/wicket-core/src/test/java/org/apache/wicket/page/persistent/disk/DiskDataStoreTest.java
Author: mgrigorov Date: Tue Dec 20 14:47:17 2011 New Revision: 1221290 URL: http://svn.apache.org/viewvc?rev=1221290view=rev Log: Remove unused member Modified: wicket/trunk/wicket-core/src/test/java/org/apache/wicket/page/persistent/disk/DiskDataStoreTest.java Modified: wicket/trunk/wicket-core/src/test/java/org/apache/wicket/page/persistent/disk/DiskDataStoreTest.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/test/java/org/apache/wicket/page/persistent/disk/DiskDataStoreTest.java?rev=1221290r1=1221289r2=1221290view=diff == --- wicket/trunk/wicket-core/src/test/java/org/apache/wicket/page/persistent/disk/DiskDataStoreTest.java (original) +++ wicket/trunk/wicket-core/src/test/java/org/apache/wicket/page/persistent/disk/DiskDataStoreTest.java Tue Dec 20 14:47:17 2011 @@ -58,7 +58,6 @@ public class DiskDataStoreTest extends A private static final int FILE_SIZE_MIN = 1024 * 200; private static final int FILE_SIZE_MAX = 1024 * 300; private static final Bytes MAX_SIZE_PER_SESSION = Bytes.megabytes(10); - private static final int FILE_CHANNEL_POOL_CAPACITY = 100; private static final int SESSION_COUNT = 50; private static final int FILES_COUNT = 1000; private static final int SLEEP_MAX = 10;
svn commit: r1221291 - in /wicket/trunk/wicket-core/src: main/java/org/apache/wicket/ajax/AbstractAjaxTimerBehavior.java test/java/org/apache/wicket/ajax/AjaxTimerBehaviorTest.java
Author: mgrigorov Date: Tue Dec 20 14:48:29 2011 New Revision: 1221291 URL: http://svn.apache.org/viewvc?rev=1221291view=rev Log: WICKET-1525 Ability to enable/disable AbstractAjaxTimerBehavior Modified: wicket/trunk/wicket-core/src/main/java/org/apache/wicket/ajax/AbstractAjaxTimerBehavior.java wicket/trunk/wicket-core/src/test/java/org/apache/wicket/ajax/AjaxTimerBehaviorTest.java Modified: wicket/trunk/wicket-core/src/main/java/org/apache/wicket/ajax/AbstractAjaxTimerBehavior.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/main/java/org/apache/wicket/ajax/AbstractAjaxTimerBehavior.java?rev=1221291r1=1221290r2=1221291view=diff == --- wicket/trunk/wicket-core/src/main/java/org/apache/wicket/ajax/AbstractAjaxTimerBehavior.java (original) +++ wicket/trunk/wicket-core/src/main/java/org/apache/wicket/ajax/AbstractAjaxTimerBehavior.java Tue Dec 20 14:48:29 2011 @@ -35,9 +35,6 @@ import org.apache.wicket.util.time.Durat */ public abstract class AbstractAjaxTimerBehavior extends AbstractDefaultAjaxBehavior { - /** -* -*/ private static final long serialVersionUID = 1L; /** The update interval */ @@ -63,14 +60,6 @@ public abstract class AbstractAjaxTimerB } /** -* Stops the timer -*/ - public final void stop() - { - stopped = true; - } - - /** * Sets the update interval duration. This method should only be called within the * {@link #onTimer(AjaxRequestTarget)} method. * @@ -102,7 +91,7 @@ public abstract class AbstractAjaxTimerB WebRequest request = (WebRequest)RequestCycle.get().getRequest(); - if (!stopped (!headRendered || !request.isAjax())) + if (!isStopped() (!headRendered || !request.isAjax())) { headRendered = true; response.render(OnLoadHeaderItem.forScript(getJsTimeoutCall(updateInterval))); @@ -128,24 +117,32 @@ public abstract class AbstractAjaxTimerB { CharSequence ajaxAttributes = renderAjaxAttributes(getComponent()); + String timeoutHandle = getTimeoutHandle(); // this might look strange, but it is necessary for IE not to leak :( - return setTimeout('Wicket.Ajax.ajax( + ajaxAttributes + );', + + return timeoutHandle+ = setTimeout('Wicket.Ajax.ajax( + ajaxAttributes + );', + updateInterval.getMilliseconds() + ); } /** +* @return the name of the handle that is used to stop any scheduled timer +*/ + private String getTimeoutHandle() { + return Wicket.timeoutHandle_+getComponent().getMarkupId(); + } + + /** * * @see org.apache.wicket.ajax.AbstractDefaultAjaxBehavior#respond(org.apache.wicket.ajax.AjaxRequestTarget) */ @Override protected final void respond(final AjaxRequestTarget target) { - onTimer(target); - - if (!stopped isEnabled(getComponent())) + if (!isStopped() isEnabled(getComponent())) { + onTimer(target); + target.getHeaderResponse().render( - OnLoadHeaderItem.forScript(getJsTimeoutCall(updateInterval))); + OnLoadHeaderItem.forScript(getJsTimeoutCall(updateInterval))); } } @@ -158,12 +155,35 @@ public abstract class AbstractAjaxTimerB protected abstract void onTimer(final AjaxRequestTarget target); /** -* @return {@code true} if has been stopped via {@link #stop()} +* @return {@code true} if has been stopped via {@link #stop(AjaxRequestTarget)} */ public final boolean isStopped() { return stopped; } + /** +* Re-enables the timer if already stopped +* +* @param target +*/ + public final void restart(final AjaxRequestTarget target) + { + if (isStopped()) + { + stopped = false; + headRendered = false; + target.add(getComponent()); + } + } + /** +* Stops the timer +*/ + public final void stop(final AjaxRequestTarget target) + { + stopped = true; + String timeoutHandle = getTimeoutHandle(); + target.prependJavaScript(clearTimeout(+timeoutHandle+); delete +timeoutHandle+;); + } } Modified: wicket/trunk/wicket-core/src/test/java/org/apache/wicket/ajax/AjaxTimerBehaviorTest.java URL:
[jira] [Resolved] (WICKET-1525) Ability to enable/disable AbstractAjaxTimerBehavior
[ https://issues.apache.org/jira/browse/WICKET-1525?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Martin Grigorov resolved WICKET-1525. - Resolution: Fixed Ability to enable/disable AbstractAjaxTimerBehavior --- Key: WICKET-1525 URL: https://issues.apache.org/jira/browse/WICKET-1525 Project: Wicket Issue Type: Improvement Components: wicket Reporter: Frank Bille Jensen Assignee: Martin Grigorov Priority: Minor Fix For: 6.0.0 Attachments: AbstractAjaxRestartableTimerBehavior.java, AjaxRestartableSelfUpdatingTimerBehavior.java, WICKET-1525.patch, WICKET-1525.patch, quickstart.tgz Convert the existing stop functionality into using the isEnabled() method on IBehavior. This would make it possible to disable and enable a timer. (The stop method was added before[R490397] IBehavior got the isEnabled method[510198]) -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira
svn commit: r1221314 - /wicket/trunk/wicket-ioc/pom.xml
Author: mgrigorov Date: Tue Dec 20 15:22:42 2011 New Revision: 1221314 URL: http://svn.apache.org/viewvc?rev=1221314view=rev Log: WICKET-4307 Support javax.inject.Inject annotation in Guice and Spring integration Modified: wicket/trunk/wicket-ioc/pom.xml Modified: wicket/trunk/wicket-ioc/pom.xml URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-ioc/pom.xml?rev=1221314r1=1221313r2=1221314view=diff == --- wicket/trunk/wicket-ioc/pom.xml (original) +++ wicket/trunk/wicket-ioc/pom.xml Tue Dec 20 15:22:42 2011 @@ -41,6 +41,10 @@ artifactIdcglib/artifactId /dependency dependency + groupIdjavax.inject/groupId + artifactIdjavax.inject/artifactId + /dependency + dependency groupIdeasymock/groupId artifactIdeasymock/artifactId /dependency
svn commit: r1221317 - in /wicket/trunk/wicket-core/src/main/java/org/apache/wicket: ComponentSourceEntry.java IComponentSource.java MarkupContainer.java
Author: mgrigorov Date: Tue Dec 20 15:29:48 2011 New Revision: 1221317 URL: http://svn.apache.org/viewvc?rev=1221317view=rev Log: WICKET-4280 Remove IComponentSource and related code Removed: wicket/trunk/wicket-core/src/main/java/org/apache/wicket/ComponentSourceEntry.java wicket/trunk/wicket-core/src/main/java/org/apache/wicket/IComponentSource.java Modified: wicket/trunk/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java Modified: wicket/trunk/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java?rev=1221317r1=1221316r2=1221317view=diff == --- wicket/trunk/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java (original) +++ wicket/trunk/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java Tue Dec 20 15:29:48 2011 @@ -1060,27 +1060,6 @@ public abstract class MarkupContainer ex } /** -* If the given object is a {@link ComponentSourceEntry} instance and codereconstruct/code -* is true, it reconstructs the component and returns it. Otherwise it just returns the object -* passed as parameter -* -* @param object -* @param reconstruct -* @param parent -* @param index -* @return The object directly or the reconstructed component -*/ - private final Object postprocess(Object object, boolean reconstruct, MarkupContainer parent, - int index) - { - if (reconstruct object instanceof ComponentSourceEntry) - { - object = ((ComponentSourceEntry)object).reconstruct(parent, index); - } - return object; - } - - /** * * @param index * @param reconstruct @@ -1098,7 +1077,7 @@ public abstract class MarkupContainer ex throw new ArrayIndexOutOfBoundsException(index + index + is greater then 0); } - component = postprocess(children, reconstruct, this, 0); + component = children; if (children != component) { children = component; @@ -1117,22 +1096,17 @@ public abstract class MarkupContainer ex // we have a object array children = (Object[])this.children; } - component = postprocess(children[index], reconstruct, this, index); - if (children[index] != component) - { - children[index] = component; - } + component = children[index]; } } return component; } /** -* Returns the wicket:id of the given object, that can be either a {@link Component} or a -* {@link ComponentSourceEntry} +* Returns the wicket:id of the given object if it is a {@link Component} * * @param object -* @return The id of the object (object can be component or componentsourcentry) +* @return The id of the object (object can be component) */ private final String getId(Object object) { @@ -1140,10 +1114,6 @@ public abstract class MarkupContainer ex { return ((Component)object).getId(); } - else if (object instanceof ComponentSourceEntry) - { - return ((ComponentSourceEntry)object).id; - } else { throw new IllegalArgumentException(Unknown type of object + object); @@ -1166,11 +1136,7 @@ public abstract class MarkupContainer ex { if (getId(children).equals(id)) { - component = (Component)postprocess(children, true, this, 0); - if (children != component) - { - children = component; - } + component = (Component)children; } } else @@ -1191,11 +1157,7 @@ public abstract class MarkupContainer ex { if (getId(children[i]).equals(id)) { -
[CONF] Apache Wicket Migration to Wicket 6.0
Migration to Wicket 6.0 Page edited by Martin Grigorov Changes (1) ... h3. Refactorings * HttpsMapper has been refactored to make subclassing easier h3. o.a.w.IComponentSource and o.a.w.ComponentSourceEntry are removed These classes were used as placeholders for further optimizations in Components size but were never finished. Full Content Migrating to Wicket 6.0 Environment Wicket 6.0 requires at least Java 6 Repeaters `IDataProvider` was converted to using `long` instead of `int` to better line up with JPA and other persistence frameworks. This has caused a rather large cascade of `int` to `long` changes all over the repeater packages (WICKET-1175). Form Processing Validation `DateValidator` no longer has static factory methods, use `new DateValidator(min,max)` instead `StringValidator` no longer has static factory methods, use `new StringValidator(min, max)` instead `StringValidator` will add the `maxlen` attribute if added to a component attached to an input tag `AbstractValidator` has been removed `ValidationError` now makes creating standard error keys (classname and classname.subtype) easier Most validators provide a `decorate(ValidationError, Validatable)` method for overriding how they report errors Ajax Use JQuery as a backing library for Wicket Ajax functionality Apache Wicket needed to improve the implementation of its _javascript_ libraries used for Ajax functionality (wicket-ajax.js and wicket-event.js) by using any of the bigger _javascript_ libraries and delegate to it the handling of the differences in the browsers (DOM, events, Ajax, ...). After a discussion in the mailing lists the Wicket team decided to use JQuery for that. For more information read Wicket Ajax IHeaderResponse, including decorators and filters IHeaderResponse has been rewritten to render HeaderItems. All render* methods have been replaced by a single render(HeaderItem) method. HeaderItems can be instantiated using the factory methods in _javascript_HeaderItem, CssHeaderItem, OnDomReadyHeaderItem, OnLoadHeaderItem, OnEventHeaderItem and StringHeaderItem. For example, the following code in renderHead: response.renderCSSReference(new CssResourceReference(HomePage.class, "header.css")); response.renderJavaScriptReference(new _javascript_ResourceReference(HomePage.class, "page.js")); Needs to be replaced with: response.render(CssHeaderItem.forReference(new CssResourceReference(HomePage.class, "header.css"))); response.render(_javascript_HeaderItem.forReference(new _javascript_ResourceReference(HomePage.class, "page.js"))); Custom HeaderResponseDecorators and IHeaderResponseFilters also need to be adjusted for the changed methods. These classes now have only one method for rendering and filtering. package.properties renamed to wicket-package.properties The special resource bundle that can contain resources for a whole package has been renamed from package.properties to wicket-package.properties. This prefix will be used for all wicket resources which may collide somehow with resources provided by other frameworks. See WICKET-4211 List of renamed classes and methods Following the renames in subclasses is easier if the @Override annotations are present. IDE-s, like Eclipse, can be used to add missing @Override annotations before moving to wicket 6. Here's a table of deprecated classes andmethods in Wicket 1.5 and the corresponding replacement in Wicket 6. Wicket 1.5 (deprecated) Wicket 6 (replacement) org.apache.wicket.behavior.SimpleAttributeModifier org.apache.wicket.AttributeModifier#replace(...) org.apache.wicket.request.Url#toAbsoluteString() org.apache.wicket.request.Url#toString(StringMode.FULL) Refactorings HttpsMapper has been refactored to make subclassing easier o.a.w.IComponentSource and o.a.w.ComponentSourceEntry are removed These classes were used as placeholders for further optimizations in Component's size but were never finished. Change Notification Preferences View Online | View Changes | Add Comment
svn commit: r1221319 - in /wicket/branches/wicket-1.5.x/wicket-core/src/main/java/org/apache/wicket: ComponentSourceEntry.java IComponentSource.java
Author: mgrigorov Date: Tue Dec 20 15:37:34 2011 New Revision: 1221319 URL: http://svn.apache.org/viewvc?rev=1221319view=rev Log: WICKET-4280 Remove IComponentSource and related code Mark as deprecated these classes Modified: wicket/branches/wicket-1.5.x/wicket-core/src/main/java/org/apache/wicket/ComponentSourceEntry.java wicket/branches/wicket-1.5.x/wicket-core/src/main/java/org/apache/wicket/IComponentSource.java Modified: wicket/branches/wicket-1.5.x/wicket-core/src/main/java/org/apache/wicket/ComponentSourceEntry.java URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.5.x/wicket-core/src/main/java/org/apache/wicket/ComponentSourceEntry.java?rev=1221319r1=1221318r2=1221319view=diff == --- wicket/branches/wicket-1.5.x/wicket-core/src/main/java/org/apache/wicket/ComponentSourceEntry.java (original) +++ wicket/branches/wicket-1.5.x/wicket-core/src/main/java/org/apache/wicket/ComponentSourceEntry.java Tue Dec 20 15:37:34 2011 @@ -30,7 +30,10 @@ import org.slf4j.LoggerFactory; * the component and all it's children. Those are wicket internal variables and it's up to wicket * (not {@link IComponentSource} implementation to reconstruct that transparently for the user. * These information are encoded as one string to minimize object overhead. + * + * @deprecated Will be removed in Wicket 6.0 */ +@Deprecated abstract class ComponentSourceEntry implements IClusterable { private static final long serialVersionUID = 1L; @@ -320,4 +323,4 @@ abstract class ComponentSourceEntry impl private static final Logger logger = LoggerFactory.getLogger(ComponentSourceEntry.class); -} \ No newline at end of file +} Modified: wicket/branches/wicket-1.5.x/wicket-core/src/main/java/org/apache/wicket/IComponentSource.java URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.5.x/wicket-core/src/main/java/org/apache/wicket/IComponentSource.java?rev=1221319r1=1221318r2=1221319view=diff == --- wicket/branches/wicket-1.5.x/wicket-core/src/main/java/org/apache/wicket/IComponentSource.java (original) +++ wicket/branches/wicket-1.5.x/wicket-core/src/main/java/org/apache/wicket/IComponentSource.java Tue Dec 20 15:37:34 2011 @@ -30,7 +30,9 @@ package org.apache.wicket; * TODO figure out what to do with this * * @author Matej Knopp + * @deprecated Will be removed in Wicket 6.0 */ +@Deprecated public interface IComponentSource extends IClusterable { /**
[jira] [Updated] (WICKET-4000) Header contributions order is not stable
[ https://issues.apache.org/jira/browse/WICKET-4000?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Emond Papegaaij updated WICKET-4000: Attachment: (was: 0001-WICKET-4000-render-all-headers-through-IHeaderRespon.patch) Header contributions order is not stable Key: WICKET-4000 URL: https://issues.apache.org/jira/browse/WICKET-4000 Project: Wicket Issue Type: Bug Components: wicket Affects Versions: 1.5-RC6 Reporter: Sylvain Vieujot Fix For: 6.0.0 Attachments: 0001-WICKET-4000-render-all-headers-through-IHeaderRespon.patch, quickstart-scriptsOrder.zip In the last RCs, I started to experience problems with the contributions order. For example, I add jQuery, and until 1.5RC5, it worked well, but now the call to the jQuery script has been moved to the bottom of the page head, and this disables all my other scripts that are expecting jQuery's $ to be defined. I attach a quickstart to demonstrate the problem. Maybe the order in the quickstart is not the expected one, but what it shows is that the order does not make real sense (at least to me) : In the quickstart, the wicket:head tag contributions are in the order 3 - 8 - 9 - 5, and the renderHead methods contributions are in the order 4 - 1 - 2 - 6 - 7. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (WICKET-4000) Header contributions order is not stable
[ https://issues.apache.org/jira/browse/WICKET-4000?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Emond Papegaaij updated WICKET-4000: Attachment: 0001-WICKET-4000-render-all-headers-through-IHeaderRespon.patch Final version of the patch Header contributions order is not stable Key: WICKET-4000 URL: https://issues.apache.org/jira/browse/WICKET-4000 Project: Wicket Issue Type: Bug Components: wicket Affects Versions: 1.5-RC6 Reporter: Sylvain Vieujot Fix For: 6.0.0 Attachments: 0001-WICKET-4000-render-all-headers-through-IHeaderRespon.patch, quickstart-scriptsOrder.zip In the last RCs, I started to experience problems with the contributions order. For example, I add jQuery, and until 1.5RC5, it worked well, but now the call to the jQuery script has been moved to the bottom of the page head, and this disables all my other scripts that are expecting jQuery's $ to be defined. I attach a quickstart to demonstrate the problem. Maybe the order in the quickstart is not the expected one, but what it shows is that the order does not make real sense (at least to me) : In the quickstart, the wicket:head tag contributions are in the order 3 - 8 - 9 - 5, and the renderHead methods contributions are in the order 4 - 1 - 2 - 6 - 7. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira
git commit: fixed typo. first push. woot
Updated Branches: refs/heads/trunk 24d17d5be - 500d9caad fixed typo. first push. woot Project: http://git-wip-us.apache.org/repos/asf/wicket/repo Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/500d9caa Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/500d9caa Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/500d9caa Branch: refs/heads/trunk Commit: 500d9caad302274423f1089e428e9824865268b0 Parents: 24d17d5 Author: Igor Vaynberg ivaynb...@apache.org Authored: Tue Dec 20 20:10:17 2011 -0800 Committer: Igor Vaynberg ivaynb...@apache.org Committed: Tue Dec 20 20:10:17 2011 -0800 -- release-igor.sh |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) -- http://git-wip-us.apache.org/repos/asf/wicket/blob/500d9caa/release-igor.sh -- diff --git a/release-igor.sh b/release-igor.sh index d55ef0b..d4a9377 100755 --- a/release-igor.sh +++ b/release-igor.sh @@ -33,7 +33,7 @@ stty -echo read passphrase stty $stty_orig -# test the GPGP passphrase to fail-fast: +# test the GPG passphrase to fail-fast: echo $passphrase | gpg --passphrase-fd 0 --armor --output pom.xml.asc --detach-sig pom.xml gpg --verify pom.xml.asc if [ $? -ne 0 ]; then
Git Push Summary
Updated Branches: refs/heads/master [created] 500d9caad