[jira] Created: (WICKET-2108) wicket-extensions demos out of service
wicket-extensions demos out of service -- Key: WICKET-2108 URL: https://issues.apache.org/jira/browse/WICKET-2108 Project: Wicket Issue Type: Bug Components: wicket-extensions Reporter: Paul Ivancsics The demo section of wicket extensions seems to be out of services. - The page you requested has expired. This comes on a fresh session. The overview page renders http://www.wicketstuff.org/wicket13/ajax/ but the demos dont work, and the source code is not available. Sorry for bugging this forum, but the example code is the only resource for me to learn about using the components. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Created: (WICKET-2109) IResourceStream.close is not called by ResourceStreamRequestTarget
IResourceStream.close is not called by ResourceStreamRequestTarget -- Key: WICKET-2109 URL: https://issues.apache.org/jira/browse/WICKET-2109 Project: Wicket Issue Type: Bug Components: wicket Affects Versions: 1.4-RC2 Reporter: Adriano dos Santos Fernandes ResourceStreamRequestTarget.detach does nothing. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (WICKET-1600) Wicket tree improvement
[ https://issues.apache.org/jira/browse/WICKET-1600?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12674193#action_12674193 ] Thomas Mäder commented on WICKET-1600: -- Sven, have you ever had a look at the JFace TreeViewer? The INodeProvider looks very much like JFace's ITreeContentProvider. However, the JFace TreeViewer doesn't require you to know the exact delta to the underlying data structure, but does a smart diff (you can just say refresh(Node) and the tree will figure out the delta). I have in the past written an adapter from an ITreeContentProvider to a TreeModel, so if there's interest, I could help out with some code. Wicket tree improvement --- Key: WICKET-1600 URL: https://issues.apache.org/jira/browse/WICKET-1600 Project: Wicket Issue Type: Improvement Components: wicket Affects Versions: 1.4-M1 Reporter: Sven Meier Assignee: Matej Knopp Priority: Minor Fix For: 1.5-M1 Attachments: tree.diff I see the following issues with Wicket's tree implementation that should be solved: AbstractTree and its subclasses were written with the Swing JTree API in mind. This is not a bad thing per se, but the JTree abstractions are not very well suited for a web application. Matej recently removed some of these dependencies, but there's still a lot of code that uses TreeNode, TreeModelEvent and such. AbstractTree holds a TreeModel in its model, attaching a listener to it. This is an unusual approach for a Wicket component: - It implies that changes in the TreeModel are automatically propagated to the user interface. This is not always the case, as in an ajax request the AbstractTree has to be explicitely notified to update itself. - It requires the AbstractTree to monitor the model for a replaced TreeModel. Most importantly the TreeModel API is complicated and ambiguous (just see the javadoc of TreeModelEvent and TreeModelListener) which makes life harder especially for those who want to use AbstractTree with their own TreeModel implementation (which is difficult enough). Although not directly visible in the API, an implementor has to privide the parent of a node - see AbstractTree#getParentNode(). Tree listeners and events are an annoyance which doesn't match Wicket's elegance. Currently many components in the AbstractTree hierarchy hold a reference to real nodes of the TreeModel (e.g. junctionLink). TreeState seems like a foreign concept to Wicket, holding references to nodes too. To support detachment AbstractTree tests wether a node implements IDetachable, effectively duplicating functionality that is normally provider by Component and its model out of the box. The nodes are currently used to identify state (e.g. the parent) in the tree. To add a node, the nodes have to implement equals() and hashCode() to be correctly identified in the tree state. This might be unacceptable, e.g. if entities (business objects) are used as nodes, probably loaded from a database. Therefore I propose to refactor AbstractTree and subclasses as follows: A new interface INodeProvider (similar to IDataProvider) defines a concise API to define a tree of nodes. The method #model(Object) gives an implementor the possibility to wrap nodes in a suitable model, e.g. a detachable one. The provided model can handle #equal() and #hashcode() for identification of nodes in the tree. References to nodes are always indirect through the model, never to the real node object. Handling of node parents is completely managed inside AbstractTree, no need for an ExtendedTreeModel. The model of an AbstractTree is used for node selection, similar to AbstractChoices. Listeners are replaced with notification methods on AbstractTree. No need for tree paths on changes. Expansion state is held in the AbstracTree#TreeItems (instead of former ITreeState) - similar to component visibility. The attached patch tries to achieve all this (or at least show how a solution could look like), additionally: - AbstractTree now utilizes AbstractRepeater and #setOutputMarkupPlaceholderTag() instead of custom solutions. - The examples are modified and enhanced with 'add' and 'remove' functionality, org.apache.wicket.examples.nested.Home shows usage of an Swing TreeModel adapter. - Lots of generics are added (Swing's TreeModel will probably never be generic). - The code is (hopefully) simplified. I apologies for putting all this stuff into a single patch, but I wasn't able to split these issues apart - it all depends on the proposed INodeProvider interface. For users of AbstractTree this solution has the following impacts: - minor API changes for subclasses - if a node is collapsed, all state of descendants will be lost, i.e. if the
svn commit: r745028 - /wicket/trunk/wicket/src/main/java/org/apache/wicket/request/target/coding/MixedParamUrlCodingStrategy.java
Author: jdonnerstag Date: Tue Feb 17 12:51:27 2009 New Revision: 745028 URL: http://svn.apache.org/viewvc?rev=745028view=rev Log: javadoc formatting Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/request/target/coding/MixedParamUrlCodingStrategy.java Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/request/target/coding/MixedParamUrlCodingStrategy.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/request/target/coding/MixedParamUrlCodingStrategy.java?rev=745028r1=745027r2=745028view=diff == --- wicket/trunk/wicket/src/main/java/org/apache/wicket/request/target/coding/MixedParamUrlCodingStrategy.java (original) +++ wicket/trunk/wicket/src/main/java/org/apache/wicket/request/target/coding/MixedParamUrlCodingStrategy.java Tue Feb 17 12:51:27 2009 @@ -26,37 +26,21 @@ import org.apache.wicket.util.string.AppendingStringBuffer; import org.apache.wicket.util.value.ValueMap; - /** - * - * Url coding strategy for bookmarkable pages that encodes a set of given parameters - * - * in the url's path path and the rest in the querystring. - * - * p - * Strategy looks for path-parameters whose name is read from an array of - * - * names e.g. [param0, param1]. Found parameters will be appended to the url in - * - * the form code/mount-path/paramvalue0/paramvalue1/code. - * /p - * - * p + * Url coding strategy for bookmarkable pages that encodes a set of given parameters in the url's + * path and the rest in the query-string. + * p/ + * Strategy looks for path-parameters whose name is read from an array of names e.g. [param0, + * param1]. Found parameters will be appended to the url in the form + * code/mount-path/paramvalue0/paramvalue1/code. + * p/ * All other parameters are added as parameter in the form: - * * code/mount-path/paramvalue0?otherparam0=otherparamvalue0otherparam1=otherparamvalue1/code. - * /p - * - * p + * p/ * Decode is symmetric except for when a path parameter that is not at the end has no value during - * encode. - * - * For example, the names for the path parameters are: a, b and c. When b is - * - * not specified upon encoding, but c is, upon a decode b will get the empty string - * - * as value. When both b and c are missing on encode, the will not get a value during decode. - * /p + * encode. For example, the names for the path parameters are: a, b and c. When b is not + * specified upon encoding, but c is, upon a decode b will get the empty string as value. When + * both b and c are missing on encode, the will not get a value during decode. * * @author erik.van.oosten */
svn commit: r745030 - in /wicket/trunk/wicket/src: main/java/org/apache/wicket/ main/java/org/apache/wicket/protocol/http/ test/java/org/apache/wicket/redirect/encodingtest/
Author: jdonnerstag Date: Tue Feb 17 12:56:04 2009 New Revision: 745030 URL: http://svn.apache.org/viewvc?rev=745030view=rev Log: fixed wicket-2061: interceptContinuationURL with umlauts not encoded fixed MockHttpServletRequest as well, which didn't properly support it neither. Added: wicket/trunk/wicket/src/test/java/org/apache/wicket/redirect/encodingtest/ wicket/trunk/wicket/src/test/java/org/apache/wicket/redirect/encodingtest/A.html wicket/trunk/wicket/src/test/java/org/apache/wicket/redirect/encodingtest/A.java wicket/trunk/wicket/src/test/java/org/apache/wicket/redirect/encodingtest/B.html wicket/trunk/wicket/src/test/java/org/apache/wicket/redirect/encodingtest/B.java wicket/trunk/wicket/src/test/java/org/apache/wicket/redirect/encodingtest/HomePage.html wicket/trunk/wicket/src/test/java/org/apache/wicket/redirect/encodingtest/HomePage.java wicket/trunk/wicket/src/test/java/org/apache/wicket/redirect/encodingtest/RequestEncodingTest.java wicket/trunk/wicket/src/test/java/org/apache/wicket/redirect/encodingtest/WicketApplication.java Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/PageMap.java wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/http/MockHttpServletRequest.java wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/http/WicketURLDecoder.java wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/http/WicketURLEncoder.java Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/PageMap.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/PageMap.java?rev=745030r1=745029r2=745030view=diff == --- wicket/trunk/wicket/src/main/java/org/apache/wicket/PageMap.java (original) +++ wicket/trunk/wicket/src/main/java/org/apache/wicket/PageMap.java Tue Feb 17 12:56:04 2009 @@ -22,9 +22,12 @@ import java.util.List; import org.apache.wicket.protocol.http.WebRequest; +import org.apache.wicket.protocol.http.WicketURLEncoder; import org.apache.wicket.request.target.basic.RedirectRequestTarget; import org.apache.wicket.session.pagemap.IPageMapEntry; import org.apache.wicket.util.lang.Objects; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * FIXME javadoc @@ -34,6 +37,9 @@ */ public abstract class PageMap implements IClusterable, IPageMap { + /** Log. */ + private static final Logger log = LoggerFactory.getLogger(PageMap.class); + /** * Visitor interface for visiting entries in this map * @@ -269,7 +275,10 @@ } else { + // wicket-2061: getURL() returns a properly bdecoded/b URL. But we need is a + // properly bencoded/b URL. interceptContinuationURL = / + cycle.getRequest().getURL(); + interceptContinuationURL = WicketURLEncoder.FULL_PATH_INSTANCE.encode(interceptContinuationURL); } // Page map is dirty Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/http/MockHttpServletRequest.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/http/MockHttpServletRequest.java?rev=745030r1=745029r2=745030view=diff == --- wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/http/MockHttpServletRequest.java (original) +++ wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/http/MockHttpServletRequest.java Tue Feb 17 12:56:04 2009 @@ -1117,7 +1117,7 @@ */ public void setPath(final String path) { - this.path = path; + this.path = WicketURLDecoder.PATH_INSTANCE.decode(path); } /** @@ -1145,11 +1145,11 @@ int index = url.indexOf(?); if (index == -1) { - path = url; + setPath(url); } else { - path = url.substring(0, index); + setPath(url.substring(0, index)); String queryString = url.substring(index + 1); MapString, String[] params = new HashMapString, String[](); @@ -1340,7 +1340,7 @@ // We need to absolutize the redirect URL as we are not as smart as a web-browser // (WICKET-702) url = redirect; - if (url.charAt(0) != '/') + if ((url.length() == 0) || (url.charAt(0) != '/')) { url = getContextPath() + getServletPath() + / + redirect; } Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/http/WicketURLDecoder.java URL:
[jira] Resolved: (WICKET-2061) interceptContinuationURL with umlauts not encoded
[ https://issues.apache.org/jira/browse/WICKET-2061?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Juergen Donnerstag resolved WICKET-2061. Resolution: Fixed Fix Version/s: 1.4-RC3 Assignee: Juergen Donnerstag thanks. Fixed in 1.4 trunk interceptContinuationURL with umlauts not encoded - Key: WICKET-2061 URL: https://issues.apache.org/jira/browse/WICKET-2061 Project: Wicket Issue Type: Bug Components: wicket Affects Versions: 1.3.5, 1.3.6, 1.4-RC1 Reporter: Sven Meier Assignee: Juergen Donnerstag Fix For: 1.4-RC3 Attachments: encodingtest.zip This is my second try to fix Wicket's encoding of redirects to intercepted URLs. Instead of reopening WICKET-2007, I decided to create this new issue and make a clean start. When Wicket redirects to an intercept page, it stores the original URL in PageMap#interceptContinuationURL. // The intercept continuation URL should be saved exactly as the // original request specified. ... interceptContinuationURL = / + cycle.getRequest().getURL(); Note that comment and code are not in sync: Instead of saving *exactly* the original request, a new URL is generated. ServletWebRequest#getURL() includes special characters non-encoded. Thus on a later continuation, the redirect to the original URL fails in case of special characters (umlauts in our case). We're now using a subclass of ServletWebRequest, which utilizes the requestURI: public String getURL() { // servletPath is de-encoded, so use requestURI minus contextPath instead // String url = getServletPath(); String url = httpServletRequest.getRequestURI().substring( httpServletRequest.getContextPath().length()); final String pathInfo = getHttpServletRequest().getPathInfo(); ... } I cannot say if this solution has unwanted side effects though. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[CONF] Apache Wicket: Related Projects (page edited)
Page Edited : WICKET : Related Projects Related Projects has been edited by Arje Cahn (Feb 17, 2009). (View changes) Content: Project Url Description Wicket Stuff http://wicketstuff.org sandbox for various wicket components that are not in the wicket core (ex: hibernate, rss, scriptaculous integration) Databinder http://databinder.net/ project for building web applications quickly with Wicket and Hibernate Qwicket http://qwicket.sf.net another quickstart project for building spring+hibernate+wicket applications. Support for more persistence layers is forthcoming. Webby http://r8fe.net/webby Webby aims at supporting quick creation of data centric web applications, built upon Wicket, using a bean descriptor like approach. blog Wicket Bench http://www.laughingpanda.org/mediawiki/index.php/Wicket_Bench Eclipse plugin by Laughing Panda Wicket Support http://plugins.netbeans.org/PluginPortal/faces/PluginDetailPage.jsp?pluginid=3586 NetBeans plugin Shades http://shadesdb.sourceforge.net Interface based Object/Relational Mapping (ORM) framework. The address book example has an example of integration with Wicket. Blog. OPS4J / Pax Wicket http://wiki.ops4j.org/confluence/display/ops4j/Pax+Wicket OSGi service for supporting the creation of Wicket applications running on the OSGi platform Terracotta http://www.terracotta.org is a JVM level clustering solution. Explicit support for Wicket is planned for their next version. Meanwhile, there is a short WIKI article here. Wicket Web Beans http://wicketwebbeans.sourceforge.net is a project that automatically generates AJAX-based forms at runtime from POJOs. You write the model, WWB does the UI. Wicket Tools http://www.wickettools.org/index.php is intended to be a community site with tutorials, projects that extend the functionality of wicket, and show cases of what others have done with wicket. (f.e. ExtJs Integration) Wicket Bits http://wicketbits.aezix.com Collection of wicket related components including Automagic Brix CMS http://brix-cms.googlecode.com Wicket and JCR based CMS Framework. Allows developers to build dynamic CMS-based web sites using Wicket Components. Hippo CMS 7 http://www.onehippo.org/cms7/ An open source and enterprise-ready CMS based on Wicket, Jackrabbit and Lucene. Powered by Atlassian Confluence (Version: 2.2.9 Build:#527 Sep 07, 2006) - Bug/feature request Unsubscribe or edit your notifications preferences
[CONF] Apache Wicket: Wicket Community meetups - Amsterdam (page edited)
Page Edited : WICKET : Wicket Community meetups - Amsterdam Wicket Community meetups - Amsterdam has been edited by Arje Cahn (Feb 17, 2009). (View changes) Content: Amsterdam Community meeting 2009 We are preparing for the third Dutch Open community meeting for Wicket. The meeting will be held during the ApacheCon EU'09 in Amsterdam. The call for presentations is now open. Register now if you want to attend the meetup. Program March 23 or 24 2009, from 19:00 'til 22:00 at the Apache Conference location. 19:00 - 22:00 t.b.d. Please add yourself if you want to give a presentation. Pieter Claassen - "Wicket and db4o" Martijn Dashorst - "Flashy charts with Wicket and Open Flash Chart" Johan Compagner - anything Jan Kriesten - Practical Scala + Wicket Location Amsterdam, Mövenpick hotel map Costs t.b.d. Sponsoring Please ask for sponsoring opportunities with Martijn Dashorst or Arjé Cahn. Attending Please add/remove yourself from the attendance roster below if you want to attend the Amsterdam Community meetup '09. Name Monday March 23rd Tuesday March 24th Martijn Dashorst X X Johan Compagner X X Frank Prins X X Thies Edeling X X Pieter Claassen X X Frank Klein Koerkamp X Stefan Droog X Erik van Oosten X X Daan van Etten X X Jan Kriesten X X Jeroen Dijkmeijer X X Arjé Cahn X X Powered by Atlassian Confluence (Version: 2.2.9 Build:#527 Sep 07, 2006) - Bug/feature request Unsubscribe or edit your notifications preferences
[jira] Created: (WICKET-2110) Window modal stay behind a applet
Window modal stay behind a applet - Key: WICKET-2110 URL: https://issues.apache.org/jira/browse/WICKET-2110 Project: Wicket Issue Type: Bug Components: wicket-extensions Affects Versions: 1.3.5 Reporter: Kleber Ferreira Rosa I have a big applet on my page, when i open a modal window the modal stay behind the applet -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Created: (WICKET-2111) Ability to generate markup ids in alternate fashion
Ability to generate markup ids in alternate fashion --- Key: WICKET-2111 URL: https://issues.apache.org/jira/browse/WICKET-2111 Project: Wicket Issue Type: Improvement Affects Versions: 1.3.5, 1.3.6, 1.4-RC3 Reporter: Berry van Halderen Fix For: 1.3.6, 1.4-RC3 In the attempts to setup integrated testing one particular piece of wicket code isn't quite extendible enough for our needs, which is the generation of markup ids by the wicket session class. The ability to extend this functionality is not limited to the particular use case, I'd like to propose a small change. The issue is the following; when a Component has no explicit markup-id set, the markup id is generated by the Session which has an internal counter and uses an increment of this to generate a mark-id. The flaw IMHO is that a Component requests the Session to generate an id, without passing it any context. Especially the most logical context, i.e. please session, generate a markup id for _ME_ is missing. Therefore I'd propose that the Session.getMarkupId() is passes the Component object for which the markup id is to be generated. By default, the operation should remain as is and the Session object falls back to the default getMarkupId() without parameters, which is already overrideable. But now you can override the getMarkupId() and generate more useful markup ids. In our case, we are able to generate markup ids which contain part of the hierarchy and in this manner generate stable Ids, namely those which do not change after several requests. This particular usage may just work for our case (one page application, no back-button support, etc), but the fundamental overrideable method to generate more useful IDs is more widely applicable, hence this change request. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Resolved: (WICKET-2105) Stripping comments causes StackOverflowError in XmlPullParser
[ https://issues.apache.org/jira/browse/WICKET-2105?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Juergen Donnerstag resolved WICKET-2105. Resolution: Fixed Fix Version/s: 1.4-RC3 Assignee: Juergen Donnerstag See http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5050507 See http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6337993 Changed the regex Stripping comments causes StackOverflowError in XmlPullParser - Key: WICKET-2105 URL: https://issues.apache.org/jira/browse/WICKET-2105 Project: Wicket Issue Type: Bug Components: wicket Affects Versions: 1.3.5 Reporter: Martijn Dashorst Assignee: Juergen Donnerstag Fix For: 1.4-RC3 Attachments: wicket-2105.tgz For some reason, parsing our HTML resources results in a StackOverflowError in one of our pages. I've put a breakpoint in the stacktrace that resulted in the StackOverflowError, and captured the following start of the trace: Thread [btpool0-0] (Suspended (breakpoint at line 4078 in Pattern$BranchConn)) Pattern$BranchConn.match(Matcher, int, CharSequence) line: 4078 Pattern$Dot(Pattern$CharProperty).match(Matcher, int, CharSequence) line: 3345 Pattern$Branch.match(Matcher, int, CharSequence) line: 4114 Pattern$GroupHead.match(Matcher, int, CharSequence) line: 4168 Pattern$Loop.match(Matcher, int, CharSequence) line: 4295 Pattern$GroupTail.match(Matcher, int, CharSequence) line: 4227 Pattern$BranchConn.match(Matcher, int, CharSequence) line: 4078 Pattern$Dot(Pattern$CharProperty).match(Matcher, int, CharSequence) line: 3345 Pattern$Branch.match(Matcher, int, CharSequence) line: 4114 Pattern$GroupHead.match(Matcher, int, CharSequence) line: 4168 Pattern$Loop.match(Matcher, int, CharSequence) line: 4295 Pattern$GroupTail.match(Matcher, int, CharSequence) line: 4227 Pattern$BranchConn.match(Matcher, int, CharSequence) line: 4078 Pattern$Dot(Pattern$CharProperty).match(Matcher, int, CharSequence) line: 3345 Pattern$Branch.match(Matcher, int, CharSequence) line: 4114 Pattern$GroupHead.match(Matcher, int, CharSequence) line: 4168 Pattern$Loop.match(Matcher, int, CharSequence) line: 4295 Pattern$GroupTail.match(Matcher, int, CharSequence) line: 4227 Pattern$BranchConn.match(Matcher, int, CharSequence) line: 4078 Pattern$Dot(Pattern$CharProperty).match(Matcher, int, CharSequence) line: 3345 Pattern$Branch.match(Matcher, int, CharSequence) line: 4114 Pattern$GroupHead.match(Matcher, int, CharSequence) line: 4168 Pattern$Loop.match(Matcher, int, CharSequence) line: 4295 Pattern$GroupTail.match(Matcher, int, CharSequence) line: 4227 Pattern$BranchConn.match(Matcher, int, CharSequence) line: 4078 Pattern$Dot(Pattern$CharProperty).match(Matcher, int, CharSequence) line: 3345 Pattern$Branch.match(Matcher, int, CharSequence) line: 4114 Pattern$GroupHead.match(Matcher, int, CharSequence) line: 4168 Pattern$Loop.match(Matcher, int, CharSequence) line: 4295 Pattern$GroupTail.match(Matcher, int, CharSequence) line: 4227 Pattern$BranchConn.match(Matcher, int, CharSequence) line: 4078 Pattern$Dot(Pattern$CharProperty).match(Matcher, int, CharSequence) line: 3345 Pattern$Branch.match(Matcher, int, CharSequence) line: 4114 Pattern$GroupHead.match(Matcher, int, CharSequence) line: 4168 Pattern$Loop.match(Matcher, int, CharSequence) line: 4295 Pattern$GroupTail.match(Matcher, int, CharSequence) line: 4227 Pattern$BranchConn.match(Matcher, int, CharSequence) line: 4078 Pattern$Dot(Pattern$CharProperty).match(Matcher, int, CharSequence) line: 3345 Pattern$Branch.match(Matcher, int, CharSequence) line: 4114 Pattern$GroupHead.match(Matcher, int, CharSequence) line: 4168 Pattern$Loop.match(Matcher, int, CharSequence) line: 4295 Pattern$GroupTail.match(Matcher, int, CharSequence) line: 4227 Pattern$BranchConn.match(Matcher, int, CharSequence) line: 4078 Pattern$Dot(Pattern$CharProperty).match(Matcher, int, CharSequence) line: 3345 Pattern$Branch.match(Matcher, int, CharSequence) line: 4114 Pattern$GroupHead.match(Matcher, int, CharSequence) line: 4168 Pattern$Loop.match(Matcher, int, CharSequence) line: 4295 Pattern$GroupTail.match(Matcher, int, CharSequence) line: 4227 Pattern$BranchConn.match(Matcher, int, CharSequence) line: 4078 Pattern$Dot(Pattern$CharProperty).match(Matcher,
svn commit: r745247 - in /wicket/trunk/wicket/src: main/java/org/apache/wicket/markup/ test/java/org/apache/wicket/markup/parser/
Author: jdonnerstag Date: Tue Feb 17 20:38:15 2009 New Revision: 745247 URL: http://svn.apache.org/viewvc?rev=745247view=rev Log: fixed wicket-2105: Stripping comments causes StackOverflowError in XmlPullParser Added: wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/parser/HomePage.html wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/parser/HomePage.java wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/parser/SignInPanel.html wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/parser/SignInPanel.java wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/parser/TestHomePage.java Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/MarkupParser.java Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/MarkupParser.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/MarkupParser.java?rev=745247r1=745246r2=745247view=diff == --- wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/MarkupParser.java (original) +++ wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/MarkupParser.java Tue Feb 17 20:38:15 2009 @@ -68,7 +68,7 @@ private static final Logger log = LoggerFactory.getLogger(MarkupParser.class); /** Conditional comment section, which is NOT treated as a comment section */ - private static final Pattern CONDITIONAL_COMMENT = Pattern.compile(\\[if .+\\](.|\n|\r)*!\\[endif\\]); + private static final Pattern CONDITIONAL_COMMENT = Pattern.compile(\\[if .+\\]((?s).*)!\\[endif\\]); /** The XML parser to use */ private final IXmlPullParser xmlParser; @@ -223,7 +223,7 @@ *beforeFilter not found than append to the end */ public final void appendMarkupFilter(final IMarkupFilter filter, - final Class ? extends IMarkupFilter beforeFilter) + final Class? extends IMarkupFilter beforeFilter) { if ((beforeFilter == null) || (markupFilterChain == null)) { @@ -478,15 +478,17 @@ } /** -* Remove all comment sections (lt;!-- .. --gt;) from the raw markup. For reasons I don't -* understand, the following regex code!--(.|\n|\r)*?--code -* causes a stack overflow in some circumstances (jdk 1.5) -* +* Remove all comment sections (lt;!-- .. --gt;) from the raw markup. +* * @param rawMarkup * @return raw markup */ private String removeComment(String rawMarkup) { + // For reasons I don't understand, the following regex code!--(.|\n|\r)*?--code + // causes a stack overflow in some circumstances (jdk 1.5) + // See http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5050507 + // See http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6337993 int pos1 = rawMarkup.indexOf(!--); while (pos1 != -1) { @@ -496,6 +498,11 @@ if (pos2 != -1) { final String comment = rawMarkup.substring(pos1 + 4, pos2); + + // See wicket-2105 for an example where this rather simple regex throws an exception + // CONDITIONAL_COMMENT = Pattern.compile(\\[if .+\\](.|\n|\r)*!\\[endif\\]); + // See http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5050507 + // See http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6337993 if (CONDITIONAL_COMMENT.matcher(comment).matches() == false) { buf.append(rawMarkup.substring(0, pos1)); Added: wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/parser/HomePage.html URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/parser/HomePage.html?rev=745247view=auto == --- wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/parser/HomePage.html (added) +++ wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/parser/HomePage.html Tue Feb 17 20:38:15 2009 @@ -0,0 +1,33 @@ +!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd; +html xmlns:wicket +head + meta http-equiv=content-type content=text/html; charset=UTF-8 / + link rel=shortcut icon href=assets/img/icons/favicon.ico + title wicket:id=pageTitleEduArte/title + + link href=assets/css/base.css rel=stylesheet type=text/css/ + !--[if IE] + link href=assets/css/ie_only.css rel=stylesheet type=text/css/ + link
[jira] Created: (WICKET-2112) Component Reference Source Link broken
Component Reference Source Link broken -- Key: WICKET-2112 URL: https://issues.apache.org/jira/browse/WICKET-2112 Project: Wicket Issue Type: Bug Components: site Reporter: Andreas Sahlbach Example: Go to http://wicketstuff.org/wicket13/compref/?wicket:bookmarkablePage=:org.apache.wicket.examples.compref.BorderPage and click the Source Link. You always get Page expired. Several other components don't work, too. Some of them work. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.