[jira] Updated: (WICKET-3114) Various issues in wicket-examples 1.5.x
[ https://issues.apache.org/jira/browse/WICKET-3114?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Igor Vaynberg updated WICKET-3114: -- Description: Here is a list of some issues found by Igor while playing with 1.5 wicket-examples: * wicket package mounter produces // in url: http://localhost:8080/wicket-examples/niceurl//my/mounted/package/ ^ FIXED * ajax links example - failure handler is not invoked, instead error is reported * ajax upload example: text field is always null? * ajax modal window - page window does not repaint result * ajax onchange example does not work MG: ^^Seems to work fine on FF and Google Chrome IV: ^ FIXED - this was fixed with my recent url refactor * ajax rating example seems slow MG: ^^Seems OK on FF3.6 and Chrome More information about each one will be added when the respective issue is investigated. was: Here is a list of some issues found by Igor while playing with 1.5 wicket-examples: * wicket package mounter produces // in url: http://localhost:8080/wicket-examples/niceurl//my/mounted/package/ ^ FIXED * ajax links example - failure handler is not invoked, instead error is reported * ajax upload example: text field is always null? * ajax modal window - page window does not repaint result * ajax onchange example does not work MG: ^^Seems to work fine on FF and Google Chrome * ajax rating example seems slow MG: ^^Seems OK on FF3.6 and Chrome More information about each one will be added when the respective issue is investigated. Various issues in wicket-examples 1.5.x --- Key: WICKET-3114 URL: https://issues.apache.org/jira/browse/WICKET-3114 Project: Wicket Issue Type: Bug Components: wicket, wicket-examples Affects Versions: 1.5-M2.1 Reporter: Martin Grigorov Here is a list of some issues found by Igor while playing with 1.5 wicket-examples: * wicket package mounter produces // in url: http://localhost:8080/wicket-examples/niceurl//my/mounted/package/ ^ FIXED * ajax links example - failure handler is not invoked, instead error is reported * ajax upload example: text field is always null? * ajax modal window - page window does not repaint result * ajax onchange example does not work MG: ^^Seems to work fine on FF and Google Chrome IV: ^ FIXED - this was fixed with my recent url refactor * ajax rating example seems slow MG: ^^Seems OK on FF3.6 and Chrome More information about each one will be added when the respective issue is investigated. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
svn commit: r1024538 - /wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/protocol/http/portlet/WicketPortlet.java
Author: ivaynberg Date: Wed Oct 20 06:49:32 2010 New Revision: 1024538 URL: http://svn.apache.org/viewvc?rev=1024538view=rev Log: Issue: WICKET-3116 Modified: wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/protocol/http/portlet/WicketPortlet.java Modified: wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/protocol/http/portlet/WicketPortlet.java URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/protocol/http/portlet/WicketPortlet.java?rev=1024538r1=1024537r2=1024538view=diff == --- wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/protocol/http/portlet/WicketPortlet.java (original) +++ wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/protocol/http/portlet/WicketPortlet.java Wed Oct 20 06:49:32 2010 @@ -356,8 +356,9 @@ public class WicketPortlet extends Gener { properties = new Properties(); } - InputStream is = Thread.currentThread().getContextClassLoader().getResourceAsStream( - WICKET_PORTLET_PROPERTIES); + InputStream is = Thread.currentThread() + .getContextClassLoader() + .getResourceAsStream(WICKET_PORTLET_PROPERTIES); if (is != null) { try @@ -673,7 +674,7 @@ public class WicketPortlet extends Gener { previousURL = wicketURL; wicketURL = redirectLocation; - ((RenderResponse)response).reset(); + response.reset(); responseState.clear(); continue; }
[jira] Resolved: (WICKET-3116) class cast exception
[ https://issues.apache.org/jira/browse/WICKET-3116?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Igor Vaynberg resolved WICKET-3116. --- Resolution: Fixed Fix Version/s: 1.4.13 Assignee: Igor Vaynberg class cast exception Key: WICKET-3116 URL: https://issues.apache.org/jira/browse/WICKET-3116 Project: Wicket Issue Type: Bug Components: wicket-portlet Affects Versions: 1.4.10 Environment: running on windows Reporter: dgherrig Assignee: Igor Vaynberg Fix For: 1.4.13 Original Estimate: 6h Remaining Estimate: 6h Below is the exception I am getting when doing setResponse( myPage(some_value) in my code. I downloaded the src and in WicketPortlet.java at line 676:: changed: (RenderResponse)response).reset(); to:response.reset(); rebuilt and tested again and this fixed the problem. I believe this is related to running wicket in the jetspeed portal and conflicts with pluto 2.0 which uses the clean room jars of javax. The casting is not necessary. java.lang.ClassCastException: org.apache.pluto.container.impl.ResourceResponseImpl cannot be cast to javax.portlet.RenderResponse at org.apache.wicket.protocol.http.portlet.WicketPortlet.processMimeResponseRequest(WicketPortlet.java:676) at org.apache.wicket.protocol.http.portlet.WicketPortlet.processRequest(WicketPortlet.java:608) at org.apache.wicket.protocol.http.portlet.WicketPortlet.serveResource(WicketPortlet.java:536) at sun.reflect.GeneratedMethodAccessor197.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.jetspeed.portlet.PortletObjectProxy.invoke(PortletObjectProxy.java:181) at $Proxy91.serveResource(Unknown Source) at org.apache.jetspeed.factory.JetspeedPortletInstance.serveResource(JetspeedPortletInstance.java:139) at org.apache.jetspeed.container.services.JetspeedFilterChain.doFilter(JetspeedFilterChain.java:157) at org.apache.jetspeed.container.services.JetspeedFilterChain.processFilter(JetspeedFilterChain.java:78) at org.apache.jetspeed.container.services.JetspeedFilterManager.processFilter(JetspeedFilterManager.java:117) at org.apache.jetspeed.container.JetspeedContainerServlet.doGet(JetspeedContainerServlet.java:318) at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:630) at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302) at org.apache.jetspeed.container.invoker.ServletPortletInvoker.invoke(ServletPortletInvoker.java:161) at org.apache.jetspeed.container.invoker.JetspeedPortletInvokerService.serveResource(JetspeedPortletInvokerService.java:136) at org.apache.pluto.container.impl.PortletContainerImpl.doServeResource(PortletContainerImpl.java:203) at org.apache.jetspeed.container.JetspeedPortletContainerWrapper.doServeResource(JetspeedPortletContainerWrapper.java:93) at org.apache.jetspeed.resource.ResourceValveImpl.invoke(ResourceValveImpl.java:69) at org.apache.jetspeed.pipeline.JetspeedPipeline$Invocation.invokeNext(JetspeedPipeline.java:242) at org.apache.jetspeed.pipeline.valve.impl.ActionValveImpl.invoke(ActionValveImpl.java:139) at org.apache.jetspeed.pipeline.JetspeedPipeline$Invocation.invokeNext(JetspeedPipeline.java:242) at org.apache.jetspeed.container.ContainerValve.invoke(ContainerValve.java:88) at org.apache.jetspeed.pipeline.JetspeedPipeline$Invocation.invokeNext(JetspeedPipeline.java:242) at org.apache.jetspeed.container.PageHistoryValve.invoke(PageHistoryValve.java:108) at org.apache.jetspeed.pipeline.JetspeedPipeline$Invocation.invokeNext(JetspeedPipeline.java:242) at org.apache.jetspeed.profiler.impl.RefreshUserHomepageValveImpl.invoke(RefreshUserHomepageValveImpl.java:114) at org.apache.jetspeed.pipeline.JetspeedPipeline$Invocation.invokeNext(JetspeedPipeline.java:242) at
[jira] Created: (WICKET-3121) Overriden method not called on Class RadioChoice inside a Modal Window.
Overriden method not called on Class RadioChoice inside a Modal Window. --- Key: WICKET-3121 URL: https://issues.apache.org/jira/browse/WICKET-3121 Project: Wicket Issue Type: Bug Components: wicket Affects Versions: 1.4.12 Environment: Java 1.6.0_21, eclipse, tomcat 5.5. Reporter: Jean-Francois Larouche This is a very weird bug. We have a Radio Choice inside a Fragment that is a Popup window. Code: final ListString typeSocieteList = Arrays.asList(new String[] { TypeSociete.CLIENT.getCode(), TypeSociete.FOURNISSEUR.getCode(), TypeSociete.CLIENT_FOURNISSUER.getCode() }); final RadioChoiceStringradioChoiceCodeTypeSociete = new RadioChoiceString(societeBis.societeTypeSociete.codeTypeSociete, typeSocieteList) { @Override protected boolean isDisabled(final String object, int index, String selected) { return !typeSocieteList.get(index).equals(object); } @Override protected boolean wantOnSelectionChangedNotifications() { // TODO Auto-generated method stub return super.wantOnSelectionChangedNotifications(); } }; At initialisation time, the wantsOnChangeNotification() is called on the anonymous inner class. The isDisabled() is not since the ENABLED_IN_HIERARCHY is false (The popup window is not visible at first) Code of RadioChoice: boolean enabled = isEnabledInHierarchy() !isDisabled(choice, index, selected); When the Popup window is shown, the onComponentBodyTag is called again BUT. None of the overriding methods gets called!!! I never saw that. Unless the object instance gets changed somehow? -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (WICKET-3121) Overriden method not called on Class RadioChoice inside a Modal Window.
[ https://issues.apache.org/jira/browse/WICKET-3121?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12922882#action_12922882 ] Martin Grigorov commented on WICKET-3121: - Please attach a quickstart application Overriden method not called on Class RadioChoice inside a Modal Window. --- Key: WICKET-3121 URL: https://issues.apache.org/jira/browse/WICKET-3121 Project: Wicket Issue Type: Bug Components: wicket Affects Versions: 1.4.12 Environment: Java 1.6.0_21, eclipse, tomcat 5.5. Reporter: Jean-Francois Larouche This is a very weird bug. We have a Radio Choice inside a Fragment that is a Popup window. Code: final ListString typeSocieteList = Arrays.asList(new String[] { TypeSociete.CLIENT.getCode(), TypeSociete.FOURNISSEUR.getCode(), TypeSociete.CLIENT_FOURNISSUER.getCode() }); final RadioChoiceStringradioChoiceCodeTypeSociete = new RadioChoiceString(societeBis.societeTypeSociete.codeTypeSociete, typeSocieteList) { @Override protected boolean isDisabled(final String object, int index, String selected) { return !typeSocieteList.get(index).equals(object); } @Override protected boolean wantOnSelectionChangedNotifications() { // TODO Auto-generated method stub return super.wantOnSelectionChangedNotifications(); } }; At initialisation time, the wantsOnChangeNotification() is called on the anonymous inner class. The isDisabled() is not since the ENABLED_IN_HIERARCHY is false (The popup window is not visible at first) Code of RadioChoice: boolean enabled = isEnabledInHierarchy() !isDisabled(choice, index, selected); When the Popup window is shown, the onComponentBodyTag is called again BUT. None of the overriding methods gets called!!! I never saw that. Unless the object instance gets changed somehow? -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Reopened: (WICKET-2776) Enhancing RadioChoice input items with individual title and css class attributes
[ https://issues.apache.org/jira/browse/WICKET-2776?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Szádeczky-Kardoss Szabolcs reopened WICKET-2776: Hi, I am not sure whether this is intentional or by accident, but this fix is gone from 1.5-M2.1, so currently there is no protected IValueMap getAdditionalAttributes(final int index, final T choice) method present, nor anything similar as far as I seen. Or am I missing something? Szabolcs Enhancing RadioChoice input items with individual title and css class attributes Key: WICKET-2776 URL: https://issues.apache.org/jira/browse/WICKET-2776 Project: Wicket Issue Type: Improvement Components: wicket Affects Versions: 1.4.7 Reporter: Szádeczky-Kardoss Szabolcs Assignee: Juergen Donnerstag Priority: Minor Fix For: 1.4.8, 1.5-M1 Original Estimate: 1h Remaining Estimate: 1h Wicket is a great framework based on an excellent idea. It is a joy to work with. There are several existing components and most of them are very usable and customizable as much as possible, however there are still a few places for improvement. One of those is org.apache.wicket.markup.html.form.RadioChoice, where it is currently not possible to set HTML title and class attributes for the individual input tags. This would be a great feature for some client-side javascript frameworks, and in my case the JQuery star-rating plugin is even hard to use without these. For this purpose I have created my own private alternative for this component, but it would be good to have it included in wicket, so that others can benefit too. See below the changes I have performed to enable this feature! Please note that all changes are made so that current behavior is not changed only new optional behavior is added. Changes in method onComponentTagBody(...) ... // Add radio tag String title = getTitle(index, choice); String cssClass = getCssClass(index, choice); buffer.append(input name=\).append(getInputName()).append(\ type=\radio\); if (title != null) buffer.append( title=\).append(title).append(\); if (cssClass != null) buffer.append( class=\).append(cssClass).append(\); buffer.append((isSelected(choice, index, selected) ? checked=\checked\ : )); buffer.append((enabled ? : disabled=\disabled\)); buffer.append( value=\).append(id).append(\ id=\).append(idAttr) .append(\); ... Added two new methods: /** * Returns the title attribute to be output for the input tag with the given index and choice * value. By default this returns null, and so the title attribute won't be set, but this can be * overridden. * * @param index * @param choice * @return title attribute to be used for the given input tag */ protected String getTitle(int index, T choice) { return null; } /** * Returns the CSS class attribute to be output for the input tag with the given index and * choice value. By default this returns null, and so the class attribute won't be set, but this * can be overridden. * * @param index * @param choice * @return CSS class attribute to be used for the given input tag */ protected String getCssClass(int index, T choice) { return null; } -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Closed: (WICKET-3121) Overriden method not called on Class RadioChoice inside a Modal Window.
[ https://issues.apache.org/jira/browse/WICKET-3121?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jean-Francois Larouche closed WICKET-3121. -- Resolution: Not A Problem Overriden method not called on Class RadioChoice inside a Modal Window. --- Key: WICKET-3121 URL: https://issues.apache.org/jira/browse/WICKET-3121 Project: Wicket Issue Type: Bug Components: wicket Affects Versions: 1.4.12 Environment: Java 1.6.0_21, eclipse, tomcat 5.5. Reporter: Jean-Francois Larouche This is a very weird bug. We have a Radio Choice inside a Fragment that is a Popup window. Code: final ListString typeSocieteList = Arrays.asList(new String[] { TypeSociete.CLIENT.getCode(), TypeSociete.FOURNISSEUR.getCode(), TypeSociete.CLIENT_FOURNISSUER.getCode() }); final RadioChoiceStringradioChoiceCodeTypeSociete = new RadioChoiceString(societeBis.societeTypeSociete.codeTypeSociete, typeSocieteList) { @Override protected boolean isDisabled(final String object, int index, String selected) { return !typeSocieteList.get(index).equals(object); } @Override protected boolean wantOnSelectionChangedNotifications() { // TODO Auto-generated method stub return super.wantOnSelectionChangedNotifications(); } }; At initialisation time, the wantsOnChangeNotification() is called on the anonymous inner class. The isDisabled() is not since the ENABLED_IN_HIERARCHY is false (The popup window is not visible at first) Code of RadioChoice: boolean enabled = isEnabledInHierarchy() !isDisabled(choice, index, selected); When the Popup window is shown, the onComponentBodyTag is called again BUT. None of the overriding methods gets called!!! I never saw that. Unless the object instance gets changed somehow? -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (WICKET-3121) Overriden method not called on Class RadioChoice inside a Modal Window.
[ https://issues.apache.org/jira/browse/WICKET-3121?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12922938#action_12922938 ] Jean-Francois Larouche commented on WICKET-3121: Well i have to thank you on this! While creating the little app, i realised that there was 2 component of type RadioChoice with the same wicket:id. One in the fragment the other outside. Wicket was not complaining about it but i guess there was some sort of getById when you create the ModalWindow. So he was getting the first Radio group instead of the one added to the Fragment. thanks, It helped me a lot! Overriden method not called on Class RadioChoice inside a Modal Window. --- Key: WICKET-3121 URL: https://issues.apache.org/jira/browse/WICKET-3121 Project: Wicket Issue Type: Bug Components: wicket Affects Versions: 1.4.12 Environment: Java 1.6.0_21, eclipse, tomcat 5.5. Reporter: Jean-Francois Larouche This is a very weird bug. We have a Radio Choice inside a Fragment that is a Popup window. Code: final ListString typeSocieteList = Arrays.asList(new String[] { TypeSociete.CLIENT.getCode(), TypeSociete.FOURNISSEUR.getCode(), TypeSociete.CLIENT_FOURNISSUER.getCode() }); final RadioChoiceStringradioChoiceCodeTypeSociete = new RadioChoiceString(societeBis.societeTypeSociete.codeTypeSociete, typeSocieteList) { @Override protected boolean isDisabled(final String object, int index, String selected) { return !typeSocieteList.get(index).equals(object); } @Override protected boolean wantOnSelectionChangedNotifications() { // TODO Auto-generated method stub return super.wantOnSelectionChangedNotifications(); } }; At initialisation time, the wantsOnChangeNotification() is called on the anonymous inner class. The isDisabled() is not since the ENABLED_IN_HIERARCHY is false (The popup window is not visible at first) Code of RadioChoice: boolean enabled = isEnabledInHierarchy() !isDisabled(choice, index, selected); When the Popup window is shown, the onComponentBodyTag is called again BUT. None of the overriding methods gets called!!! I never saw that. Unless the object instance gets changed somehow? -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Created: (WICKET-3122) MarkupNotFoundException happens if there's a component inside another with wicket:message attribute
MarkupNotFoundException happens if there's a component inside another with wicket:message attribute --- Key: WICKET-3122 URL: https://issues.apache.org/jira/browse/WICKET-3122 Project: Wicket Issue Type: Bug Affects Versions: 1.5-M2.1 Reporter: Szádeczky-Kardoss Szabolcs Priority: Minor Hi, I am just in the process of migrating my project to 1.5(-M2.1), and discovered a problem when there's a markup like this: span wicket:message=title:favoriteCount.tipwicket:message key=favoriteCountFAVORITE COUNT/wicket:messagespan wicket:id=favoriteCount //span and Java file like this: add(new Label(favoriteCount)); and appropriate resource file(s) of course, then at render time a MarkupNotFoundException is given (Markup not found for Component: [Component id = favoriteCount]). If I remove the wicket:message=title:favoriteCount.tip part then it is fine, similar to 1.4.x. Another small note on issue 2776: I am not sure that reopening it was a good approach but the fix for that one disappeared for 1.5-M2.1. Could you please check that one too? -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (WICKET-3122) MarkupNotFoundException happens if there's a component inside another with wicket:message attribute
[ https://issues.apache.org/jira/browse/WICKET-3122?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12922944#action_12922944 ] Martin Grigorov commented on WICKET-3122: - Can you try with latest 1.5-SNAPSHOT ? I think this is fixed since last weekend. MarkupNotFoundException happens if there's a component inside another with wicket:message attribute --- Key: WICKET-3122 URL: https://issues.apache.org/jira/browse/WICKET-3122 Project: Wicket Issue Type: Bug Affects Versions: 1.5-M2.1 Reporter: Szádeczky-Kardoss Szabolcs Priority: Minor Hi, I am just in the process of migrating my project to 1.5(-M2.1), and discovered a problem when there's a markup like this: span wicket:message=title:favoriteCount.tipwicket:message key=favoriteCountFAVORITE COUNT/wicket:messagespan wicket:id=favoriteCount //span and Java file like this: add(new Label(favoriteCount)); and appropriate resource file(s) of course, then at render time a MarkupNotFoundException is given (Markup not found for Component: [Component id = favoriteCount]). If I remove the wicket:message=title:favoriteCount.tip part then it is fine, similar to 1.4.x. Another small note on issue 2776: I am not sure that reopening it was a good approach but the fix for that one disappeared for 1.5-M2.1. Could you please check that one too? -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Issue Comment Edited: (WICKET-3122) MarkupNotFoundException happens if there's a component inside another with wicket:message attribute
[ https://issues.apache.org/jira/browse/WICKET-3122?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12922944#action_12922944 ] Martin Grigorov edited comment on WICKET-3122 at 10/20/10 8:55 AM: --- Can you try with latest 1.5-SNAPSHOT ? I think this is fixed since last weekend (WICKET-3111). was (Author: mgrigorov): Can you try with latest 1.5-SNAPSHOT ? I think this is fixed since last weekend. MarkupNotFoundException happens if there's a component inside another with wicket:message attribute --- Key: WICKET-3122 URL: https://issues.apache.org/jira/browse/WICKET-3122 Project: Wicket Issue Type: Bug Affects Versions: 1.5-M2.1 Reporter: Szádeczky-Kardoss Szabolcs Priority: Minor Hi, I am just in the process of migrating my project to 1.5(-M2.1), and discovered a problem when there's a markup like this: span wicket:message=title:favoriteCount.tipwicket:message key=favoriteCountFAVORITE COUNT/wicket:messagespan wicket:id=favoriteCount //span and Java file like this: add(new Label(favoriteCount)); and appropriate resource file(s) of course, then at render time a MarkupNotFoundException is given (Markup not found for Component: [Component id = favoriteCount]). If I remove the wicket:message=title:favoriteCount.tip part then it is fine, similar to 1.4.x. Another small note on issue 2776: I am not sure that reopening it was a good approach but the fix for that one disappeared for 1.5-M2.1. Could you please check that one too? -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
svn commit: r1025549 - /wicket/trunk/wicket/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java
Author: mgrigorov Date: Wed Oct 20 13:24:35 2010 New Revision: 1025549 URL: http://svn.apache.org/viewvc?rev=1025549view=rev Log: Remove duplicated code. org.apache.wicket.util.tester.BaseWicketTester.submitAjaxFormSubmitBehavior(Component, AjaxFormSubmitBehavior) now delegates to #executeBehavior(ajaxSubmitFormBehavior). Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java?rev=1025549r1=1025548r2=1025549view=diff == --- wicket/trunk/wicket/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java (original) +++ wicket/trunk/wicket/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java Wed Oct 20 13:24:35 2010 @@ -48,6 +48,7 @@ import org.apache.wicket.Session; import org.apache.wicket.ThreadContext; import org.apache.wicket.WicketRuntimeException; import org.apache.wicket.ajax.AbstractAjaxTimerBehavior; +import org.apache.wicket.ajax.AjaxEventBehavior; import org.apache.wicket.ajax.AjaxRequestTarget; import org.apache.wicket.ajax.form.AjaxFormSubmitBehavior; import org.apache.wicket.ajax.markup.html.AjaxFallbackLink; @@ -1600,7 +1601,9 @@ public class BaseWicketTester Component: + component + ; Event: + event); } - executeBehavior(WicketTesterHelper.findAjaxEventBehavior(component, event)); + AjaxEventBehavior ajaxEventBehavior = WicketTesterHelper.findAjaxEventBehavior(component, + event); + executeBehavior(ajaxEventBehavior); } /** @@ -1662,13 +1665,7 @@ public class BaseWicketTester serializeFormToRequest(form); - Url url = Url.parse(behavior.getCallbackUrl().toString(), - Charset.forName(request.getCharacterEncoding())); - transform(url); - request.addHeader(Wicket-Ajax-BaseURL, url.toString()); - request.addHeader(Wicket-Ajax, true); - request.setUrl(url); - processRequest(request, null); + executeBehavior(behavior); } /**
svn commit: r1025550 - /wicket/trunk/wicket/src/main/java/org/apache/wicket/Component.java
Author: mgrigorov Date: Wed Oct 20 13:25:06 2010 New Revision: 1025550 URL: http://svn.apache.org/viewvc?rev=1025550view=rev Log: Update a javadoc which mentions ImageMap which is removed in 1.5 Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/Component.java Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/Component.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/Component.java?rev=1025550r1=1025549r2=1025550view=diff == --- wicket/trunk/wicket/src/main/java/org/apache/wicket/Component.java (original) +++ wicket/trunk/wicket/src/main/java/org/apache/wicket/Component.java Wed Oct 20 13:25:06 2010 @@ -2795,10 +2795,10 @@ public abstract class Component /** * Called to indicate that a component has been rendered. This method should only very rarely be -* called at all. One usage is in ImageMap, which renders its link children its own special way -* (without calling render() on them). If ImageMap did not call rendered() to indicate that its -* child components were actually rendered, the framework would think they had never been -* rendered, and in development mode this would result in a runtime exception. +* called at all. Some components may render its children without calling render() on them. +* These components need to call rendered() to indicate that its child components were actually +* rendered, the framework would think they had never been rendered, and in development mode +* this would result in a runtime exception. */ public final void rendered() {
[jira] Created: (WICKET-3123) MockSessionStore doesn't bind sessions properly
MockSessionStore doesn't bind sessions properly --- Key: WICKET-3123 URL: https://issues.apache.org/jira/browse/WICKET-3123 Project: Wicket Issue Type: Bug Components: wicket Affects Versions: 1.5-M2.1 Reporter: Martin Grigorov Binding a Session in MockSessionStore doesn't set its 'id' and thus later calls to #isTemporary() returns true. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Assigned: (WICKET-3123) MockSessionStore doesn't bind sessions properly
[ https://issues.apache.org/jira/browse/WICKET-3123?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Martin Grigorov reassigned WICKET-3123: --- Assignee: Martin Grigorov MockSessionStore doesn't bind sessions properly --- Key: WICKET-3123 URL: https://issues.apache.org/jira/browse/WICKET-3123 Project: Wicket Issue Type: Bug Components: wicket Affects Versions: 1.5-M2.1 Reporter: Martin Grigorov Assignee: Martin Grigorov Binding a Session in MockSessionStore doesn't set its 'id' and thus later calls to #isTemporary() returns true. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Created: (WICKET-3124) ModalWindow makes Internet Explorer 6 show an security warning dialog
ModalWindow makes Internet Explorer 6 show an security warning dialog -- Key: WICKET-3124 URL: https://issues.apache.org/jira/browse/WICKET-3124 Project: Wicket Issue Type: Bug Components: wicket-extensions Environment: Windows, Internet Explorer Reporter: Shanmugaraja CK Hi, Initially I was using wicket 1.3.0 and faced this mixed content warning issue. Then I saw that this has been fixed in version 1.3.0-rc2(See bug WICKET-855). Hence I migrated to version 1.3.4. But I am still facing this issue. Could this be that issue has again crept in later versions or do I need to use only version 1.3.0-rc2? Thanks Regards, Shanmugaraja -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Resolved: (WICKET-3124) ModalWindow makes Internet Explorer 6 show an security warning dialog
[ https://issues.apache.org/jira/browse/WICKET-3124?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Martin Grigorov resolved WICKET-3124. - Resolution: Won't Fix Please upgrade to latest 1.4 version. 1.3.x is not supported anymore. Please reopen the ticket if the problem is still there. Attach a quickstart application as well. Thanks! ModalWindow makes Internet Explorer 6 show an security warning dialog -- Key: WICKET-3124 URL: https://issues.apache.org/jira/browse/WICKET-3124 Project: Wicket Issue Type: Bug Components: wicket-extensions Environment: Windows, Internet Explorer Reporter: Shanmugaraja CK Hi, Initially I was using wicket 1.3.0 and faced this mixed content warning issue. Then I saw that this has been fixed in version 1.3.0-rc2(See bug WICKET-855). Hence I migrated to version 1.3.4. But I am still facing this issue. Could this be that issue has again crept in later versions or do I need to use only version 1.3.0-rc2? Thanks Regards, Shanmugaraja -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
svn commit: r1025621 - in /wicket/trunk/wicket/src: main/java/org/apache/wicket/util/tester/BaseWicketTester.java test/java/org/apache/wicket/util/tester/WicketTesterTest.java
Author: mgrigorov Date: Wed Oct 20 15:49:38 2010 New Revision: 1025621 URL: http://svn.apache.org/viewvc?rev=1025621view=rev Log: WICKET-3123 MockSessionStore doesn't bind sessions properly Actually it appeared that the session is inproperly bound for tests. All later calls to store.lookup(session) always return true and thus a session id is never created Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java wicket/trunk/wicket/src/test/java/org/apache/wicket/util/tester/WicketTesterTest.java Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java?rev=1025621r1=1025620r2=1025621view=diff == --- wicket/trunk/wicket/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java (original) +++ wicket/trunk/wicket/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java Wed Oct 20 15:49:38 2010 @@ -356,7 +356,6 @@ public class BaseWicketTester private void createNewSession() { session = Session.get(); - application.getSessionStore().bind(null, session); ThreadContext.setSession(session); } Modified: wicket/trunk/wicket/src/test/java/org/apache/wicket/util/tester/WicketTesterTest.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/test/java/org/apache/wicket/util/tester/WicketTesterTest.java?rev=1025621r1=1025620r2=1025621view=diff == --- wicket/trunk/wicket/src/test/java/org/apache/wicket/util/tester/WicketTesterTest.java (original) +++ wicket/trunk/wicket/src/test/java/org/apache/wicket/util/tester/WicketTesterTest.java Wed Oct 20 15:49:38 2010 @@ -46,7 +46,6 @@ import org.apache.wicket.util.tester.app import org.apache.wicket.util.tester.apps_1.ViewBook; import org.apache.wicket.util.tester.apps_6.LinkPage; import org.apache.wicket.util.tester.apps_6.ResultPage; -import org.junit.Ignore; /** * @@ -692,7 +691,6 @@ public class WicketTesterTest extends Te /** * Test for WICKET-3123 */ - @Ignore(Ignored until WICKET-3123 is fixed) public void testSessionBinding() { Session session = tester.getSession();
[jira] Commented: (WICKET-3123) MockSessionStore doesn't bind sessions properly
[ https://issues.apache.org/jira/browse/WICKET-3123?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12923036#action_12923036 ] Hudson commented on WICKET-3123: Integrated in Apache Wicket 1.5.x #426 (See [https://hudson.apache.org/hudson/job/Apache%20Wicket%201.5.x/426/]) WICKET-3123 MockSessionStore doesn't bind sessions properly Actually it appeared that the session is inproperly bound for tests. All later calls to store.lookup(session) always return true and thus a session id is never created WICKET-3123 MockSessionStore doesn't bind sessions properly Add an ignored unit test that shows the problem MockSessionStore doesn't bind sessions properly --- Key: WICKET-3123 URL: https://issues.apache.org/jira/browse/WICKET-3123 Project: Wicket Issue Type: Bug Components: wicket Affects Versions: 1.5-M2.1 Reporter: Martin Grigorov Assignee: Martin Grigorov Fix For: 1.5-M3 Binding a Session in MockSessionStore doesn't set its 'id' and thus later calls to #isTemporary() returns true. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Resolved: (WICKET-3119) Localizer cache does not include style in cache key when no component is given
[ https://issues.apache.org/jira/browse/WICKET-3119?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Igor Vaynberg resolved WICKET-3119. --- Resolution: Invalid Assignee: Igor Vaynberg not sure what version of wicket you are using, but in 1.4.x and 1.5.x getcachekey() looks like this: {code} buffer.append(-).append(component.getLocale()); buffer.append(-).append(component.getStyle()); === cacheKey = buffer.toString(); {code} Localizer cache does not include style in cache key when no component is given -- Key: WICKET-3119 URL: https://issues.apache.org/jira/browse/WICKET-3119 Project: Wicket Issue Type: Bug Components: wicket Reporter: Nick Wiedenbrueck Assignee: Igor Vaynberg Attachments: localizer.patch Localizer uses a cache internally to cache the results of getString() methods. The getCacheKey() method creates the key for the cache entries: getCacheKey(final String key, final Component component, final Locale locale, final String style, final String variation) When a null component is given, this method creates a cache key from the key param and the locale param, but does not include the style param. When switching between styles, this leads to unexpected behavior. I'll attach a patch with test cases. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Reopened: (WICKET-3119) Localizer cache does not include style in cache key when no component is given
[ https://issues.apache.org/jira/browse/WICKET-3119?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Nick Wiedenbrueck reopened WICKET-3119: --- That's the code when a component is given. I meant the code when no component is given (a couple of lines below that): {code} else { // locale is guaranteed to be != null cacheKey += - + locale.toString(); } {code} Localizer cache does not include style in cache key when no component is given -- Key: WICKET-3119 URL: https://issues.apache.org/jira/browse/WICKET-3119 Project: Wicket Issue Type: Bug Components: wicket Reporter: Nick Wiedenbrueck Assignee: Igor Vaynberg Attachments: localizer.patch Localizer uses a cache internally to cache the results of getString() methods. The getCacheKey() method creates the key for the cache entries: getCacheKey(final String key, final Component component, final Locale locale, final String style, final String variation) When a null component is given, this method creates a cache key from the key param and the locale param, but does not include the style param. When switching between styles, this leads to unexpected behavior. I'll attach a patch with test cases. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
svn commit: r1025674 - /wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/Localizer.java
Author: ivaynberg Date: Wed Oct 20 18:59:53 2010 New Revision: 1025674 URL: http://svn.apache.org/viewvc?rev=1025674view=rev Log: Issue: WICKET-3119 Modified: wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/Localizer.java Modified: wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/Localizer.java URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/Localizer.java?rev=1025674r1=1025673r2=1025674view=diff == --- wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/Localizer.java (original) +++ wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/Localizer.java Wed Oct 20 18:59:53 2010 @@ -444,7 +444,9 @@ public class Localizer } else { - cacheKey += - + Session.get().getLocale().toString(); + Session session = Session.get(); + cacheKey += - + session.getStyle(); + cacheKey += - + session.getLocale().toString(); } return cacheKey;
svn commit: r1025675 - /wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/Localizer.java
Author: ivaynberg Date: Wed Oct 20 19:00:26 2010 New Revision: 1025675 URL: http://svn.apache.org/viewvc?rev=1025675view=rev Log: Issue: WICKET-3119 Modified: wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/Localizer.java Modified: wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/Localizer.java URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/Localizer.java?rev=1025675r1=1025674r2=1025675view=diff == --- wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/Localizer.java (original) +++ wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/Localizer.java Wed Oct 20 19:00:26 2010 @@ -445,8 +445,8 @@ public class Localizer else { Session session = Session.get(); - cacheKey += - + session.getStyle(); cacheKey += - + session.getLocale().toString(); + cacheKey += - + session.getStyle(); } return cacheKey;
svn commit: r1025676 - /wicket/trunk/wicket/src/main/java/org/apache/wicket/Localizer.java
Author: ivaynberg Date: Wed Oct 20 19:02:02 2010 New Revision: 1025676 URL: http://svn.apache.org/viewvc?rev=1025676view=rev Log: Issue: WICKET-3119 Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/Localizer.java Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/Localizer.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/Localizer.java?rev=1025676r1=1025675r2=1025676view=diff == --- wicket/trunk/wicket/src/main/java/org/apache/wicket/Localizer.java (original) +++ wicket/trunk/wicket/src/main/java/org/apache/wicket/Localizer.java Wed Oct 20 19:02:02 2010 @@ -498,6 +498,7 @@ public class Localizer { // locale is guaranteed to be != null cacheKey += - + locale.toString(); + cacheKey += - + style; } return cacheKey;
[jira] Updated: (WICKET-3108) Problems with page maps stored in session
[ https://issues.apache.org/jira/browse/WICKET-3108?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pedro Santos updated WICKET-3108: - Attachment: patch.txt test case for problem 1 Problems with page maps stored in session - Key: WICKET-3108 URL: https://issues.apache.org/jira/browse/WICKET-3108 Project: Wicket Issue Type: Bug Components: wicket Affects Versions: 1.4.12 Reporter: Jeremy Thomerson Assignee: Jeremy Thomerson Priority: Minor Fix For: 1.4.13 Attachments: pagemapstuff-quickstart.tar.gz, patch.txt, problem-1.patch, problem-2.patch, problem-3.patch A client engaged me to assist in fixing multiple problems they found while writing a custom page map eviction strategy for page maps that have not been accessed in a while. Digging into the first problem revealed a few others. I'd like someone who is more familiar than me with the session and page map stuff to review this before I commit it. The quick start attached demonstrates the problems. I have yet to write test cases that can be added to the suite to replicate these issues. PROBLEM 1: If you call IPageMap.remove(), the page map is not actually removed because it's in the dirty objects list, which means that it gets set back on the session in the requestDetached() method. The quickstart demonstrates this in a link for ease of demonstration, but in reality, it applies even if someone is doing custom page map eviction in their request cycle somewhere. PROBLEM 2: It seems to be a safe assumption that every page map that is used in the session should also be in usedPageMaps, and that this map should always be exactly in sync with what's actually in your session (as attributes). Right now, they are not in sync. First, the default page map was not added to usedPageMaps in the dirtyPageMap(IPageMap) method. Second, when page maps are created, they are not dirtied (which means they are not in the usedPageMaps collection), although they are set as attributes on the session immediately. This causes a problem in the newPageMap(String) method with actually adhering to the max number you set. PROBLEM 3: If you have a bunch of popup links on a page, they can create more page maps than are allowed, and the number of page maps stored in the session grows beyond the limit of what you've specified. The real unanswered question I have is this: must we really create the page map when the link is first rendered? Or could we wait until it is clicked? NOTE: the fix for problems 2 and 3 relies on the fix for problem 1 being committed, because the call to pm.remove() in newPageMap(IPageMap) will not work without the fix for problem 1 -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Resolved: (WICKET-3119) Localizer cache does not include style in cache key when no component is given
[ https://issues.apache.org/jira/browse/WICKET-3119?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Igor Vaynberg resolved WICKET-3119. --- Resolution: Fixed Fix Version/s: 1.5-M3 1.4.13 ahha. next time please provide a patch that applies cleanly. Localizer cache does not include style in cache key when no component is given -- Key: WICKET-3119 URL: https://issues.apache.org/jira/browse/WICKET-3119 Project: Wicket Issue Type: Bug Components: wicket Reporter: Nick Wiedenbrueck Assignee: Igor Vaynberg Fix For: 1.4.13, 1.5-M3 Attachments: localizer.patch Localizer uses a cache internally to cache the results of getString() methods. The getCacheKey() method creates the key for the cache entries: getCacheKey(final String key, final Component component, final Locale locale, final String style, final String variation) When a null component is given, this method creates a cache key from the key param and the locale param, but does not include the style param. When switching between styles, this leads to unexpected behavior. I'll attach a patch with test cases. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (WICKET-3108) Problems with page maps stored in session
[ https://issues.apache.org/jira/browse/WICKET-3108?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12923112#action_12923112 ] Pedro Santos commented on WICKET-3108: -- Why don't prevent the removed pagemap from get into the dirty list at first place? There is no need to codify an second removal logic at the removePageMap method. It looks like we are fixing an error rather than prevent it. Problems with page maps stored in session - Key: WICKET-3108 URL: https://issues.apache.org/jira/browse/WICKET-3108 Project: Wicket Issue Type: Bug Components: wicket Affects Versions: 1.4.12 Reporter: Jeremy Thomerson Assignee: Jeremy Thomerson Priority: Minor Fix For: 1.4.13 Attachments: pagemapstuff-quickstart.tar.gz, patch.txt, patch.txt, problem-1.patch, problem-2.patch, problem-3.patch A client engaged me to assist in fixing multiple problems they found while writing a custom page map eviction strategy for page maps that have not been accessed in a while. Digging into the first problem revealed a few others. I'd like someone who is more familiar than me with the session and page map stuff to review this before I commit it. The quick start attached demonstrates the problems. I have yet to write test cases that can be added to the suite to replicate these issues. PROBLEM 1: If you call IPageMap.remove(), the page map is not actually removed because it's in the dirty objects list, which means that it gets set back on the session in the requestDetached() method. The quickstart demonstrates this in a link for ease of demonstration, but in reality, it applies even if someone is doing custom page map eviction in their request cycle somewhere. PROBLEM 2: It seems to be a safe assumption that every page map that is used in the session should also be in usedPageMaps, and that this map should always be exactly in sync with what's actually in your session (as attributes). Right now, they are not in sync. First, the default page map was not added to usedPageMaps in the dirtyPageMap(IPageMap) method. Second, when page maps are created, they are not dirtied (which means they are not in the usedPageMaps collection), although they are set as attributes on the session immediately. This causes a problem in the newPageMap(String) method with actually adhering to the max number you set. PROBLEM 3: If you have a bunch of popup links on a page, they can create more page maps than are allowed, and the number of page maps stored in the session grows beyond the limit of what you've specified. The real unanswered question I have is this: must we really create the page map when the link is first rendered? Or could we wait until it is clicked? NOTE: the fix for problems 2 and 3 relies on the fix for problem 1 being committed, because the call to pm.remove() in newPageMap(IPageMap) will not work without the fix for problem 1 -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Updated: (WICKET-3108) Problems with page maps stored in session
[ https://issues.apache.org/jira/browse/WICKET-3108?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pedro Santos updated WICKET-3108: - Attachment: patch.txt patch preventing the pagemap from getting into the dirty list Problems with page maps stored in session - Key: WICKET-3108 URL: https://issues.apache.org/jira/browse/WICKET-3108 Project: Wicket Issue Type: Bug Components: wicket Affects Versions: 1.4.12 Reporter: Jeremy Thomerson Assignee: Jeremy Thomerson Priority: Minor Fix For: 1.4.13 Attachments: pagemapstuff-quickstart.tar.gz, patch.txt, patch.txt, problem-1.patch, problem-2.patch, problem-3.patch A client engaged me to assist in fixing multiple problems they found while writing a custom page map eviction strategy for page maps that have not been accessed in a while. Digging into the first problem revealed a few others. I'd like someone who is more familiar than me with the session and page map stuff to review this before I commit it. The quick start attached demonstrates the problems. I have yet to write test cases that can be added to the suite to replicate these issues. PROBLEM 1: If you call IPageMap.remove(), the page map is not actually removed because it's in the dirty objects list, which means that it gets set back on the session in the requestDetached() method. The quickstart demonstrates this in a link for ease of demonstration, but in reality, it applies even if someone is doing custom page map eviction in their request cycle somewhere. PROBLEM 2: It seems to be a safe assumption that every page map that is used in the session should also be in usedPageMaps, and that this map should always be exactly in sync with what's actually in your session (as attributes). Right now, they are not in sync. First, the default page map was not added to usedPageMaps in the dirtyPageMap(IPageMap) method. Second, when page maps are created, they are not dirtied (which means they are not in the usedPageMaps collection), although they are set as attributes on the session immediately. This causes a problem in the newPageMap(String) method with actually adhering to the max number you set. PROBLEM 3: If you have a bunch of popup links on a page, they can create more page maps than are allowed, and the number of page maps stored in the session grows beyond the limit of what you've specified. The real unanswered question I have is this: must we really create the page map when the link is first rendered? Or could we wait until it is clicked? NOTE: the fix for problems 2 and 3 relies on the fix for problem 1 being committed, because the call to pm.remove() in newPageMap(IPageMap) will not work without the fix for problem 1 -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (WICKET-3119) Localizer cache does not include style in cache key when no component is given
[ https://issues.apache.org/jira/browse/WICKET-3119?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12923155#action_12923155 ] Hudson commented on WICKET-3119: Integrated in Apache Wicket 1.5.x #427 (See [https://hudson.apache.org/hudson/job/Apache%20Wicket%201.5.x/427/]) Issue: WICKET-3119 Localizer cache does not include style in cache key when no component is given -- Key: WICKET-3119 URL: https://issues.apache.org/jira/browse/WICKET-3119 Project: Wicket Issue Type: Bug Components: wicket Reporter: Nick Wiedenbrueck Assignee: Igor Vaynberg Fix For: 1.4.13, 1.5-M3 Attachments: localizer.patch Localizer uses a cache internally to cache the results of getString() methods. The getCacheKey() method creates the key for the cache entries: getCacheKey(final String key, final Component component, final Locale locale, final String style, final String variation) When a null component is given, this method creates a cache key from the key param and the locale param, but does not include the style param. When switching between styles, this leads to unexpected behavior. I'll attach a patch with test cases. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Created: (WICKET-3125) Add IRequestListener interface to allow easier framework extension points
Add IRequestListener interface to allow easier framework extension points - Key: WICKET-3125 URL: https://issues.apache.org/jira/browse/WICKET-3125 Project: Wicket Issue Type: Improvement Components: wicket Affects Versions: 1.5-M2.1 Reporter: Jeremy Thomerson Priority: Minor See http://apache-wicket.1842946.n4.nabble.com/Session-attach-tp3004389p3004681.html Basically, add an interface for onBeginRequest and onEndRequest that can be plugged into the WebRequestCycle. This allows framework extensions to plugin their listeners rather than extending WRC, and requiring that you then extend them. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (WICKET-3125) Add IRequestListener interface to allow easier framework extension points
[ https://issues.apache.org/jira/browse/WICKET-3125?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12923215#action_12923215 ] James Carman commented on WICKET-3125: -- I would say we just need to add listeners anywhere where we commonly tell folks to just implement your own custom X and override method Y Add IRequestListener interface to allow easier framework extension points - Key: WICKET-3125 URL: https://issues.apache.org/jira/browse/WICKET-3125 Project: Wicket Issue Type: Improvement Components: wicket Affects Versions: 1.5-M2.1 Reporter: Jeremy Thomerson Priority: Minor See http://apache-wicket.1842946.n4.nabble.com/Session-attach-tp3004389p3004681.html Basically, add an interface for onBeginRequest and onEndRequest that can be plugged into the WebRequestCycle. This allows framework extensions to plugin their listeners rather than extending WRC, and requiring that you then extend them. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (WICKET-3125) Add IRequestListener interface to allow easier framework extension points
[ https://issues.apache.org/jira/browse/WICKET-3125?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12923218#action_12923218 ] Igor Vaynberg commented on WICKET-3125: --- should also include onruntimeexception, and the contract of whether or not onendrequest is called if onruntimeexception was should also be clearly defined. Add IRequestListener interface to allow easier framework extension points - Key: WICKET-3125 URL: https://issues.apache.org/jira/browse/WICKET-3125 Project: Wicket Issue Type: Improvement Components: wicket Affects Versions: 1.5-M2.1 Reporter: Jeremy Thomerson Priority: Minor See http://apache-wicket.1842946.n4.nabble.com/Session-attach-tp3004389p3004681.html Basically, add an interface for onBeginRequest and onEndRequest that can be plugged into the WebRequestCycle. This allows framework extensions to plugin their listeners rather than extending WRC, and requiring that you then extend them. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (WICKET-3125) Add IRequestListener interface to allow easier framework extension points
[ https://issues.apache.org/jira/browse/WICKET-3125?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12923219#action_12923219 ] Igor Vaynberg commented on WICKET-3125: --- must be able to add to both application and requestcycle. Add IRequestListener interface to allow easier framework extension points - Key: WICKET-3125 URL: https://issues.apache.org/jira/browse/WICKET-3125 Project: Wicket Issue Type: Improvement Components: wicket Affects Versions: 1.5-M2.1 Reporter: Jeremy Thomerson Priority: Minor See http://apache-wicket.1842946.n4.nabble.com/Session-attach-tp3004389p3004681.html Basically, add an interface for onBeginRequest and onEndRequest that can be plugged into the WebRequestCycle. This allows framework extensions to plugin their listeners rather than extending WRC, and requiring that you then extend them. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (WICKET-3119) Localizer cache does not include style in cache key when no component is given
[ https://issues.apache.org/jira/browse/WICKET-3119?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12923252#action_12923252 ] Hudson commented on WICKET-3119: Integrated in Apache Wicket 1.4.x #219 (See [https://hudson.apache.org/hudson/job/Apache%20Wicket%201.4.x/219/]) Localizer cache does not include style in cache key when no component is given -- Key: WICKET-3119 URL: https://issues.apache.org/jira/browse/WICKET-3119 Project: Wicket Issue Type: Bug Components: wicket Reporter: Nick Wiedenbrueck Assignee: Igor Vaynberg Fix For: 1.4.13, 1.5-M3 Attachments: localizer.patch Localizer uses a cache internally to cache the results of getString() methods. The getCacheKey() method creates the key for the cache entries: getCacheKey(final String key, final Component component, final Locale locale, final String style, final String variation) When a null component is given, this method creates a cache key from the key param and the locale param, but does not include the style param. When switching between styles, this leads to unexpected behavior. I'll attach a patch with test cases. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (WICKET-3116) class cast exception
[ https://issues.apache.org/jira/browse/WICKET-3116?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12923253#action_12923253 ] Hudson commented on WICKET-3116: Integrated in Apache Wicket 1.4.x #219 (See [https://hudson.apache.org/hudson/job/Apache%20Wicket%201.4.x/219/]) class cast exception Key: WICKET-3116 URL: https://issues.apache.org/jira/browse/WICKET-3116 Project: Wicket Issue Type: Bug Components: wicket-portlet Affects Versions: 1.4.10 Environment: running on windows Reporter: dgherrig Assignee: Igor Vaynberg Fix For: 1.4.13 Original Estimate: 6h Remaining Estimate: 6h Below is the exception I am getting when doing setResponse( myPage(some_value) in my code. I downloaded the src and in WicketPortlet.java at line 676:: changed: (RenderResponse)response).reset(); to:response.reset(); rebuilt and tested again and this fixed the problem. I believe this is related to running wicket in the jetspeed portal and conflicts with pluto 2.0 which uses the clean room jars of javax. The casting is not necessary. java.lang.ClassCastException: org.apache.pluto.container.impl.ResourceResponseImpl cannot be cast to javax.portlet.RenderResponse at org.apache.wicket.protocol.http.portlet.WicketPortlet.processMimeResponseRequest(WicketPortlet.java:676) at org.apache.wicket.protocol.http.portlet.WicketPortlet.processRequest(WicketPortlet.java:608) at org.apache.wicket.protocol.http.portlet.WicketPortlet.serveResource(WicketPortlet.java:536) at sun.reflect.GeneratedMethodAccessor197.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.jetspeed.portlet.PortletObjectProxy.invoke(PortletObjectProxy.java:181) at $Proxy91.serveResource(Unknown Source) at org.apache.jetspeed.factory.JetspeedPortletInstance.serveResource(JetspeedPortletInstance.java:139) at org.apache.jetspeed.container.services.JetspeedFilterChain.doFilter(JetspeedFilterChain.java:157) at org.apache.jetspeed.container.services.JetspeedFilterChain.processFilter(JetspeedFilterChain.java:78) at org.apache.jetspeed.container.services.JetspeedFilterManager.processFilter(JetspeedFilterManager.java:117) at org.apache.jetspeed.container.JetspeedContainerServlet.doGet(JetspeedContainerServlet.java:318) at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:630) at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302) at org.apache.jetspeed.container.invoker.ServletPortletInvoker.invoke(ServletPortletInvoker.java:161) at org.apache.jetspeed.container.invoker.JetspeedPortletInvokerService.serveResource(JetspeedPortletInvokerService.java:136) at org.apache.pluto.container.impl.PortletContainerImpl.doServeResource(PortletContainerImpl.java:203) at org.apache.jetspeed.container.JetspeedPortletContainerWrapper.doServeResource(JetspeedPortletContainerWrapper.java:93) at org.apache.jetspeed.resource.ResourceValveImpl.invoke(ResourceValveImpl.java:69) at org.apache.jetspeed.pipeline.JetspeedPipeline$Invocation.invokeNext(JetspeedPipeline.java:242) at org.apache.jetspeed.pipeline.valve.impl.ActionValveImpl.invoke(ActionValveImpl.java:139) at org.apache.jetspeed.pipeline.JetspeedPipeline$Invocation.invokeNext(JetspeedPipeline.java:242) at org.apache.jetspeed.container.ContainerValve.invoke(ContainerValve.java:88) at org.apache.jetspeed.pipeline.JetspeedPipeline$Invocation.invokeNext(JetspeedPipeline.java:242) at org.apache.jetspeed.container.PageHistoryValve.invoke(PageHistoryValve.java:108) at org.apache.jetspeed.pipeline.JetspeedPipeline$Invocation.invokeNext(JetspeedPipeline.java:242) at org.apache.jetspeed.profiler.impl.RefreshUserHomepageValveImpl.invoke(RefreshUserHomepageValveImpl.java:114) at
svn commit: r1025813 - in /wicket/trunk/wicket/src: main/java/org/apache/wicket/ main/java/org/apache/wicket/request/cycle/ test/java/org/apache/wicket/request/cycle/
Author: jrthomerson Date: Thu Oct 21 02:37:11 2010 New Revision: 1025813 URL: http://svn.apache.org/viewvc?rev=1025813view=rev Log: fixes WICKET-3125 Added: wicket/trunk/wicket/src/test/java/org/apache/wicket/request/cycle/BaseRequestHandlerStackTest.java wicket/trunk/wicket/src/test/java/org/apache/wicket/request/cycle/RequestCycleListenerTest.java Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/Application.java wicket/trunk/wicket/src/main/java/org/apache/wicket/request/cycle/RequestCycle.java wicket/trunk/wicket/src/test/java/org/apache/wicket/request/cycle/RequestHandlerStackTest.java Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/Application.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/Application.java?rev=1025813r1=1025812r2=1025813view=diff == --- wicket/trunk/wicket/src/main/java/org/apache/wicket/Application.java (original) +++ wicket/trunk/wicket/src/main/java/org/apache/wicket/Application.java Thu Oct 21 02:37:11 2010 @@ -66,6 +66,7 @@ import org.apache.wicket.request.Request import org.apache.wicket.request.Response; import org.apache.wicket.request.component.IRequestablePage; import org.apache.wicket.request.cycle.RequestCycle; +import org.apache.wicket.request.cycle.RequestCycle.IRequestCycleListener; import org.apache.wicket.request.cycle.RequestCycleContext; import org.apache.wicket.request.mapper.CompoundRequestMapper; import org.apache.wicket.request.mapper.ICompoundRequestMapper; @@ -169,6 +170,8 @@ public abstract class Application implem /** */ private ListIComponentOnAfterRenderListener componentOnAfterRenderListeners; + private final ListIRequestCycleListener requestCycleListeners = new ArrayListIRequestCycleListener(); + /** root mapper */ private IRequestMapper rootRequestMapper; @@ -1150,6 +1153,25 @@ public abstract class Application implem } /** +* Registers a listener to extend functionality in the {...@link RequestCycle}. +* +* @param listener +*/ + public void addRequestCycleListener(IRequestCycleListener listener) + { + requestCycleListeners.add(listener); + } + + /** +* @return the unmodifiable request list of {...@link IRequestCycleListener}s in this application +*/ + public ListIRequestCycleListener getRequestCycleListeners() + { + return Collections.unmodifiableList(requestCycleListeners); + } + + + /** * Removes an {...@link IComponentOnAfterRenderListener}. * * @param listener Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/request/cycle/RequestCycle.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/request/cycle/RequestCycle.java?rev=1025813r1=1025812r2=1025813view=diff == --- wicket/trunk/wicket/src/main/java/org/apache/wicket/request/cycle/RequestCycle.java (original) +++ wicket/trunk/wicket/src/main/java/org/apache/wicket/request/cycle/RequestCycle.java Thu Oct 21 02:37:11 2010 @@ -19,6 +19,7 @@ package org.apache.wicket.request.cycle; import java.util.ArrayList; import java.util.List; +import org.apache.wicket.Application; import org.apache.wicket.MetaDataEntry; import org.apache.wicket.MetaDataKey; import org.apache.wicket.Page; @@ -87,6 +88,51 @@ public class RequestCycle extends Reques } /** +* A callback interface for various methods in the request cycle. If you are creating a +* framework that needs to do something in this methods, rather than extending RequestCycle or +* one of its subclasses, you should implement this callback and allow users to add your +* listener to their custom request cycle. +* +* These listeners can be added directly to the request cycle when it is created or to the +* {...@link Application} +* +* @author Jeremy Thomerson +* @see Application#addRequestCycleListener(IRequestCycleListener) +* @see RequestCycle#register(IRequestCycleListener) +*/ + public interface IRequestCycleListener + { + /** +* Called when the request cycle object is beginning its response +*/ + void onBeginRequest(); + + /** +* Called when the request cycle object has finished its response +*/ + void onEndRequest(); + + /** +* Called when there is an exception in the request cycle that would normally be handled by +* {...@link RequestCycle#handleException(Exception)} +* +* Note that in the event of
[jira] Assigned: (WICKET-3125) Add IRequestListener interface to allow easier framework extension points
[ https://issues.apache.org/jira/browse/WICKET-3125?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jeremy Thomerson reassigned WICKET-3125: Assignee: Jeremy Thomerson Add IRequestListener interface to allow easier framework extension points - Key: WICKET-3125 URL: https://issues.apache.org/jira/browse/WICKET-3125 Project: Wicket Issue Type: Improvement Components: wicket Affects Versions: 1.5-M2.1 Reporter: Jeremy Thomerson Assignee: Jeremy Thomerson Priority: Minor Fix For: 1.5-M3 See http://apache-wicket.1842946.n4.nabble.com/Session-attach-tp3004389p3004681.html Basically, add an interface for onBeginRequest and onEndRequest that can be plugged into the WebRequestCycle. This allows framework extensions to plugin their listeners rather than extending WRC, and requiring that you then extend them. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Resolved: (WICKET-3125) Add IRequestListener interface to allow easier framework extension points
[ https://issues.apache.org/jira/browse/WICKET-3125?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jeremy Thomerson resolved WICKET-3125. -- Resolution: Fixed Fix Version/s: 1.5-M3 Add IRequestListener interface to allow easier framework extension points - Key: WICKET-3125 URL: https://issues.apache.org/jira/browse/WICKET-3125 Project: Wicket Issue Type: Improvement Components: wicket Affects Versions: 1.5-M2.1 Reporter: Jeremy Thomerson Assignee: Jeremy Thomerson Priority: Minor Fix For: 1.5-M3 See http://apache-wicket.1842946.n4.nabble.com/Session-attach-tp3004389p3004681.html Basically, add an interface for onBeginRequest and onEndRequest that can be plugged into the WebRequestCycle. This allows framework extensions to plugin their listeners rather than extending WRC, and requiring that you then extend them. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[CONF] Apache Wicket Migration to Wicket 1.5
Migration to Wicket 1.5 Page edited by Jeremy Thomerson Changes (6) ... RequestCycle has changed in 1.5-M1 and WebRequestCycle has been removed. When we want to override RequestCycles methods and write our logic codes we can not do it like 1.4.x. In 1.4 you would have overridden onBeginRequest, onEndRequest, and onRuntimeException, like so: eg. {code:title=ReqeustCycle|borderStyle=solid}public MyRequestCycle extends WebRequestCycle { @Override ... }{code} In this case well need to extend RequestCycle and Override org.apache.wicket.Application.setRequestCycleProvider(IRequestCycleProvider) to return our a provider for a custom RequestCycle implementation. In 1.5, onRuntimeException is gone (see next section). You can still override onBeginRequest and onEndRequest. However, if you are creating a framework that needs to be able to plug in functionality into those callbacks, it is recommended that you no longer create a subclass of RequestCycle that your users must also subclass. This limits them from using two such frameworks. Now there is RequestCycle#IRequestCycleListener that you can plug in, either to the cycle itself or to the application, and you will be notified of all of these method callbacks. For example: {code:title=IRequestCycleListener|borderStyle=solid}public class SomeWebApplication extends WebApplication { @Override protected void init() { addRequestCycleListener(new IRequestCycleListener() { public void onException(Exception ex) { // do something here whene theres an exception } public void onEndRequest() { // do something at the end of the request } public void onBeginRequest() { // do something at the beginning of the request } }); } @Override public Class? extends Page getHomePage() { return SomePage.class; } }{code} Note also that instead of overriding org.apache.wicket.Application.newRequestCycle(...), you will now call org.apache.wicket.Application.setRequestCycleProvider(IRequestCycleProvider) in your Application#init method to provide a factory that can return any custom RequestCycle that you do want to create, although with the plugins, the need to create a custom request cycle is much lower now. h3. Exception handling In Wicket 1.4 it was needed to extend org.apache.wicket.RequestCycle.onRuntimeException(Page, RuntimeException). ... Full Content Migrating to Wicket 1.5 Environment Upgraded to JUNIT4 Removed deprecated method, class and interface definitions Removed FormComponent.setPersistence() Removed IComponentBorder Component.getStyle() implementation changed Removed magic from Border Component Component rendering UTF-8 encoded property files TabbedPanel MarkupContainer.isTransparentResolver() removed IComponentResolver.resolve API has changed Wicket-IOC changes Visitors Component Initialization - Component#onInitialize Request parameters Switching to/from secured communication over https HeaderContribution Component and IBehavior implement IHeaderContributor Removed HeaderContributor and friends. RequestCycle Exception handling ImageMap removed getResourceSettings().setAddLastModifiedTimeToResourceReferenceUrl() has been replaced Inter-component events List of renamed classes and methods Environment Wicket 1.5 requires at least Java 5 Upgraded to JUNIT4 We changed the root pom.xml to use junit4 (4.7) Removed deprecated method, class and interface definitions In order to keep the code clean, we removed all methods, classes and interfaces which were marked deprecated in Wicket 1.4. Before migrating to Wicket 1.5 you should replace all deprecated invocations. Removed FormComponent.setPersistence() WICKET-2213: At the very beginning of Wicket we introduced FormComponent.setPersistence() with the idea to make creating Login panels very easy. Basically Wicket would deal with the Cookie handling for the login details. Now some years later it is evident that this feature is not very useful: It basically is used for login panels only Even in our examples Password.setPersistence is false which means that "rememberMe" doesn't really work. Only the user name is stored in a Cookie Forcing formComponent.getPageRelativePath() as the Cookie name is too restrictive You can not combine username and password into a single Cookie and e.g. decrypt it for safety reasons So we removed that feature and introduced IAuthenticationStrategy. A default implementation has been provided and the examples have been updated. As usual it
svn commit: r1025820 - /wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/util/io/SerializableChecker.java
Author: ivaynberg Date: Thu Oct 21 04:39:59 2010 New Revision: 1025820 URL: http://svn.apache.org/viewvc?rev=1025820view=rev Log: fixed the rare but seriously annoying stack overflow in serializable checker. had to do with checking objects that override serialization. Modified: wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/util/io/SerializableChecker.java Modified: wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/util/io/SerializableChecker.java URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/util/io/SerializableChecker.java?rev=1025820r1=1025819r2=1025820view=diff == --- wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/util/io/SerializableChecker.java (original) +++ wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/util/io/SerializableChecker.java Thu Oct 21 04:39:59 2010 @@ -34,6 +34,7 @@ import java.util.IdentityHashMap; import java.util.Iterator; import java.util.LinkedList; import java.util.Map; +import java.util.Stack; import org.apache.wicket.Component; import org.apache.wicket.WicketRuntimeException; @@ -302,6 +303,8 @@ public final class SerializableChecker e /** Exception that should be set as the cause when throwing a new exception. */ private final NotSerializableException exception; + private final StackObject stack = new StackObject(); + /** * Construct. * @@ -337,6 +340,29 @@ public final class SerializableChecker e return; } + if (stack.contains(obj)) + { + return; + } + + stack.push(obj); + try + { + internalCheck(obj); + } + finally + { + stack.pop(); + } + } + + private void internalCheck(Object obj) + { + if (obj == null) + { + return; + } + Class? cls = obj.getClass(); nameStack.add(simpleName); traceStack.add(new TraceSlot(obj, fieldDescription));
svn commit: r1025821 - /wicket/trunk/wicket/src/main/java/org/apache/wicket/util/io/SerializableChecker.java
Author: ivaynberg Date: Thu Oct 21 04:40:31 2010 New Revision: 1025821 URL: http://svn.apache.org/viewvc?rev=1025821view=rev Log: fix stack overflow in serializablechecker Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/util/io/SerializableChecker.java Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/util/io/SerializableChecker.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/util/io/SerializableChecker.java?rev=1025821r1=1025820r2=1025821view=diff == --- wicket/trunk/wicket/src/main/java/org/apache/wicket/util/io/SerializableChecker.java (original) +++ wicket/trunk/wicket/src/main/java/org/apache/wicket/util/io/SerializableChecker.java Thu Oct 21 04:40:31 2010 @@ -34,6 +34,7 @@ import java.util.IdentityHashMap; import java.util.Iterator; import java.util.LinkedList; import java.util.Map; +import java.util.Stack; import org.apache.wicket.Component; import org.apache.wicket.WicketRuntimeException; @@ -302,6 +303,8 @@ public final class SerializableChecker e /** Exception that should be set as the cause when throwing a new exception. */ private final NotSerializableException exception; + private final StackObject stack = new StackObject(); + /** * Construct. * @@ -337,6 +340,29 @@ public final class SerializableChecker e return; } + if (stack.contains(obj)) + { + return; + } + + stack.push(obj); + try + { + internalCheck(obj); + } + finally + { + stack.pop(); + } + } + + private void internalCheck(Object obj) + { + if (obj == null) + { + return; + } + Class? cls = obj.getClass(); nameStack.add(simpleName); traceStack.add(new TraceSlot(obj, fieldDescription));
svn commit: r1025834 - in /wicket/trunk: wicket-util/src/main/java/org/apache/wicket/util/listener/ wicket-util/src/main/java/org/apache/wicket/util/watch/ wicket/src/main/java/org/apache/wicket/ wick
Author: ivaynberg Date: Thu Oct 21 05:51:50 2010 New Revision: 1025834 URL: http://svn.apache.org/viewvc?rev=1025834view=rev Log: abstracted the idea of a listener collection refactored listener lists to use the collection instead removed detachlistener in favor of ondetach in request cycle listener request cycle listener now gets the request cycle for context Issue: WICKET-3125 Added: wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/listener/ListenerCollection.java (contents, props changed) - copied, changed from r1025821, wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/listener/ListenerSet.java wicket/trunk/wicket/src/main/java/org/apache/wicket/request/cycle/AbstractRequestCycleListener.java (with props) wicket/trunk/wicket/src/main/java/org/apache/wicket/request/cycle/IRequestCycleListener.java (with props) wicket/trunk/wicket/src/main/java/org/apache/wicket/request/cycle/RequestCycleListenerCollection.java (with props) Removed: wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/listener/IListener.java wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/listener/ListenerSet.java Modified: wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/listener/ChangeListenerSet.java wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/listener/IChangeListener.java wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/watch/ModificationWatcher.java wicket/trunk/wicket/src/main/java/org/apache/wicket/Application.java wicket/trunk/wicket/src/main/java/org/apache/wicket/Session.java wicket/trunk/wicket/src/main/java/org/apache/wicket/request/cycle/RequestCycle.java wicket/trunk/wicket/src/test/java/org/apache/wicket/request/cycle/RequestCycleListenerTest.java Modified: wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/listener/ChangeListenerSet.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/listener/ChangeListenerSet.java?rev=1025834r1=1025833r2=1025834view=diff == --- wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/listener/ChangeListenerSet.java (original) +++ wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/listener/ChangeListenerSet.java Thu Oct 21 05:51:50 2010 @@ -24,14 +24,26 @@ package org.apache.wicket.util.listener; * * @author Jonathan Locke */ -public final class ChangeListenerSet extends ListenerSetIChangeListener +public final class ChangeListenerSet extends ListenerCollectionIChangeListener { /** -* @see org.apache.wicket.util.listener.ListenerSet#notifyListener(org.apache.wicket.util.listener.IListener) +* @see org.apache.wicket.util.listener.ListenerCollection#notifyListener(org.apache.wicket.util.listener.IListener) */ - @Override protected void notifyListener(IChangeListener listener) { - listener.onChange(); + + } + + public void notifyListeners() + { + notify(new INotifierIChangeListener() + { + + public void notify(IChangeListener object) + { + object.onChange(); + } + + }); } } Modified: wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/listener/IChangeListener.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/listener/IChangeListener.java?rev=1025834r1=1025833r2=1025834view=diff == --- wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/listener/IChangeListener.java (original) +++ wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/listener/IChangeListener.java Thu Oct 21 05:51:50 2010 @@ -21,7 +21,7 @@ package org.apache.wicket.util.listener; * * @author Jonathan Locke */ -public interface IChangeListener extends IListener +public interface IChangeListener { /** * Client method that is called to indicate that something changed. Copied: wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/listener/ListenerCollection.java (from r1025821, wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/listener/ListenerSet.java) URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/listener/ListenerCollection.java?p2=wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/listener/ListenerCollection.javap1=wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/listener/ListenerSet.javar1=1025821r2=1025834rev=1025834view=diff == ---
svn commit: r1025835 - /wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/listener/ListenerCollection.java
Author: ivaynberg Date: Thu Oct 21 05:53:57 2010 New Revision: 1025835 URL: http://svn.apache.org/viewvc?rev=1025835view=rev Log: added serialization uuid Modified: wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/listener/ListenerCollection.java Modified: wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/listener/ListenerCollection.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/listener/ListenerCollection.java?rev=1025835r1=1025834r2=1025835view=diff == --- wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/listener/ListenerCollection.java (original) +++ wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/listener/ListenerCollection.java Thu Oct 21 05:53:57 2010 @@ -37,6 +37,8 @@ import org.slf4j.LoggerFactory; */ public abstract class ListenerCollectionT implements Serializable { + private static final long serialVersionUID = 1L; + private static final Logger logger = LoggerFactory.getLogger(ListenerCollection.class); /** list of listeners */