svn commit: r497350 - /incubator/wicket/branches/wicket-1.x/wicket-extensions/src/main/java/wicket/extensions/ajax/markup/html/modal/res/modal.js

2007-01-18 Thread knopp
Author: knopp
Date: Thu Jan 18 00:39:17 2007
New Revision: 497350

URL: http://svn.apache.org/viewvc?view=rev&rev=497350
Log:
Put the header back

Modified:

incubator/wicket/branches/wicket-1.x/wicket-extensions/src/main/java/wicket/extensions/ajax/markup/html/modal/res/modal.js

Modified: 
incubator/wicket/branches/wicket-1.x/wicket-extensions/src/main/java/wicket/extensions/ajax/markup/html/modal/res/modal.js
URL: 
http://svn.apache.org/viewvc/incubator/wicket/branches/wicket-1.x/wicket-extensions/src/main/java/wicket/extensions/ajax/markup/html/modal/res/modal.js?view=diff&rev=497350&r1=497349&r2=497350
==
--- 
incubator/wicket/branches/wicket-1.x/wicket-extensions/src/main/java/wicket/extensions/ajax/markup/html/modal/res/modal.js
 (original)
+++ 
incubator/wicket/branches/wicket-1.x/wicket-extensions/src/main/java/wicket/extensions/ajax/markup/html/modal/res/modal.js
 Thu Jan 18 00:39:17 2007
@@ -1,3 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
 /**
  * Javascript modal window
  * Licensed under the Apache License, Version 2.0




svn commit: r497351 - /incubator/wicket/trunk/wicket-extensions/src/main/java/wicket/extensions/ajax/markup/html/modal/res/modal.js

2007-01-18 Thread knopp
Author: knopp
Date: Thu Jan 18 00:39:43 2007
New Revision: 497351

URL: http://svn.apache.org/viewvc?view=rev&rev=497351
Log:
Put the header back

Modified:

incubator/wicket/trunk/wicket-extensions/src/main/java/wicket/extensions/ajax/markup/html/modal/res/modal.js

Modified: 
incubator/wicket/trunk/wicket-extensions/src/main/java/wicket/extensions/ajax/markup/html/modal/res/modal.js
URL: 
http://svn.apache.org/viewvc/incubator/wicket/trunk/wicket-extensions/src/main/java/wicket/extensions/ajax/markup/html/modal/res/modal.js?view=diff&rev=497351&r1=497350&r2=497351
==
--- 
incubator/wicket/trunk/wicket-extensions/src/main/java/wicket/extensions/ajax/markup/html/modal/res/modal.js
 (original)
+++ 
incubator/wicket/trunk/wicket-extensions/src/main/java/wicket/extensions/ajax/markup/html/modal/res/modal.js
 Thu Jan 18 00:39:43 2007
@@ -1,3 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 /**
  * Javascript modal window
  * Licensed under the Apache License, Version 2.0




svn commit: r497381 - in /incubator/wicket/branches/wicket-1.x/wicket-examples: pom.xml src/test/java/wicket/examples/hangman/HangManTest.java src/test/java/wicket/examples/hellobrowser/HelloBrowserTe

2007-01-18 Thread jcompagner
Author: jcompagner
Date: Thu Jan 18 02:00:57 2007
New Revision: 497381

URL: http://svn.apache.org/viewvc?view=rev&rev=497381
Log:
fixed test

Modified:
incubator/wicket/branches/wicket-1.x/wicket-examples/pom.xml

incubator/wicket/branches/wicket-1.x/wicket-examples/src/test/java/wicket/examples/hangman/HangManTest.java

incubator/wicket/branches/wicket-1.x/wicket-examples/src/test/java/wicket/examples/hellobrowser/HelloBrowserTest.java

Modified: incubator/wicket/branches/wicket-1.x/wicket-examples/pom.xml
URL: 
http://svn.apache.org/viewvc/incubator/wicket/branches/wicket-1.x/wicket-examples/pom.xml?view=diff&rev=497381&r1=497380&r2=497381
==
--- incubator/wicket/branches/wicket-1.x/wicket-examples/pom.xml (original)
+++ incubator/wicket/branches/wicket-1.x/wicket-examples/pom.xml Thu Jan 18 
02:00:57 2007
@@ -57,6 +57,13 @@
test
   

+   commons-lang
+   commons-lang
+   2.1
+   jar
+   compile
+  
+   
httpunit
httpunit
1.6.1

Modified: 
incubator/wicket/branches/wicket-1.x/wicket-examples/src/test/java/wicket/examples/hangman/HangManTest.java
URL: 
http://svn.apache.org/viewvc/incubator/wicket/branches/wicket-1.x/wicket-examples/src/test/java/wicket/examples/hangman/HangManTest.java?view=diff&rev=497381&r1=497380&r2=497381
==
--- 
incubator/wicket/branches/wicket-1.x/wicket-examples/src/test/java/wicket/examples/hangman/HangManTest.java
 (original)
+++ 
incubator/wicket/branches/wicket-1.x/wicket-examples/src/test/java/wicket/examples/hangman/HangManTest.java
 Thu Jan 18 02:00:57 2007
@@ -204,7 +204,9 @@
assertElementPresent("guessesRemaining");
assertTextInElement("guessesRemaining", "4");
 
-   assertLinkNotPresent("letter_f");
+   // todo jwebunit doesn't really test if it is a link!
+   // it just finds a html element by that id, and we have one
+// assertLinkNotPresent("letter_f");
clickLink("letter_x");
assertTextInElement("guessesRemaining", "3");
 

Modified: 
incubator/wicket/branches/wicket-1.x/wicket-examples/src/test/java/wicket/examples/hellobrowser/HelloBrowserTest.java
URL: 
http://svn.apache.org/viewvc/incubator/wicket/branches/wicket-1.x/wicket-examples/src/test/java/wicket/examples/hellobrowser/HelloBrowserTest.java?view=diff&rev=497381&r1=497380&r2=497381
==
--- 
incubator/wicket/branches/wicket-1.x/wicket-examples/src/test/java/wicket/examples/hellobrowser/HelloBrowserTest.java
 (original)
+++ 
incubator/wicket/branches/wicket-1.x/wicket-examples/src/test/java/wicket/examples/hellobrowser/HelloBrowserTest.java
 Thu Jan 18 02:00:57 2007
@@ -53,7 +53,6 @@
public void testHelloWorld() throws Exception
{
beginAt("/hellobrowser");
-   clickLinkWithText("this link");
assertTitleEquals("Wicket Examples - hellobrowser");
assertTextPresent("ClientProperties:");
}




[jira] Created: (WICKET-217) ContainerFeedbackMessageFilter filters out messages for container

2007-01-18 Thread Jan Bare? (JIRA)
ContainerFeedbackMessageFilter filters out messages for container
-

 Key: WICKET-217
 URL: https://issues.apache.org/jira/browse/WICKET-217
 Project: Wicket
  Issue Type: Bug
  Components: wicket
Affects Versions: 1.2.4
Reporter: Jan Bare?
Priority: Trivial


ContainerFeedbackMessageFilter filters out messages for the container (for
instance Form).

public boolean accept(FeedbackMessage message) {
if (message.getReporter() == null) {
  return false;
}
else if(container == message.getReporter())  { //<=== missing?
  return true;
}
else {
  return container.contains(message.getReporter(), true);
}
}


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] Commented: (WICKET-149) mounted URLs fail if filterPath is blank

2007-01-18 Thread Alastair Maw (JIRA)

[ 
https://issues.apache.org/jira/browse/WICKET-149?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12465745
 ] 

Alastair Maw commented on WICKET-149:
-

The patch doesn't cope with mounted resources and things. Am looking into 
fixing this differently, to cope with the following scenarios (any combination 
of them):

Mounted and unmounted pages.
Mounted and unmounted resources.
filter mapping="/*" or filter mapping="/app/*" with filterPath param of  "" and 
"app" respectively.
Context path of either "/" or "/foo".

Hopefully fixing and testing all of these will make things work for everyone.

An additional wrinkle is making this also work behind a proxy, with an 
overridden Application.setContextPath(), which also appears to be failing at 
the moment with WicketFilter.

> mounted URLs fail if filterPath is blank
> 
>
> Key: WICKET-149
> URL: https://issues.apache.org/jira/browse/WICKET-149
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket
>Affects Versions: 1.3
> Environment: jetty 5/6
>Reporter: Nathan Hamblen
> Assigned To: Alastair Maw
> Fix For: 1.3
>
> Attachments: slashCheck.diff
>
>
> The path in RequestParameters needs to begin with a "/" or it will not be 
> found when checking against mounted paths. The slash is prefixed in 
> WicketFilter line 545 when checking isWicketRequest(), but it is not prefixed 
> later when looking for the request target. Proposed fix in patch (to be 
> attached) performs this operation in ServletWebRequest.getPath(); I'm not 
> sure if that is the ideal spot, but I've confirmed that it fixes the problem.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] Created: (WICKET-218) Removing comments from markup can fail

2007-01-18 Thread Erik van Oosten (JIRA)
Removing comments from markup can fail
--

 Key: WICKET-218
 URL: https://issues.apache.org/jira/browse/WICKET-218
 Project: Wicket
  Issue Type: Bug
  Components: wicket
Affects Versions: 1.2.4
Reporter: Erik van Oosten
 Attachments: MarkupParserPatch.txt

Markup with comments in it sometimes causes Wicket to crash with a nasty 
StringIndexOutOfBoundsException.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] Updated: (WICKET-218) Removing comments from markup can fail

2007-01-18 Thread Erik van Oosten (JIRA)

 [ 
https://issues.apache.org/jira/browse/WICKET-218?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Erik van Oosten updated WICKET-218:
---

Attachment: MarkupParserPatch.txt

> Removing comments from markup can fail
> --
>
> Key: WICKET-218
> URL: https://issues.apache.org/jira/browse/WICKET-218
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket
>Affects Versions: 1.2.4
>Reporter: Erik van Oosten
> Attachments: MarkupParserPatch.txt
>
>
> Markup with comments in it sometimes causes Wicket to crash with a nasty 
> StringIndexOutOfBoundsException.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] Commented: (WICKET-218) Removing comments from markup can fail

2007-01-18 Thread Erik van Oosten (JIRA)

[ 
https://issues.apache.org/jira/browse/WICKET-218?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12465747
 ] 

Erik van Oosten commented on WICKET-218:


The problem is that the code tries to read beyond the comment even when the 
comment is exactly at the end of the rawMarkup.

> Removing comments from markup can fail
> --
>
> Key: WICKET-218
> URL: https://issues.apache.org/jira/browse/WICKET-218
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket
>Affects Versions: 1.2.4
>Reporter: Erik van Oosten
> Attachments: MarkupParserPatch.txt
>
>
> Markup with comments in it sometimes causes Wicket to crash with a nasty 
> StringIndexOutOfBoundsException.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] Commented: (WICKET-149) mounted URLs fail if filterPath is blank

2007-01-18 Thread Nathan Hamblen (JIRA)

[ 
https://issues.apache.org/jira/browse/WICKET-149?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12465750
 ] 

Nathan Hamblen commented on WICKET-149:
---

The patch doesn't cope with as many things as it used to. There were some code 
changes last week that broke it. Rather than debug it over again I've stopped 
relying on blank filter paths, but if you get it fixed that would be great.

> mounted URLs fail if filterPath is blank
> 
>
> Key: WICKET-149
> URL: https://issues.apache.org/jira/browse/WICKET-149
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket
>Affects Versions: 1.3
> Environment: jetty 5/6
>Reporter: Nathan Hamblen
> Assigned To: Alastair Maw
> Fix For: 1.3
>
> Attachments: slashCheck.diff
>
>
> The path in RequestParameters needs to begin with a "/" or it will not be 
> found when checking against mounted paths. The slash is prefixed in 
> WicketFilter line 545 when checking isWicketRequest(), but it is not prefixed 
> later when looking for the request target. Proposed fix in patch (to be 
> attached) performs this operation in ServletWebRequest.getPath(); I'm not 
> sure if that is the ideal spot, but I've confirmed that it fixes the problem.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira




svn commit: r497443 - /incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/protocol/http/servlet/ServletWebRequest.java

2007-01-18 Thread almaw
Author: almaw
Date: Thu Jan 18 06:27:11 2007
New Revision: 497443

URL: http://svn.apache.org/viewvc?view=rev&rev=497443
Log:
WICKET-149 fix for mounted URLs fail if filterPath is blank

Modified:

incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/protocol/http/servlet/ServletWebRequest.java

Modified: 
incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/protocol/http/servlet/ServletWebRequest.java
URL: 
http://svn.apache.org/viewvc/incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/protocol/http/servlet/ServletWebRequest.java?view=diff&rev=497443&r1=497442&r2=497443
==
--- 
incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/protocol/http/servlet/ServletWebRequest.java
 (original)
+++ 
incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/protocol/http/servlet/ServletWebRequest.java
 Thu Jan 18 06:27:11 2007
@@ -30,7 +30,6 @@
 import wicket.IRedirectListener;
 import wicket.RequestListenerInterface;
 import wicket.WicketRuntimeException;
-import wicket.markup.html.link.ILinkListener;
 import wicket.protocol.http.WebApplication;
 import wicket.protocol.http.WebRequest;
 import wicket.util.lang.Bytes;
@@ -147,7 +146,8 @@
String rootPath = 
((WebApplication)Application.get()).getRootPath();
if (url.startsWith(rootPath))
{
-   return rootPath.equals("/") ? url : 
url.substring(rootPath.length());
+   // We return everything after rootPath, making sure we 
start with a slash.
+   return url.substring(rootPath.endsWith("/") ? 
rootPath.length() - 1 : rootPath.length());
}
return null;
}




svn commit: r497444 - /incubator/wicket/trunk/wicket/src/main/java/wicket/protocol/http/servlet/ServletWebRequest.java

2007-01-18 Thread almaw
Author: almaw
Date: Thu Jan 18 06:27:23 2007
New Revision: 497444

URL: http://svn.apache.org/viewvc?view=rev&rev=497444
Log:
WICKET-149 fix for mounted URLs fail if filterPath is blank

Modified:

incubator/wicket/trunk/wicket/src/main/java/wicket/protocol/http/servlet/ServletWebRequest.java

Modified: 
incubator/wicket/trunk/wicket/src/main/java/wicket/protocol/http/servlet/ServletWebRequest.java
URL: 
http://svn.apache.org/viewvc/incubator/wicket/trunk/wicket/src/main/java/wicket/protocol/http/servlet/ServletWebRequest.java?view=diff&rev=497444&r1=497443&r2=497444
==
--- 
incubator/wicket/trunk/wicket/src/main/java/wicket/protocol/http/servlet/ServletWebRequest.java
 (original)
+++ 
incubator/wicket/trunk/wicket/src/main/java/wicket/protocol/http/servlet/ServletWebRequest.java
 Thu Jan 18 06:27:23 2007
@@ -150,7 +150,8 @@
String rootPath = 
((WebApplication)Application.get()).getRootPath();
if (url.startsWith(rootPath))
{
-   return url.substring(rootPath.length());
+   // We return everything after rootPath, making sure we 
start with a slash.
+   return url.substring(rootPath.endsWith("/") ? 
rootPath.length() - 1 : rootPath.length());
}
return null;
}




[jira] Resolved: (WICKET-149) mounted URLs fail if filterPath is blank

2007-01-18 Thread Alastair Maw (JIRA)

 [ 
https://issues.apache.org/jira/browse/WICKET-149?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Alastair Maw resolved WICKET-149.
-

   Resolution: Fixed
Fix Version/s: 2.0

1.x fix in http://svn.apache.org/viewvc?view=rev&rev=497443
2.x fix in http://svn.apache.org/viewvc?view=rev&rev=497444

Hopefully now sorted. I'm sure you'll re-open again it if you have issues. :-)
We really need some unit tests for this - I'll get on that next.

> mounted URLs fail if filterPath is blank
> 
>
> Key: WICKET-149
> URL: https://issues.apache.org/jira/browse/WICKET-149
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket
>Affects Versions: 1.3
> Environment: jetty 5/6
>Reporter: Nathan Hamblen
> Assigned To: Alastair Maw
> Fix For: 1.3, 2.0
>
> Attachments: slashCheck.diff
>
>
> The path in RequestParameters needs to begin with a "/" or it will not be 
> found when checking against mounted paths. The slash is prefixed in 
> WicketFilter line 545 when checking isWicketRequest(), but it is not prefixed 
> later when looking for the request target. Proposed fix in patch (to be 
> attached) performs this operation in ServletWebRequest.getPath(); I'm not 
> sure if that is the ideal spot, but I've confirmed that it fixes the problem.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira




svn commit: r497446 - /incubator/wicket/trunk/wicket/src/main/java/wicket/markup/html/link/InternalFrame.java

2007-01-18 Thread almaw
Author: almaw
Date: Thu Jan 18 06:37:49 2007
New Revision: 497446

URL: http://svn.apache.org/viewvc?view=rev&rev=497446
Log:
Remove zero-byte file.

Removed:

incubator/wicket/trunk/wicket/src/main/java/wicket/markup/html/link/InternalFrame.java



svn commit: r497447 - /incubator/wicket/trunk/wicket/src/main/java/wicket/markup/repeater/util/ModelIteratorAdapter.java

2007-01-18 Thread almaw
Author: almaw
Date: Thu Jan 18 06:39:05 2007
New Revision: 497447

URL: http://svn.apache.org/viewvc?view=rev&rev=497447
Log:
Fix license header for unit test.

Modified:

incubator/wicket/trunk/wicket/src/main/java/wicket/markup/repeater/util/ModelIteratorAdapter.java

Modified: 
incubator/wicket/trunk/wicket/src/main/java/wicket/markup/repeater/util/ModelIteratorAdapter.java
URL: 
http://svn.apache.org/viewvc/incubator/wicket/trunk/wicket/src/main/java/wicket/markup/repeater/util/ModelIteratorAdapter.java?view=diff&rev=497447&r1=497446&r2=497447
==
--- 
incubator/wicket/trunk/wicket/src/main/java/wicket/markup/repeater/util/ModelIteratorAdapter.java
 (original)
+++ 
incubator/wicket/trunk/wicket/src/main/java/wicket/markup/repeater/util/ModelIteratorAdapter.java
 Thu Jan 18 06:39:05 2007
@@ -1,18 +1,18 @@
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- * http://www.apache.org/licenses/LICENSE-2.0
- * 
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
  * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations 
under
- * the License.
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 package wicket.markup.repeater.util;
 




svn commit: r497448 - /incubator/wicket/trunk/wicket/src/test/java/wicket/ajax/AjaxTimerBehaviorTest.java

2007-01-18 Thread almaw
Author: almaw
Date: Thu Jan 18 06:39:59 2007
New Revision: 497448

URL: http://svn.apache.org/viewvc?view=rev&rev=497448
Log:
Fix license header for unit test.

Modified:

incubator/wicket/trunk/wicket/src/test/java/wicket/ajax/AjaxTimerBehaviorTest.java

Modified: 
incubator/wicket/trunk/wicket/src/test/java/wicket/ajax/AjaxTimerBehaviorTest.java
URL: 
http://svn.apache.org/viewvc/incubator/wicket/trunk/wicket/src/test/java/wicket/ajax/AjaxTimerBehaviorTest.java?view=diff&rev=497448&r1=497447&r2=497448
==
--- 
incubator/wicket/trunk/wicket/src/test/java/wicket/ajax/AjaxTimerBehaviorTest.java
 (original)
+++ 
incubator/wicket/trunk/wicket/src/test/java/wicket/ajax/AjaxTimerBehaviorTest.java
 Thu Jan 18 06:39:59 2007
@@ -1,20 +1,18 @@
 /*
- * $Id: org.eclipse.jdt.ui.prefs 5004 2006-03-17 20:47:08 -0800 (Fri, 17 Mar 
2006) eelco12 $
- * $Revision: 5004 $
- * $Date: 2006-03-17 20:47:08 -0800 (Fri, 17 Mar 2006) $
- * 
- * 
==
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy 
of
- * the License at
- * 
- * http://www.apache.org/licenses/LICENSE-2.0
- * 
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
  * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations 
under
- * the License.
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 package wicket.ajax;
 




[jira] Created: (WICKET-219) WicketFilter doesn't work with mod_proxy and setContextPath()

2007-01-18 Thread Alastair Maw (JIRA)
WicketFilter doesn't work with mod_proxy and setContextPath()
-

 Key: WICKET-219
 URL: https://issues.apache.org/jira/browse/WICKET-219
 Project: Wicket
  Issue Type: Bug
  Components: wicket
Affects Versions: 1.3, 2.0
Reporter: Alastair Maw
 Assigned To: Alastair Maw
Priority: Minor


If one sets up mod_proxy as here: 
http://cwiki.apache.org/WICKET/wicket-behind-a-front-end-proxy.html (see "why 
this doesn't always work") isWicketRequest() in WicketFilter always returns 
false.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] Created: (WICKET-220) Form's handleMultiPart() method needs to be overridable to allow custom processing of multi-part streams

2007-01-18 Thread Bob Brokman (JIRA)
Form's handleMultiPart() method needs to be overridable to allow custom 
processing of multi-part streams


 Key: WICKET-220
 URL: https://issues.apache.org/jira/browse/WICKET-220
 Project: Wicket
  Issue Type: New Feature
  Components: wicket
Affects Versions: 1.2.4, 1.2.5, 1.3, 2.0
Reporter: Bob Brokman
 Fix For: 1.3, 2.0


Currently handleMultiPart() method is declared "private final" in 
wicket.markup.html.form.Form class, and implementation of the uploaded parts of 
the multi-part stream on the server side.is tied to the File-type in the code, 
especially the code related to the FileUploadField class. Making 
handleMultiPart() "protected" instead of "private final" will allow custom "per 
form" multi-part HTTP POST stream processing. In particular, the processing 
will become possible, which is not tied to a particular implementation of the 
uploaded parts of the multi-part stream on the server side. It shall be noted 
in the Javadoc that overriding handleMultiPart() method will likely break 
FileUploadField logic. Also, it may be worth extracting the non-File-specific 
portion of the FileUploadField class logic into the base class (e.g., 
StreamUploadField), and advise using that base class instead of FileUploadField 
for non-File-specific uploads.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] Updated: (WICKET-220) Form's handleMultiPart() method needs to be overridable to allow custom processing of multi-part streams

2007-01-18 Thread Bob Brokman (JIRA)

 [ 
https://issues.apache.org/jira/browse/WICKET-220?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Bob Brokman updated WICKET-220:
---

Attachment: StreamUploadField.java

> Form's handleMultiPart() method needs to be overridable to allow custom 
> processing of multi-part streams
> 
>
> Key: WICKET-220
> URL: https://issues.apache.org/jira/browse/WICKET-220
> Project: Wicket
>  Issue Type: New Feature
>  Components: wicket
>Affects Versions: 1.2.4, 1.2.5, 1.3, 2.0
>Reporter: Bob Brokman
> Fix For: 1.3, 2.0
>
> Attachments: FileUploadField.java, StreamUploadField.java
>
>
> Currently handleMultiPart() method is declared "private final" in 
> wicket.markup.html.form.Form class, and implementation of the uploaded parts 
> of the multi-part stream on the server side.is tied to the File-type in the 
> code, especially the code related to the FileUploadField class. Making 
> handleMultiPart() "protected" instead of "private final" will allow custom 
> "per form" multi-part HTTP POST stream processing. In particular, the 
> processing will become possible, which is not tied to a particular 
> implementation of the uploaded parts of the multi-part stream on the server 
> side. It shall be noted in the Javadoc that overriding handleMultiPart() 
> method will likely break FileUploadField logic. Also, it may be worth 
> extracting the non-File-specific portion of the FileUploadField class logic 
> into the base class (e.g., StreamUploadField), and advise using that base 
> class instead of FileUploadField for non-File-specific uploads.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] Updated: (WICKET-220) Form's handleMultiPart() method needs to be overridable to allow custom processing of multi-part streams

2007-01-18 Thread Bob Brokman (JIRA)

 [ 
https://issues.apache.org/jira/browse/WICKET-220?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Bob Brokman updated WICKET-220:
---

Attachment: FileUploadField.java

> Form's handleMultiPart() method needs to be overridable to allow custom 
> processing of multi-part streams
> 
>
> Key: WICKET-220
> URL: https://issues.apache.org/jira/browse/WICKET-220
> Project: Wicket
>  Issue Type: New Feature
>  Components: wicket
>Affects Versions: 1.2.4, 1.2.5, 1.3, 2.0
>Reporter: Bob Brokman
> Fix For: 1.3, 2.0
>
> Attachments: FileUploadField.java, StreamUploadField.java
>
>
> Currently handleMultiPart() method is declared "private final" in 
> wicket.markup.html.form.Form class, and implementation of the uploaded parts 
> of the multi-part stream on the server side.is tied to the File-type in the 
> code, especially the code related to the FileUploadField class. Making 
> handleMultiPart() "protected" instead of "private final" will allow custom 
> "per form" multi-part HTTP POST stream processing. In particular, the 
> processing will become possible, which is not tied to a particular 
> implementation of the uploaded parts of the multi-part stream on the server 
> side. It shall be noted in the Javadoc that overriding handleMultiPart() 
> method will likely break FileUploadField logic. Also, it may be worth 
> extracting the non-File-specific portion of the FileUploadField class logic 
> into the base class (e.g., StreamUploadField), and advise using that base 
> class instead of FileUploadField for non-File-specific uploads.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] Created: (WICKET-221) http://foo/app/ doesn't work, but http://foo/app does, with WicketFilter.

2007-01-18 Thread Alastair Maw (JIRA)
http://foo/app/ doesn't work, but http://foo/app does, with WicketFilter.
-

 Key: WICKET-221
 URL: https://issues.apache.org/jira/browse/WICKET-221
 Project: Wicket
  Issue Type: Bug
  Components: wicket
Affects Versions: 1.3
Reporter: Alastair Maw
 Assigned To: Alastair Maw


As summary.

ChuckDeal's take on it is this:

When tracing through the WicketFilter code, it looks like isWicketRequest() 
can't deal with it so it delegates to 
webApplication.getRequestCycleProcessor().getRequestCodingStrategy().urlCodingStrategyForPath(path)
 which returns null because it specifically excludes the '/'.  You can't mount 
'/' because mount(...) will throw IllegalArgumentException("The mount
path '/' is reserved for the application home page").  Is this a loophole, or 
have I missed something.  

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] Assigned: (WICKET-220) Form's handleMultiPart() method needs to be overridable to allow custom processing of multi-part streams

2007-01-18 Thread Igor Vaynberg (JIRA)

 [ 
https://issues.apache.org/jira/browse/WICKET-220?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Igor Vaynberg reassigned WICKET-220:


Assignee: Eelco Hillenius

> Form's handleMultiPart() method needs to be overridable to allow custom 
> processing of multi-part streams
> 
>
> Key: WICKET-220
> URL: https://issues.apache.org/jira/browse/WICKET-220
> Project: Wicket
>  Issue Type: New Feature
>  Components: wicket
>Affects Versions: 1.2.4, 1.2.5, 1.3, 2.0
>Reporter: Bob Brokman
> Assigned To: Eelco Hillenius
> Fix For: 1.3, 2.0
>
> Attachments: FileUploadField.java, StreamUploadField.java
>
>
> Currently handleMultiPart() method is declared "private final" in 
> wicket.markup.html.form.Form class, and implementation of the uploaded parts 
> of the multi-part stream on the server side.is tied to the File-type in the 
> code, especially the code related to the FileUploadField class. Making 
> handleMultiPart() "protected" instead of "private final" will allow custom 
> "per form" multi-part HTTP POST stream processing. In particular, the 
> processing will become possible, which is not tied to a particular 
> implementation of the uploaded parts of the multi-part stream on the server 
> side. It shall be noted in the Javadoc that overriding handleMultiPart() 
> method will likely break FileUploadField logic. Also, it may be worth 
> extracting the non-File-specific portion of the FileUploadField class logic 
> into the base class (e.g., StreamUploadField), and advise using that base 
> class instead of FileUploadField for non-File-specific uploads.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] Commented: (WICKET-221) http://foo/app/ doesn't work, but http://foo/app does, with WicketFilter.

2007-01-18 Thread Alastair Maw (JIRA)

[ 
https://issues.apache.org/jira/browse/WICKET-221?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12465836
 ] 

Alastair Maw commented on WICKET-221:
-

A workaround for this is to mount the home page at something other than "/". 
That way, requests for "/app/" will get redirected to "/app/Home", for example.

> http://foo/app/ doesn't work, but http://foo/app does, with WicketFilter.
> -
>
> Key: WICKET-221
> URL: https://issues.apache.org/jira/browse/WICKET-221
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket
>Affects Versions: 1.3
>Reporter: Alastair Maw
> Assigned To: Alastair Maw
>
> As summary.
> ChuckDeal's take on it is this:
> When tracing through the WicketFilter code, it looks like isWicketRequest() 
> can't deal with it so it delegates to 
> webApplication.getRequestCycleProcessor().getRequestCodingStrategy().urlCodingStrategyForPath(path)
>  which returns null because it specifically excludes the '/'.  You can't 
> mount '/' because mount(...) will throw IllegalArgumentException("The mount
> path '/' is reserved for the application home page").  Is this a loophole, or 
> have I missed something.  

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira




svn commit: r497534 - /incubator/wicket/trunk/wicket/src/main/java/wicket/markup/MarkupCache.java

2007-01-18 Thread ehillenius
Author: ehillenius
Date: Thu Jan 18 10:51:31 2007
New Revision: 497534

URL: http://svn.apache.org/viewvc?view=rev&rev=497534
Log:
sorted members

Modified:
incubator/wicket/trunk/wicket/src/main/java/wicket/markup/MarkupCache.java

Modified: 
incubator/wicket/trunk/wicket/src/main/java/wicket/markup/MarkupCache.java
URL: 
http://svn.apache.org/viewvc/incubator/wicket/trunk/wicket/src/main/java/wicket/markup/MarkupCache.java?view=diff&rev=497534&r1=497533&r2=497534
==
--- incubator/wicket/trunk/wicket/src/main/java/wicket/markup/MarkupCache.java 
(original)
+++ incubator/wicket/trunk/wicket/src/main/java/wicket/markup/MarkupCache.java 
Thu Jan 18 10:51:31 2007
@@ -69,23 +69,6 @@
}
 
/**
-* Clear markup cache and force reload of all markup data
-*/
-   public void clear()
-   {
-   this.afterLoadListeners.clear();
-   this.markupCache.clear();
-   }
-
-   /**
-* @return the number of elements currently in the cache.
-*/
-   public int size()
-   {
-   return markupCache.size();
-   }
-
-   /**
 * Add a listener which is triggered after the resource has been 
(re-)loaded
 * 
 * @param resourceStream
@@ -100,24 +83,10 @@
/**
 * Clear markup cache and force reload of all markup data
 */
-   public void removeAllListeners()
+   public void clear()
{
this.afterLoadListeners.clear();
-   }
-
-   /**
-* Remove the markup from the cache and trigger all associated listeners
-* 
-* @param markupResourceStream
-*The resource stream
-*/
-   public final void removeMarkup(final MarkupResourceStream 
markupResourceStream)
-   {
-   markupCache.remove(markupResourceStream.getCacheKey());
-
-   // trigger all listeners registered on the markup that is 
removed
-   afterLoadListeners.notifyListeners(markupResourceStream);
-   afterLoadListeners.remove(markupResourceStream);
+   this.markupCache.clear();
}
 
/**
@@ -160,18 +129,6 @@
}
 
/**
-* Check if container has associated markup
-* 
-* @param container
-*The container the markup should be associated with
-* @return True if this markup container has associated markup
-*/
-   public final boolean hasAssociatedMarkup(final MarkupContainer 
container)
-   {
-   return getMarkup(container, container.getClass()) != 
MarkupFragment.NO_MARKUP_FRAGMENT;
-   }
-
-   /**
 * THIS METHOD IS NOT PART OF THE WICKET PUBLIC API. DO NOT IMPLEMENT 
IT.
 * 
 * Gets any (immutable) markup resource for the container or any of its
@@ -273,38 +230,58 @@
}
 
/**
-* Determine the markup resource stream provider to be used
+* Check if container has associated markup
 * 
 * @param container
-*The MarkupContainer requesting the markup resource stream
-* @return IMarkupResourceStreamProvider
+*The container the markup should be associated with
+* @return True if this markup container has associated markup
 */
-   protected IMarkupResourceStreamProvider getMarkupResourceStreamProvider(
-   final MarkupContainer container)
+   public final boolean hasAssociatedMarkup(final MarkupContainer 
container)
{
-   if (container instanceof IMarkupResourceStreamProvider)
-   {
-   return (IMarkupResourceStreamProvider)container;
-   }
+   return getMarkup(container, container.getClass()) != 
MarkupFragment.NO_MARKUP_FRAGMENT;
+   }
 
-   return new DefaultMarkupResourceStreamProvider();
+   /**
+* Clear markup cache and force reload of all markup data
+*/
+   public void removeAllListeners()
+   {
+   this.afterLoadListeners.clear();
}
 
/**
-* Determine the markup cache key provider to be used
+* Remove the markup from the cache and trigger all associated listeners
 * 
-* @param container
-*The MarkupContainer requesting the markup resource stream
-* @return IMarkupResourceStreamProvider
+* @param markupResourceStream
+*The resource stream
 */
-   protected IMarkupCacheKeyProvider getMarkupCacheKeyProvider(final 
MarkupContainer container)
+   public final void removeMarkup(final MarkupResourceStream 
markupResourceStream)
{
-   if (container instanceof IMarkupCacheKeyProvider)
-   {
-   return (IMarkupCacheKeyProvider)container;
-  

svn commit: r497535 - /incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/markup/MarkupCache.java

2007-01-18 Thread ehillenius
Author: ehillenius
Date: Thu Jan 18 10:51:43 2007
New Revision: 497535

URL: http://svn.apache.org/viewvc?view=rev&rev=497535
Log:
sorted members

Modified:

incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/markup/MarkupCache.java

Modified: 
incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/markup/MarkupCache.java
URL: 
http://svn.apache.org/viewvc/incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/markup/MarkupCache.java?view=diff&rev=497535&r1=497534&r2=497535
==
--- 
incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/markup/MarkupCache.java
 (original)
+++ 
incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/markup/MarkupCache.java
 Thu Jan 18 10:51:43 2007
@@ -70,6 +70,15 @@
}
 
/**
+* Clear markup cache and force reload of all markup data
+*/
+   public void clear()
+   {
+   this.afterLoadListeners.clear();
+   this.markupCache.clear();
+   }
+
+   /**
 * Gets a fresh markup stream that contains the (immutable) markup 
resource
 * for this class.
 * 
@@ -134,6 +143,119 @@
}
 
/**
+* Remove the markup from the cache and trigger all associated listeners
+* 
+* @since 1.2.3
+* @param markupResourceStream
+*The resource stream
+*/
+   public void removeMarkup(final MarkupResourceStream 
markupResourceStream)
+   {
+   CharSequence key = null;
+   Iterator iter = this.markupCache.entrySet().iterator();
+   while (iter.hasNext())
+   {
+   Map.Entry entry = (Map.Entry)iter.next();
+   if (entry.getValue() == markupResourceStream)
+   {
+   key = (CharSequence)entry.getKey();
+   break;
+   }
+   }
+
+   if (key != null)
+   {
+   removeMarkup(key, markupResourceStream);
+   }
+   }
+
+   /**
+* @return the number of elements currently in the cache.
+*/
+   public int size()
+   {
+   return markupCache.size();
+   }
+
+   /**
+* The markup has just been loaded and now we check if markup 
inheritance
+* applies, which is if  is found in the markup. If yes, 
than
+* load the base markups and merge the markup elements to create an 
updated
+* (merged) list of markup elements.
+* 
+* @param container
+*The original requesting markup container
+* @param key
+*Key under which markup should be cached
+* @param markup
+*The markup to checked for inheritance
+* @return A markup object with the the base markup elements resolved.
+*/
+   private Markup checkForMarkupInheritance(final MarkupContainer 
container,
+   final CharSequence key, final Markup markup)
+   {
+   // Check if markup contains  which tells us that
+   // we need to read the inherited markup as well.
+   int extendIndex = requiresBaseMarkup(markup);
+   if (extendIndex == -1)
+   {
+   // return a MarkupStream for the markup
+   return markup;
+   }
+
+   // get the base markup
+   final Markup baseMarkup = getMarkup(container, 
markup.getResource().getMarkupClass()
+   .getSuperclass());
+
+   if (baseMarkup == Markup.NO_MARKUP)
+   {
+   throw new MarkupNotFoundException(
+   "Parent markup of inherited markup not 
found. Component class: "
+   + 
markup.getResource().getContainerInfo().getContainerClass().getName()
+   + " Enable debug 
messages for wicket.util.resource.Resource to get a list of all filenames 
tried.");
+   }
+
+   // register an after-load listener for base markup. The listener
+   // implementation will remove the derived markup which must be 
merged
+   // with the base markup
+   afterLoadListeners.add(baseMarkup.getResource(), new 
IChangeListener()
+   {
+   /**
+* Make sure there is only one listener per derived 
markup
+* 
+* @see java.lang.Object#equals(java.lang.Object)
+*/
+   public boolean equals(Object obj)
+   {
+   return true;
+  

[jira] Updated: (WICKET-222) Palette tries to initialize values in constructor

2007-01-18 Thread Jean-Baptiste Quenot (JIRA)

 [ 
https://issues.apache.org/jira/browse/WICKET-222?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jean-Baptiste Quenot updated WICKET-222:


Attachment: 20070118-wicket-1.x-Palette-initialization

> Palette tries to initialize values in constructor
> -
>
> Key: WICKET-222
> URL: https://issues.apache.org/jira/browse/WICKET-222
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-extensions
>Reporter: Jean-Baptiste Quenot
> Fix For: 1.3
>
> Attachments: 20070118-wicket-1.x-Palette-initialization
>
>
> When using a CompoundPropertyModel, the model is defined in the parent 
> widgets.  However Palette tries to initialize its values in the constructor.  
> See patch attached.  Note that the model is read in onAttach() already.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] Created: (WICKET-222) Palette tries to initialize values in constructor

2007-01-18 Thread Jean-Baptiste Quenot (JIRA)
Palette tries to initialize values in constructor
-

 Key: WICKET-222
 URL: https://issues.apache.org/jira/browse/WICKET-222
 Project: Wicket
  Issue Type: Bug
  Components: wicket-extensions
Reporter: Jean-Baptiste Quenot
 Fix For: 1.3
 Attachments: 20070118-wicket-1.x-Palette-initialization

When using a CompoundPropertyModel, the model is defined in the parent widgets. 
 However Palette tries to initialize its values in the constructor.  See patch 
attached.  Note that the model is read in onAttach() already.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira




svn commit: r497537 - /incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/protocol/http/WicketServlet.java

2007-01-18 Thread almaw
Author: almaw
Date: Thu Jan 18 11:01:51 2007
New Revision: 497537

URL: http://svn.apache.org/viewvc?view=rev&rev=497537
Log:
Add javadoc noting lack of OSGi for filters.

Modified:

incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/protocol/http/WicketServlet.java

Modified: 
incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/protocol/http/WicketServlet.java
URL: 
http://svn.apache.org/viewvc/incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/protocol/http/WicketServlet.java?view=diff&rev=497537&r1=497536&r2=497537
==
--- 
incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/protocol/http/WicketServlet.java
 (original)
+++ 
incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/protocol/http/WicketServlet.java
 Thu Jan 18 11:01:51 2007
@@ -32,6 +32,7 @@
 /**
  * 
  * Please use [EMAIL PROTECTED] WicketFilter} if possible instead of this 
servlet.
+ * OSGi doesn't support filters yet, so you may be stuck with this.
  * 
  * Servlet class for all wicket applications. The specific application class to
  * instantiate should be specified to the application server via an init-params




svn commit: r497538 - /incubator/wicket/trunk/wicket/src/main/java/wicket/protocol/http/WicketServlet.java

2007-01-18 Thread almaw
Author: almaw
Date: Thu Jan 18 11:02:04 2007
New Revision: 497538

URL: http://svn.apache.org/viewvc?view=rev&rev=497538
Log:
Add javadoc noting lack of OSGi for filters.

Modified:

incubator/wicket/trunk/wicket/src/main/java/wicket/protocol/http/WicketServlet.java

Modified: 
incubator/wicket/trunk/wicket/src/main/java/wicket/protocol/http/WicketServlet.java
URL: 
http://svn.apache.org/viewvc/incubator/wicket/trunk/wicket/src/main/java/wicket/protocol/http/WicketServlet.java?view=diff&rev=497538&r1=497537&r2=497538
==
--- 
incubator/wicket/trunk/wicket/src/main/java/wicket/protocol/http/WicketServlet.java
 (original)
+++ 
incubator/wicket/trunk/wicket/src/main/java/wicket/protocol/http/WicketServlet.java
 Thu Jan 18 11:02:04 2007
@@ -32,6 +32,7 @@
 /**
  * 
  * Please use [EMAIL PROTECTED] WicketFilter} if possible instead of this 
servlet.
+ * OSGi doesn't support filters yet, so you may be stuck with this.
  * 
  * Servlet class for all wicket applications. The specific application class to
  * instantiate should be specified to the application server via an init-params




svn commit: r497555 - /incubator/wicket/branches/wicket-1.x/wicket-examples/src/main/webapp/WEB-INF/web.xml

2007-01-18 Thread jcompagner
Author: jcompagner
Date: Thu Jan 18 12:00:40 2007
New Revision: 497555

URL: http://svn.apache.org/viewvc?view=rev&rev=497555
Log:
removed distributable and configuration param

Modified:

incubator/wicket/branches/wicket-1.x/wicket-examples/src/main/webapp/WEB-INF/web.xml

Modified: 
incubator/wicket/branches/wicket-1.x/wicket-examples/src/main/webapp/WEB-INF/web.xml
URL: 
http://svn.apache.org/viewvc/incubator/wicket/branches/wicket-1.x/wicket-examples/src/main/webapp/WEB-INF/web.xml?view=diff&rev=497555&r1=497554&r2=497555
==
--- 
incubator/wicket/branches/wicket-1.x/wicket-examples/src/main/webapp/WEB-INF/web.xml
 (original)
+++ 
incubator/wicket/branches/wicket-1.x/wicket-examples/src/main/webapp/WEB-INF/web.xml
 Thu Jan 18 12:00:40 2007
@@ -7,8 +7,6 @@
 
Wicket Examples

-   
-


  configuration
- development
+ deployment

 





[jira] Created: (WICKET-223) NPE in Check.onComponentTag

2007-01-18 Thread Alex Burgel (JIRA)
NPE in Check.onComponentTag
---

 Key: WICKET-223
 URL: https://issues.apache.org/jira/browse/WICKET-223
 Project: Wicket
  Issue Type: Bug
  Components: wicket
Affects Versions: 1.2.4
Reporter: Alex Burgel
Priority: Critical


I've been getting NPEs in wicket.markup.html.form.Check line 132 since 
upgrading to wicket 1.2.4

it seems that it is possible for FormComponent.getInputAsArray() can return 
null rather than an empty array.

a fix would be to do a null check in Check or ensure that getInputAsArray() 
never returns null

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira




svn commit: r497564 - /incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/protocol/http/WicketFilter.java

2007-01-18 Thread almaw
Author: almaw
Date: Thu Jan 18 12:41:23 2007
New Revision: 497564

URL: http://svn.apache.org/viewvc?view=rev&rev=497564
Log:
WICKET-221 fix http://foo/app/ doesn't work, but http://foo/app does

Modified:

incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/protocol/http/WicketFilter.java

Modified: 
incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/protocol/http/WicketFilter.java
URL: 
http://svn.apache.org/viewvc/incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/protocol/http/WicketFilter.java?view=diff&rev=497564&r1=497563&r2=497564
==
--- 
incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/protocol/http/WicketFilter.java
 (original)
+++ 
incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/protocol/http/WicketFilter.java
 Thu Jan 18 12:41:23 2007
@@ -512,6 +512,10 @@
{
String fullRootPath = getRootPath(request);
String url = request.getRequestURI();
+   String containerSuppliedContextPath = request.getContextPath();
+   if (!fullRootPath.startsWith(containerSuppliedContextPath)) {
+   url = 
url.substring(containerSuppliedContextPath.length());
+   }
 
// Homepage
if (url.startsWith(fullRootPath))
@@ -521,6 +525,11 @@
if (url.equals("/"))
{
return true;
+   }
+   // Strip trailing slash off url, but not if the filter 
is mapped at the root /
+   if (fullRootPath.length() > 0 && fullRootPath.length() 
== url.length() - 1 && url.endsWith("/"))
+   {
+   url = url.substring(0, url.length() - 1);
}
// url == fullRootPath
if (url.length() == fullRootPath.length())




[jira] Assigned: (WICKET-223) NPE in Check.onComponentTag

2007-01-18 Thread Igor Vaynberg (JIRA)

 [ 
https://issues.apache.org/jira/browse/WICKET-223?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Igor Vaynberg reassigned WICKET-223:


Assignee: Igor Vaynberg

> NPE in Check.onComponentTag
> ---
>
> Key: WICKET-223
> URL: https://issues.apache.org/jira/browse/WICKET-223
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket
>Affects Versions: 1.2.4
>Reporter: Alex Burgel
> Assigned To: Igor Vaynberg
>Priority: Critical
>
> I've been getting NPEs in wicket.markup.html.form.Check line 132 since 
> upgrading to wicket 1.2.4
> it seems that it is possible for FormComponent.getInputAsArray() can return 
> null rather than an empty array.
> a fix would be to do a null check in Check or ensure that getInputAsArray() 
> never returns null

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] Commented: (WICKET-223) NPE in Check.onComponentTag

2007-01-18 Thread Igor Vaynberg (JIRA)

[ 
https://issues.apache.org/jira/browse/WICKET-223?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12465864
 ] 

Igor Vaynberg commented on WICKET-223:
--

in 1.x branch the code looks like this

if (group.hasRawInput())
{
final String[] input = group.getInputAsArray();

if (input != null)
{ 

what does it look like in your version?

> NPE in Check.onComponentTag
> ---
>
> Key: WICKET-223
> URL: https://issues.apache.org/jira/browse/WICKET-223
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket
>Affects Versions: 1.2.4
>Reporter: Alex Burgel
> Assigned To: Igor Vaynberg
>Priority: Critical
>
> I've been getting NPEs in wicket.markup.html.form.Check line 132 since 
> upgrading to wicket 1.2.4
> it seems that it is possible for FormComponent.getInputAsArray() can return 
> null rather than an empty array.
> a fix would be to do a null check in Check or ensure that getInputAsArray() 
> never returns null

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] Commented: (WICKET-221) http://foo/app/ doesn't work, but http://foo/app does, with WicketFilter.

2007-01-18 Thread Jean-Baptiste Quenot (JIRA)

[ 
https://issues.apache.org/jira/browse/WICKET-221?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12465870
 ] 

Jean-Baptiste Quenot commented on WICKET-221:
-

I thought WICKET-205 was intended to fix that.  Or does it breaks your usecase?

> http://foo/app/ doesn't work, but http://foo/app does, with WicketFilter.
> -
>
> Key: WICKET-221
> URL: https://issues.apache.org/jira/browse/WICKET-221
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket
>Affects Versions: 1.3
>Reporter: Alastair Maw
> Assigned To: Alastair Maw
>
> As summary.
> ChuckDeal's take on it is this:
> When tracing through the WicketFilter code, it looks like isWicketRequest() 
> can't deal with it so it delegates to 
> webApplication.getRequestCycleProcessor().getRequestCodingStrategy().urlCodingStrategyForPath(path)
>  which returns null because it specifically excludes the '/'.  You can't 
> mount '/' because mount(...) will throw IllegalArgumentException("The mount
> path '/' is reserved for the application home page").  Is this a loophole, or 
> have I missed something.  

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] Commented: (WICKET-223) NPE in Check.onComponentTag

2007-01-18 Thread Alex Burgel (JIRA)

[ 
https://issues.apache.org/jira/browse/WICKET-223?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12465872
 ] 

Alex Burgel commented on WICKET-223:


it doesn't look like that. my version doesn't have the if (input != null)

and i just redownloaded wicket 1.2.4 from sourceforge. and the included source 
in that version doesn't have a null check either.

maybe the tar files were created from the wrong version?

> NPE in Check.onComponentTag
> ---
>
> Key: WICKET-223
> URL: https://issues.apache.org/jira/browse/WICKET-223
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket
>Affects Versions: 1.2.4
>Reporter: Alex Burgel
> Assigned To: Igor Vaynberg
>Priority: Critical
>
> I've been getting NPEs in wicket.markup.html.form.Check line 132 since 
> upgrading to wicket 1.2.4
> it seems that it is possible for FormComponent.getInputAsArray() can return 
> null rather than an empty array.
> a fix would be to do a null check in Check or ensure that getInputAsArray() 
> never returns null

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] Commented: (WICKET-223) NPE in Check.onComponentTag

2007-01-18 Thread Igor Vaynberg (JIRA)

[ 
https://issues.apache.org/jira/browse/WICKET-223?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12465873
 ] 

Igor Vaynberg commented on WICKET-223:
--

or the bug was fixed in the 1.x branch. do you want to upgrade to 1.3 or stay 
on the 1.2.x branch? if stay we will need to vote on this bug to be fixed in 
1.2.x release on the mailing list

> NPE in Check.onComponentTag
> ---
>
> Key: WICKET-223
> URL: https://issues.apache.org/jira/browse/WICKET-223
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket
>Affects Versions: 1.2.4
>Reporter: Alex Burgel
> Assigned To: Igor Vaynberg
>Priority: Critical
> Fix For: 1.3, 2.0
>
>
> I've been getting NPEs in wicket.markup.html.form.Check line 132 since 
> upgrading to wicket 1.2.4
> it seems that it is possible for FormComponent.getInputAsArray() can return 
> null rather than an empty array.
> a fix would be to do a null check in Check or ensure that getInputAsArray() 
> never returns null

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] Updated: (WICKET-223) NPE in Check.onComponentTag

2007-01-18 Thread Igor Vaynberg (JIRA)

 [ 
https://issues.apache.org/jira/browse/WICKET-223?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Igor Vaynberg updated WICKET-223:
-

Fix Version/s: 2.0
   1.3

> NPE in Check.onComponentTag
> ---
>
> Key: WICKET-223
> URL: https://issues.apache.org/jira/browse/WICKET-223
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket
>Affects Versions: 1.2.4
>Reporter: Alex Burgel
> Assigned To: Igor Vaynberg
>Priority: Critical
> Fix For: 1.3, 2.0
>
>
> I've been getting NPEs in wicket.markup.html.form.Check line 132 since 
> upgrading to wicket 1.2.4
> it seems that it is possible for FormComponent.getInputAsArray() can return 
> null rather than an empty array.
> a fix would be to do a null check in Check or ensure that getInputAsArray() 
> never returns null

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] Commented: (WICKET-223) NPE in Check.onComponentTag

2007-01-18 Thread Alex Burgel (JIRA)

[ 
https://issues.apache.org/jira/browse/WICKET-223?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12465877
 ] 

Alex Burgel commented on WICKET-223:


sorry for the confusion. i mentioned in the bug description that i was using 
1.2.4, so when you posted that code, i assumed you were referring to the 
version i was talking about, and not an unreleased version.

i've already worked around the bug in my code, so it makes no difference to me 
if/when it is fixed.

but considering that its a 1 line fix, you have my vote for it to be fixed in 
the next 1.2 release.

> NPE in Check.onComponentTag
> ---
>
> Key: WICKET-223
> URL: https://issues.apache.org/jira/browse/WICKET-223
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket
>Affects Versions: 1.2.4
>Reporter: Alex Burgel
> Assigned To: Igor Vaynberg
>Priority: Critical
> Fix For: 1.3, 2.0
>
>
> I've been getting NPEs in wicket.markup.html.form.Check line 132 since 
> upgrading to wicket 1.2.4
> it seems that it is possible for FormComponent.getInputAsArray() can return 
> null rather than an empty array.
> a fix would be to do a null check in Check or ensure that getInputAsArray() 
> never returns null

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] Resolved: (WICKET-223) NPE in Check.onComponentTag

2007-01-18 Thread Igor Vaynberg (JIRA)

 [ 
https://issues.apache.org/jira/browse/WICKET-223?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Igor Vaynberg resolved WICKET-223.
--

Resolution: Duplicate

> NPE in Check.onComponentTag
> ---
>
> Key: WICKET-223
> URL: https://issues.apache.org/jira/browse/WICKET-223
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket
>Affects Versions: 1.2.4
>Reporter: Alex Burgel
> Assigned To: Igor Vaynberg
>Priority: Critical
> Fix For: 1.3, 2.0
>
>
> I've been getting NPEs in wicket.markup.html.form.Check line 132 since 
> upgrading to wicket 1.2.4
> it seems that it is possible for FormComponent.getInputAsArray() can return 
> null rather than an empty array.
> a fix would be to do a null check in Check or ensure that getInputAsArray() 
> never returns null

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira




svn commit: r497608 - /incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/ajax/markup/html/form/AjaxSubmitButton.java

2007-01-18 Thread knopp
Author: knopp
Date: Thu Jan 18 14:32:35 2007
New Revision: 497608

URL: http://svn.apache.org/viewvc?view=rev&rev=497608
Log:
Fixed the problem when AjaxSubmitButton couldn't be used outside the form

Modified:

incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/ajax/markup/html/form/AjaxSubmitButton.java

Modified: 
incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/ajax/markup/html/form/AjaxSubmitButton.java
URL: 
http://svn.apache.org/viewvc/incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/ajax/markup/html/form/AjaxSubmitButton.java?view=diff&rev=497608&r1=497607&r2=497608
==
--- 
incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/ajax/markup/html/form/AjaxSubmitButton.java
 (original)
+++ 
incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/ajax/markup/html/form/AjaxSubmitButton.java
 Thu Jan 18 14:32:35 2007
@@ -37,6 +37,8 @@
 {
private static final long serialVersionUID = 1L;
 
+   private Form form;
+   
/**
 * Construct.
 * 
@@ -46,6 +48,19 @@
{
this(id, null);
}
+   
+   /**
+* Returns the form if it was set in constructor, otherwise returns the 
+* form nearest in parent hierarchy.
+* @see wicket.markup.html.form.FormComponent#getForm()
+*/
+   public Form getForm()
+   {
+   if (form != null)
+   return form;
+   else
+   return super.getForm();
+   }
 
/**
 * Construct.
@@ -56,6 +71,7 @@
public AjaxSubmitButton(String id, final Form form)
{
super(id);
+   this.form = form;
 
add(new AjaxFormSubmitBehavior(form, "onclick")
{




svn commit: r497625 - in /incubator/wicket/trunk/wicket/src/main/java/wicket/protocol/http: MockHttpSession.java MockServletContext.java MockWebApplication.java

2007-01-18 Thread jcompagner
Author: jcompagner
Date: Thu Jan 18 15:03:53 2007
New Revision: 497625

URL: http://svn.apache.org/viewvc?view=rev&rev=497625
Log:
cleanup dirs that are created by testing.
generate an id that is a valid dir

Modified:

incubator/wicket/trunk/wicket/src/main/java/wicket/protocol/http/MockHttpSession.java

incubator/wicket/trunk/wicket/src/main/java/wicket/protocol/http/MockServletContext.java

incubator/wicket/trunk/wicket/src/main/java/wicket/protocol/http/MockWebApplication.java

Modified: 
incubator/wicket/trunk/wicket/src/main/java/wicket/protocol/http/MockHttpSession.java
URL: 
http://svn.apache.org/viewvc/incubator/wicket/trunk/wicket/src/main/java/wicket/protocol/http/MockHttpSession.java?view=diff&rev=497625&r1=497624&r2=497625
==
--- 
incubator/wicket/trunk/wicket/src/main/java/wicket/protocol/http/MockHttpSession.java
 (original)
+++ 
incubator/wicket/trunk/wicket/src/main/java/wicket/protocol/http/MockHttpSession.java
 Thu Jan 18 15:03:53 2007
@@ -42,7 +42,7 @@
 
private final long creationTime = System.currentTimeMillis();
 
-   private final String id = (new UID()).toString();
+   private final String id = (new UID()).toString().replace(":", "_");
 
private long lastAccessedTime = 0;
 

Modified: 
incubator/wicket/trunk/wicket/src/main/java/wicket/protocol/http/MockServletContext.java
URL: 
http://svn.apache.org/viewvc/incubator/wicket/trunk/wicket/src/main/java/wicket/protocol/http/MockServletContext.java?view=diff&rev=497625&r1=497624&r2=497625
==
--- 
incubator/wicket/trunk/wicket/src/main/java/wicket/protocol/http/MockServletContext.java
 (original)
+++ 
incubator/wicket/trunk/wicket/src/main/java/wicket/protocol/http/MockServletContext.java
 Thu Jan 18 15:03:53 2007
@@ -114,9 +114,10 @@
try
{
File tmpDir = File.createTempFile("wicket", null);
+   File dir = new 
File(tmpDir.getParentFile(),tmpDir.getName() + "p");
+   dir.mkdir();
+   setAttribute("javax.servlet.context.tempdir", dir);
tmpDir.delete();
-   tmpDir.mkdir();
-   setAttribute("javax.servlet.context.tempdir", tmpDir);
}
catch (IOException e)
{

Modified: 
incubator/wicket/trunk/wicket/src/main/java/wicket/protocol/http/MockWebApplication.java
URL: 
http://svn.apache.org/viewvc/incubator/wicket/trunk/wicket/src/main/java/wicket/protocol/http/MockWebApplication.java?view=diff&rev=497625&r1=497624&r2=497625
==
--- 
incubator/wicket/trunk/wicket/src/main/java/wicket/protocol/http/MockWebApplication.java
 (original)
+++ 
incubator/wicket/trunk/wicket/src/main/java/wicket/protocol/http/MockWebApplication.java
 Thu Jan 18 15:03:53 2007
@@ -16,6 +16,7 @@
  */
 package wicket.protocol.http;
 
+import java.io.File;
 import java.util.Enumeration;
 import java.util.HashMap;
 import java.util.Map;
@@ -123,6 +124,10 @@
/** The tester object */
private final WebApplication application;
 
+   private ServletContext context;
+
+   private WicketFilter filter;
+
/**
 * Create the mock http tester that can be used for testing.
 * 
@@ -137,8 +142,8 @@
{
this.application = application;
 
-   final ServletContext context = newServletContext(path);
-   WicketFilter filter = new WicketFilter()
+   context = newServletContext(path);
+   filter = new WicketFilter()
{
@Override
protected IWebApplicationFactory getApplicationFactory()
@@ -516,5 +521,38 @@
public void setParametersForNextRequest(Map 
parametersForNextRequest)
{
this.parametersForNextRequest = parametersForNextRequest;
+   }
+   
+   /**
+* clears this mock application
+*/
+   public void destroy()
+   {
+   filter.destroy();
+   File dir = 
(File)context.getAttribute("javax.servlet.context.tempdir");
+   deleteDir(dir);
+   }
+   
+   private void deleteDir(File dir)
+   {
+   if(dir != null && dir.isDirectory())
+   {
+   File[] files = dir.listFiles();
+   if (files != null)
+   {
+   for (File element : files)
+   {
+   if(element.isDirectory())
+   {
+   deleteDir(element);
+   }
+ 

svn commit: r497626 - in /incubator/wicket/trunk/wicket/src/main/java/wicket: markup/html/PackageResource.java util/resource/locator/ResourceStreamFactory.java

2007-01-18 Thread jcompagner
Author: jcompagner
Date: Thu Jan 18 15:04:38 2007
New Revision: 497626

URL: http://svn.apache.org/viewvc?view=rev&rev=497626
Log:
fix for reading resources (setting the locale)

Modified:

incubator/wicket/trunk/wicket/src/main/java/wicket/markup/html/PackageResource.java

incubator/wicket/trunk/wicket/src/main/java/wicket/util/resource/locator/ResourceStreamFactory.java

Modified: 
incubator/wicket/trunk/wicket/src/main/java/wicket/markup/html/PackageResource.java
URL: 
http://svn.apache.org/viewvc/incubator/wicket/trunk/wicket/src/main/java/wicket/markup/html/PackageResource.java?view=diff&rev=497626&r1=497625&r2=497626
==
--- 
incubator/wicket/trunk/wicket/src/main/java/wicket/markup/html/PackageResource.java
 (original)
+++ 
incubator/wicket/trunk/wicket/src/main/java/wicket/markup/html/PackageResource.java
 Thu Jan 18 15:04:38 2007
@@ -175,8 +175,15 @@
final String style)
{
String absolutePath = Packages.absolutePath(scope, path);
+   String extension = null;
+   int index = absolutePath.lastIndexOf(".");
+   if (index != -1)
+   {
+   extension = absolutePath.substring(index+1);
+   absolutePath = absolutePath.substring(0,index);
+   }
return 
Application.get().getResourceSettings().getResourceStreamFactory().locate(scope,
-   absolutePath, style, locale, null) != null;
+   absolutePath, style, locale, extension) != null;
}
 
/**
@@ -248,6 +255,9 @@
/** The resource's style */
private final String style;
 
+   /** The extention of this resource */
+   private final String extension;
+
/**
 * Hidden constructor.
 * 
@@ -268,7 +278,7 @@
final String style)
{
// Convert resource path to absolute path relative to base 
package
-   this.absolutePath = Packages.absolutePath(scope, path);
+   String absolutePath = Packages.absolutePath(scope, path);
 
IPackageResourceGuard guard = 
Application.get().getResourceSettings()
.getPackageResourceGuard();
@@ -278,6 +288,17 @@
+ " may not be accessed");
}
 
+   int index = absolutePath.lastIndexOf(".");
+   if (index != -1)
+   {
+   extension = absolutePath.substring(index+1);
+   absolutePath = absolutePath.substring(0,index);
+   }
+   else
+   {
+   this.extension = null;
+   }
+   this.absolutePath = absolutePath;
this.scope = scope;
this.path = path;
this.locale = locale;
@@ -332,7 +353,7 @@
{
// Locate resource
IResourceStream resourceStream = 
Application.get().getResourceSettings()
-   .getResourceStreamFactory().locate(scope, 
absolutePath, style, locale, null);
+   .getResourceStreamFactory().locate(scope, 
absolutePath, style, locale, extension);
 
// Check that resource was found
if (resourceStream == null)

Modified: 
incubator/wicket/trunk/wicket/src/main/java/wicket/util/resource/locator/ResourceStreamFactory.java
URL: 
http://svn.apache.org/viewvc/incubator/wicket/trunk/wicket/src/main/java/wicket/util/resource/locator/ResourceStreamFactory.java?view=diff&rev=497626&r1=497625&r2=497626
==
--- 
incubator/wicket/trunk/wicket/src/main/java/wicket/util/resource/locator/ResourceStreamFactory.java
 (original)
+++ 
incubator/wicket/trunk/wicket/src/main/java/wicket/util/resource/locator/ResourceStreamFactory.java
 Thu Jan 18 15:04:38 2007
@@ -119,7 +119,7 @@
String newPath = styleIter.next();
 
// next is the Locale
-   Iterator localeIter = new 
LocaleResourceNameIterator(newPath, locale);
+   LocaleResourceNameIterator localeIter = new 
LocaleResourceNameIterator(newPath, locale);
while (localeIter.hasNext())
{
newPath = localeIter.next();
@@ -132,6 +132,7 @@
IResourceStream stream = locate(clazz, 
newPath);
if (stream != null)
{
+   
stream.setLocale(localeIter.getLocale());
return stream;
}
  

svn commit: r497627 - /incubator/wicket/trunk/wicket/src/test/java/wicket/markup/html/form/persistence/CookieValuePersisterTest.java

2007-01-18 Thread jcompagner
Author: jcompagner
Date: Thu Jan 18 15:04:44 2007
New Revision: 497627

URL: http://svn.apache.org/viewvc?view=rev&rev=497627
Log:
fix test

Modified:

incubator/wicket/trunk/wicket/src/test/java/wicket/markup/html/form/persistence/CookieValuePersisterTest.java

Modified: 
incubator/wicket/trunk/wicket/src/test/java/wicket/markup/html/form/persistence/CookieValuePersisterTest.java
URL: 
http://svn.apache.org/viewvc/incubator/wicket/trunk/wicket/src/test/java/wicket/markup/html/form/persistence/CookieValuePersisterTest.java?view=diff&rev=497627&r1=497626&r2=497627
==
--- 
incubator/wicket/trunk/wicket/src/test/java/wicket/markup/html/form/persistence/CookieValuePersisterTest.java
 (original)
+++ 
incubator/wicket/trunk/wicket/src/test/java/wicket/markup/html/form/persistence/CookieValuePersisterTest.java
 Thu Jan 18 15:04:44 2007
@@ -106,7 +106,7 @@
persister.save(textField);
assertNull(getRequestCookies(cycle));
assertEquals(1, getResponseCookies(cycle).size());
-   assertEquals("test+%C3%A4%C3%B6%C3%BC%C3%9F%C3%A9%C3%A8%C3%AA", 
(getResponseCookies(cycle).get(0)).getValue());
+   
assertEquals("test+%C3%AF%C2%BF%C2%BD%C3%AF%C2%BF%C2%BD%C3%AF%C2%BF%C2%BD%C3%AF%C2%BF%C2%BD%C3%AF%C2%BF%C2%BD%C3%AF%C2%BF%C2%BD%C3%AF%C2%BF%C2%BD",
 (getResponseCookies(cycle).get(0)).getValue());
assertEquals("form%3Ainput", 
(getResponseCookies(cycle).get(0)).getName());
assertEquals(cycle.getWebRequest().getContextPath(), 
(getResponseCookies(cycle)
.get(0)).getPath());
@@ -118,7 +118,7 @@
persister.clear(textField);
assertNull(getRequestCookies(cycle));
assertEquals(1, getResponseCookies(cycle).size());
-   assertEquals("test+%C3%A4%C3%B6%C3%BC%C3%9F%C3%A9%C3%A8%C3%AA", 
(getResponseCookies(cycle).get(0)).getValue());
+   
assertEquals("test+%C3%AF%C2%BF%C2%BD%C3%AF%C2%BF%C2%BD%C3%AF%C2%BF%C2%BD%C3%AF%C2%BF%C2%BD%C3%AF%C2%BF%C2%BD%C3%AF%C2%BF%C2%BD%C3%AF%C2%BF%C2%BD",
 (getResponseCookies(cycle).get(0)).getValue());
assertEquals("form%3Ainput", 
(getResponseCookies(cycle).get(0)).getName());
assertEquals(cycle.getWebRequest().getContextPath(), 
(getResponseCookies(cycle)
.get(0)).getPath());




svn commit: r497628 - in /incubator/wicket/trunk/wicket/src/main/java/wicket: Application_ru.xml jmx/Initializer.java

2007-01-18 Thread jcompagner
Author: jcompagner
Date: Thu Jan 18 15:04:55 2007
New Revision: 497628

URL: http://svn.apache.org/viewvc?view=rev&rev=497628
Log:
license

Modified:
incubator/wicket/trunk/wicket/src/main/java/wicket/Application_ru.xml
incubator/wicket/trunk/wicket/src/main/java/wicket/jmx/Initializer.java

Modified: incubator/wicket/trunk/wicket/src/main/java/wicket/Application_ru.xml
URL: 
http://svn.apache.org/viewvc/incubator/wicket/trunk/wicket/src/main/java/wicket/Application_ru.xml?view=diff&rev=497628&r1=497627&r2=497628
==
--- incubator/wicket/trunk/wicket/src/main/java/wicket/Application_ru.xml 
(original)
+++ incubator/wicket/trunk/wicket/src/main/java/wicket/Application_ru.xml Thu 
Jan 18 15:04:55 2007
@@ -1,4 +1,4 @@
-
+
 

svn commit: r497639 - /incubator/wicket/trunk/wicket/src/main/java/wicket/ajax/wicket-ajax.js

2007-01-18 Thread knopp
Author: knopp
Date: Thu Jan 18 15:34:26 2007
New Revision: 497639

URL: http://svn.apache.org/viewvc?view=rev&rev=497639
Log:
fix for safari

Modified:
incubator/wicket/trunk/wicket/src/main/java/wicket/ajax/wicket-ajax.js

Modified: incubator/wicket/trunk/wicket/src/main/java/wicket/ajax/wicket-ajax.js
URL: 
http://svn.apache.org/viewvc/incubator/wicket/trunk/wicket/src/main/java/wicket/ajax/wicket-ajax.js?view=diff&rev=497639&r1=497638&r2=497639
==
--- incubator/wicket/trunk/wicket/src/main/java/wicket/ajax/wicket-ajax.js 
(original)
+++ incubator/wicket/trunk/wicket/src/main/java/wicket/ajax/wicket-ajax.js Thu 
Jan 18 15:34:26 2007
@@ -164,6 +164,7 @@
 Wicket.replaceOuterHtml = function(element, text) {
 if (element.outerHTML) { // internet explorer or opera
var parent = element.parentNode;
+

// find out the element's index and next element (if any). we 
need to access
// newly created elements to execute theirs 

svn commit: r497647 - /incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/ajax/wicket-ajax.js

2007-01-18 Thread knopp
Author: knopp
Date: Thu Jan 18 16:10:50 2007
New Revision: 497647

URL: http://svn.apache.org/viewvc?view=rev&rev=497647
Log:
Safari fix

Modified:

incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/ajax/wicket-ajax.js

Modified: 
incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/ajax/wicket-ajax.js
URL: 
http://svn.apache.org/viewvc/incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/ajax/wicket-ajax.js?view=diff&rev=497647&r1=497646&r2=497647
==
--- 
incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/ajax/wicket-ajax.js
 (original)
+++ 
incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/ajax/wicket-ajax.js
 Thu Jan 18 16:10:50 2007
@@ -164,6 +164,7 @@
 Wicket.replaceOuterHtml = function(element, text) {
 if (element.outerHTML) { // internet explorer or opera
var parent = element.parentNode;
+

// find out the element's index and next element (if any). we 
need to access
// newly created elements to execute theirs 

svn commit: r497648 - /incubator/wicket/branches/wicket-1.2.x/wicket/src/main/java/wicket/ajax/wicket-ajax.js

2007-01-18 Thread knopp
Author: knopp
Date: Thu Jan 18 16:12:43 2007
New Revision: 497648

URL: http://svn.apache.org/viewvc?view=rev&rev=497648
Log:
Safari fix

Modified:

incubator/wicket/branches/wicket-1.2.x/wicket/src/main/java/wicket/ajax/wicket-ajax.js

Modified: 
incubator/wicket/branches/wicket-1.2.x/wicket/src/main/java/wicket/ajax/wicket-ajax.js
URL: 
http://svn.apache.org/viewvc/incubator/wicket/branches/wicket-1.2.x/wicket/src/main/java/wicket/ajax/wicket-ajax.js?view=diff&rev=497648&r1=497647&r2=497648
==
--- 
incubator/wicket/branches/wicket-1.2.x/wicket/src/main/java/wicket/ajax/wicket-ajax.js
 (original)
+++ 
incubator/wicket/branches/wicket-1.2.x/wicket/src/main/java/wicket/ajax/wicket-ajax.js
 Thu Jan 18 16:12:43 2007
@@ -164,6 +164,7 @@
 Wicket.replaceOuterHtml = function(element, text) {
 if (element.outerHTML) { // internet explorer or opera
var parent = element.parentNode;
+

// find out the element's index and next element (if any). we 
need to access
// newly created elements to execute theirs 

svn commit: r497650 - in /incubator/wicket/trunk/wicket/src: main/java/wicket/protocol/http/ test/java/wicket/ test/java/wicket/markup/html/ test/java/wicket/markup/html/list/ test/java/wicket/model/

2007-01-18 Thread jcompagner
Author: jcompagner
Date: Thu Jan 18 16:15:41 2007
New Revision: 497650

URL: http://svn.apache.org/viewvc?view=rev&rev=497650
Log:
better creation of the tmp/work dir and cleanup

Modified:

incubator/wicket/trunk/wicket/src/main/java/wicket/protocol/http/MockServletContext.java

incubator/wicket/trunk/wicket/src/test/java/wicket/ApplicationSettingsTest.java
incubator/wicket/trunk/wicket/src/test/java/wicket/AuthorizationTest.java
incubator/wicket/trunk/wicket/src/test/java/wicket/TesterTest.java
incubator/wicket/trunk/wicket/src/test/java/wicket/WicketTestCase.java

incubator/wicket/trunk/wicket/src/test/java/wicket/markup/html/PackageResourceTest.java

incubator/wicket/trunk/wicket/src/test/java/wicket/markup/html/list/ListViewTest.java

incubator/wicket/trunk/wicket/src/test/java/wicket/model/StringResourceModelTest.java

incubator/wicket/trunk/wicket/src/test/java/wicket/protocol/http/WebRequestTest.java

incubator/wicket/trunk/wicket/src/test/java/wicket/request/target/coding/MixedParamUrlCodingStrategyTest.java

incubator/wicket/trunk/wicket/src/test/java/wicket/util/tester/WicketTesterTest.java

incubator/wicket/trunk/wicket/src/test/java/wicket/util/tester/apps_2/Test.java

Modified: 
incubator/wicket/trunk/wicket/src/main/java/wicket/protocol/http/MockServletContext.java
URL: 
http://svn.apache.org/viewvc/incubator/wicket/trunk/wicket/src/main/java/wicket/protocol/http/MockServletContext.java?view=diff&rev=497650&r1=497649&r2=497650
==
--- 
incubator/wicket/trunk/wicket/src/main/java/wicket/protocol/http/MockServletContext.java
 (original)
+++ 
incubator/wicket/trunk/wicket/src/main/java/wicket/protocol/http/MockServletContext.java
 Thu Jan 18 16:15:41 2007
@@ -29,6 +29,7 @@
 import java.util.HashSet;
 import java.util.Map;
 import java.util.Set;
+import java.util.UUID;
 
 import javax.servlet.RequestDispatcher;
 import javax.servlet.Servlet;
@@ -41,7 +42,6 @@
 import org.slf4j.LoggerFactory;
 
 import wicket.Application;
-import wicket.WicketRuntimeException;
 import wicket.util.value.ValueMap;
 
 /**
@@ -111,19 +111,58 @@
mimeTypes.put("png", "image/png");
 
// Set ServletContext temp dir
-   try
+   setAttribute("javax.servlet.context.tempdir", 
createTempDir("wicket" + UUID.randomUUID()));
+   }
+   
+   /**
+* Creates a temp directory
+* 
+* @param name
+* @return
+*/
+   public static File createTempDir(String name)
+   {
+   String tempDir = System.getProperty("java.io.tmpdir");
+   if (tempDir == null || tempDir.trim().length() == 0)
{
-   File tmpDir = File.createTempFile("wicket", null);
-   File dir = new 
File(tmpDir.getParentFile(),tmpDir.getName() + "p");
-   dir.mkdir();
-   setAttribute("javax.servlet.context.tempdir", dir);
-   tmpDir.delete();
+   throw new RuntimeException(
+   "Could not create a temporary 
directory. System's [[java.io.tmpdir]] property is not "
+   + "properly set. 
Current value is [[" + tempDir
+   + "]]. Set via [[java 
-Djava.io.tmpdir=/var/tmp]]");
}
-   catch (IOException e)
+
+   if (!tempDir.endsWith(File.separator))
{
-   throw new WicketRuntimeException(e);
+   tempDir += File.separator;
}
+
+   tempDir += name;
+
+   File dir = new File(tempDir);
+
+   int counter = 0;
+   while (dir.exists())
+   {
+   dir = new File(dir.getAbsolutePath() + counter);
+   counter++;
+   if (counter > 100)
+   {
+   throw new RuntimeException("Could not create 
temporary directory [["
+   + dir.getAbsolutePath() + "]] 
after attempting 100 tries");
+   }
+   }
+
+   if (!dir.mkdirs())
+   {
+   throw new RuntimeException("Could not create path for 
tempdir [["
+   + dir.getAbsolutePath() + "]]");
+   }
+
+   dir.deleteOnExit();
+
+   return dir;
}
+
 
/**
 * Add an init parameter.

Modified: 
incubator/wicket/trunk/wicket/src/test/java/wicket/ApplicationSettingsTest.java
URL: 
http://svn.apache.org/viewvc/incubator/wicket/trunk/wicket/src/test/java/wicket/ApplicationSettingsTest.java?view=diff&rev=497650&r1=497649&r2=497650
==

svn commit: r497659 - /incubator/wicket/trunk/wicket-examples/src/main/java/wicket/examples/customresourceloading/CustomLoadedTemplate.html

2007-01-18 Thread ehillenius
Author: ehillenius
Date: Thu Jan 18 16:30:17 2007
New Revision: 497659

URL: http://svn.apache.org/viewvc?view=rev&rev=497659
Log:
doc

Modified:

incubator/wicket/trunk/wicket-examples/src/main/java/wicket/examples/customresourceloading/CustomLoadedTemplate.html

Modified: 
incubator/wicket/trunk/wicket-examples/src/main/java/wicket/examples/customresourceloading/CustomLoadedTemplate.html
URL: 
http://svn.apache.org/viewvc/incubator/wicket/trunk/wicket-examples/src/main/java/wicket/examples/customresourceloading/CustomLoadedTemplate.html?view=diff&rev=497659&r1=497658&r2=497659
==
--- 
incubator/wicket/trunk/wicket-examples/src/main/java/wicket/examples/customresourceloading/CustomLoadedTemplate.html
 (original)
+++ 
incubator/wicket/trunk/wicket-examples/src/main/java/wicket/examples/customresourceloading/CustomLoadedTemplate.html
 Thu Jan 18 16:30:17 2007
@@ -13,8 +13,12 @@
to have to know about it's differing loading resource.
 
 
-   Note that while it is great to have this flexiblity, the further 
away you step from Wicket's default
-   way of doing things the harder it will get to figure out what your 
application is doing.
+   This example loads the custom template just once, though it may 
reload when resource polling is
+   turned on and the template changes. If you want a load the template 
every time a page (or panel)
+   is requested, you can additionally let your container implement 
IMarkupCacheKeyProvider, and then
+   return null in the implementation of getCacheKey; Wicket will not 
cache templates without a
+   cache key. This functionality can be used to e.g. when you want to 
load templates from a database,
+   and you know that the actual templates can be different from 
request to request.
 
 
 




svn commit: r497661 - in /incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket: ./ markup/ protocol/http/ resource/ settings/

2007-01-18 Thread ehillenius
Author: ehillenius
Date: Thu Jan 18 16:39:39 2007
New Revision: 497661

URL: http://svn.apache.org/viewvc?view=rev&rev=497661
Log:
WICKET-224

Added:

incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/markup/DefaultMarkupCacheKeyProvider.java

incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/markup/DefaultMarkupResourceStreamProvider.java

incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/markup/IMarkupCacheKeyProvider.java

incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/markup/IMarkupResourceStreamProvider.java
Modified:

incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/MarkupContainer.java

incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/markup/MarkupCache.java

incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/markup/MarkupResourceStream.java

incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/protocol/http/WebApplication.java

incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/resource/PropertiesFactory.java

incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/settings/IResourceSettings.java

incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/settings/Settings.java

Modified: 
incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/MarkupContainer.java
URL: 
http://svn.apache.org/viewvc/incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/MarkupContainer.java?view=diff&rev=497661&r1=497660&r2=497661
==
--- 
incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/MarkupContainer.java
 (original)
+++ 
incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/MarkupContainer.java
 Thu Jan 18 16:39:39 2007
@@ -28,18 +28,14 @@
 
 import wicket.feedback.IFeedback;
 import wicket.markup.ComponentTag;
-import wicket.markup.ContainerInfo;
 import wicket.markup.MarkupElement;
 import wicket.markup.MarkupException;
 import wicket.markup.MarkupNotFoundException;
-import wicket.markup.MarkupResourceStream;
 import wicket.markup.MarkupStream;
 import wicket.markup.WicketTag;
 import wicket.markup.resolver.IComponentResolver;
 import wicket.model.ICompoundModel;
 import wicket.model.IModel;
-import wicket.util.resource.IResourceStream;
-import wicket.util.resource.locator.IResourceStreamLocator;
 import wicket.util.string.Strings;
 import wicket.version.undo.Change;
 
@@ -849,52 +845,6 @@
+ " Enable debug 
messages for wicket.util.resource to get a list of all filenames tried"),
ex);
}
-   }
-
-   /**
-* Create a new markup resource stream for the container.
-* 
-* Note: it will only called once, the IResourceStream will be cached by
-* MarkupCache.
-* 
-* Note: IResourceStreamLocators should be used in case the strategy to 
find
-* a markup resource should be extended for ALL components of your
-* application.
-* 
-* @see wicket.util.resource.locator.IResourceStreamLocator
-* @see wicket.markup.MarkupCache
-* 
-* @param containerClass
-*The container the markup should be associated with
-* @return A IResourceStream if the resource was found
-*/
-   public IResourceStream newMarkupResourceStream(Class containerClass)
-   {
-   // Get locator to search for the resource
-   final IResourceStreamLocator locator = 
getApplication().getResourceSettings()
-   .getResourceStreamLocator();
-
-   // Markup is associated with the containers class. Walk up the 
class
-   // hierarchy up to MarkupContainer to find the containers markup
-   // resource.
-   while (containerClass != MarkupContainer.class)
-   {
-   final IResourceStream resourceStream = 
locator.locate(containerClass, containerClass
-   .getName().replace('.', '/'), 
getStyle(), getLocale(), getMarkupType());
-
-   // Did we find it already?
-   if (resourceStream != null)
-   {
-   return new MarkupResourceStream(resourceStream, 
new ContainerInfo(this),
-   containerClass);
-   }
-
-   // Walk up the class hierarchy one level, if markup has 
not
-   // yet been found
-   containerClass = containerClass.getSuperclass();
-   }
-
-   return null;
}
 
/**

Added: 
incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/markup/DefaultMarkupCacheKeyProvider.java
URL:

[jira] Created: (WICKET-224) Back port resource caching with component provided resource cache key

2007-01-18 Thread Eelco Hillenius (JIRA)
Back port resource caching with component provided resource cache key
-

 Key: WICKET-224
 URL: https://issues.apache.org/jira/browse/WICKET-224
 Project: Wicket
  Issue Type: Improvement
  Components: wicket
Reporter: Eelco Hillenius
 Fix For: 1.3


In 2.0 resource caching is overridable up to the component level, including 
providing a resource cache key for the resource stream. By providing a null 
resource cache key, you can achieve that the resource stream is never cached, 
which is something you need when you want to use a dynamic resource stream that 
can change over requests/ sessions. This is a request to back port that 
functionality, so that truly dynamic templates can be used in Wicket 1.3 as 
well.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] Resolved: (WICKET-224) Back port resource caching with component provided resource cache key

2007-01-18 Thread Eelco Hillenius (JIRA)

 [ 
https://issues.apache.org/jira/browse/WICKET-224?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eelco Hillenius resolved WICKET-224.


Resolution: Fixed

> Back port resource caching with component provided resource cache key
> -
>
> Key: WICKET-224
> URL: https://issues.apache.org/jira/browse/WICKET-224
> Project: Wicket
>  Issue Type: Improvement
>  Components: wicket
>Reporter: Eelco Hillenius
> Fix For: 1.3
>
>
> In 2.0 resource caching is overridable up to the component level, including 
> providing a resource cache key for the resource stream. By providing a null 
> resource cache key, you can achieve that the resource stream is never cached, 
> which is something you need when you want to use a dynamic resource stream 
> that can change over requests/ sessions. This is a request to back port that 
> functionality, so that truly dynamic templates can be used in Wicket 1.3 as 
> well.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] Closed: (WICKET-224) Back port resource caching with component provided resource cache key

2007-01-18 Thread Eelco Hillenius (JIRA)

 [ 
https://issues.apache.org/jira/browse/WICKET-224?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eelco Hillenius closed WICKET-224.
--


> Back port resource caching with component provided resource cache key
> -
>
> Key: WICKET-224
> URL: https://issues.apache.org/jira/browse/WICKET-224
> Project: Wicket
>  Issue Type: Improvement
>  Components: wicket
>Reporter: Eelco Hillenius
> Fix For: 1.3
>
>
> In 2.0 resource caching is overridable up to the component level, including 
> providing a resource cache key for the resource stream. By providing a null 
> resource cache key, you can achieve that the resource stream is never cached, 
> which is something you need when you want to use a dynamic resource stream 
> that can change over requests/ sessions. This is a request to back port that 
> functionality, so that truly dynamic templates can be used in Wicket 1.3 as 
> well.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] Commented: (WICKET-173) AjaxSelfUpdatingTimerBehavior only updates once in Safari browswer

2007-01-18 Thread Matej Knopp (JIRA)

[ 
https://issues.apache.org/jira/browse/WICKET-173?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12465928
 ] 

Matej Knopp commented on WICKET-173:


I have fixed this, can someone confirm it?

> AjaxSelfUpdatingTimerBehavior only updates once in Safari browswer
> --
>
> Key: WICKET-173
> URL: https://issues.apache.org/jira/browse/WICKET-173
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket
>Affects Versions: 2.0
> Environment: Mac OS X and Safari 2.0.4
>Reporter: Per Ejeklint
> Assigned To: Matej Knopp
>
> AjaxSelfUpdatingTimerBehavior does not work on Safari and Wicket 2.0. Or to 
> be precise, it updates ONCE and then stops, with the message "INFO: Chanel 
> busy - postponing..." in the Wicket Ajax Debug window. It works fine with 
> Firefox on Mac.
> A running example can be seen here: http://www.ejeklint.se/irrigator/ and the 
> source code is available by svn with "svn checkout 
> http://irrigator.googlecode.com/svn/trunk/ irrigator"

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira




svn commit: r497666 - /incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/MarkupContainer.java

2007-01-18 Thread ehillenius
Author: ehillenius
Date: Thu Jan 18 16:51:56 2007
New Revision: 497666

URL: http://svn.apache.org/viewvc?view=rev&rev=497666
Log:
added method again to help people with migrating (related to WICKET-224)

Modified:

incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/MarkupContainer.java

Modified: 
incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/MarkupContainer.java
URL: 
http://svn.apache.org/viewvc/incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/MarkupContainer.java?view=diff&rev=497666&r1=497665&r2=497666
==
--- 
incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/MarkupContainer.java
 (original)
+++ 
incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/MarkupContainer.java
 Thu Jan 18 16:51:56 2007
@@ -36,6 +36,7 @@
 import wicket.markup.resolver.IComponentResolver;
 import wicket.model.ICompoundModel;
 import wicket.model.IModel;
+import wicket.util.resource.IResourceStream;
 import wicket.util.string.Strings;
 import wicket.version.undo.Change;
 
@@ -845,6 +846,19 @@
+ " Enable debug 
messages for wicket.util.resource to get a list of all filenames tried"),
ex);
}
+   }
+
+   /**
+* NOT USED ANYMORE; it's here for helping people migrate from Wicket 
1.2 to Wicket 1.3
+* @param containerClass
+* @return nothing
+* @throws always throws an [EMAIL PROTECTED] IllegalStateException}
+*/
+   // TODO remove after release 1.3.0
+   public final IResourceStream newMarkupResourceStream(Class 
containerClass)
+   {
+   throw new IllegalStateException(
+   "this method is not used any more (and 
shouldn't be called by clients anyway)");
}
 
/**




[CONF] Apache Wicket: Migrate-1.3 (page edited)

2007-01-18 Thread confluence










Page Edited :
WICKET :
Migrate-1.3



 
Migrate-1.3
has been edited by Eelco Hillenius
(Jan 18, 2007).
 

  Change summary:
  Custom resource loading change

 
 (View changes)
 

Content:
Migrating to Wicket 1.3


API changes


Repeaters

The repeaters package has moved from wicket-extensions into core. The package name has been changed from wicket.extensions.markup.html.repeater to wicket.markup.repeater. Notice that only DataView and backing classes have moved, the higher level components such as the DataTable are still in wicket-extensions. Also notice that the names of classes have not changed so it should be a simple matter of ctrl-shift-o in your eclipse project to relink to the new classes.

DatePicker

the DatePicker component has been removed from the wicket-extensions package. It now lives as a separate project on http://wicket-stuff.sf.net/wicket-contrib-datepicker. If you require the datepicker to be present in your code, and don't want to use the new date picker component, then add the following depenency to your maven project (or download the distribution from sourceforge):


wicket-stuff
wicket-contrib-datepicker
1.2



ISessionStore

ISessionStore had the following changes:
 String getSessionId(Request request); -> String getSessionId(Request request, boolean create);
 + void onBeginRequest(Request request);
 + void onEndRequest(Request request);
 + PageMap createPageMap(String name, Session session);
By default, the creation of lasting sessions is deferred until actually needed. As long no lasting session is yet created and users are accessing stateless pages, a temporary session object is used for the current request.

Button

AjaxSubmitButton and AjaxSubmitLink now extend Button and Button extends IFormSubmittingComponent. As a result of this, method onSubmit changed from protected to public

IHeaderContributor

void renderHead(final Response response); -> void renderHead(final IHeaderResponse response);
This resulted in a couple of cascading changes, like methods onRenderHeadContribution and onRenderHeadInitContribution not being used anymore. Note that the filtering of duplicate contributions is now part of IHeaderResponse.
A common fix is this:

protected void onRenderHeadInitContribution(Response response) {
writeJsReference(response, AUTOCOMPLETE_JS);
  }

should be converted to:

public void renderHead(IHeaderResponse response) {
super.renderHead(response);
response.renderJavascriptReference(AUTOCOMPLETE_JS);
  }

or for instance code like

protected String getImplementationId() {
  return "ArchiveActions";
}

protected void onRenderHeadContribution(Response response) {
  if (!isComplete()) {
response.write("");
response.write(getCallbackScript().toString());
response.write("");
  }
}

would be rewritten like

public void renderHead(IHeaderResponse response) {
  if (!isComplete()) {
response.renderJavascript(getCallbackScript(), "ArchiveActions");
  }
}


ISessionFactory

Session newSession() -> Session newSession(Request)

WicketServlet -> WicketFilter

In Wicket 2.0 and 1.3 we now prefer using a Filter instead of a Servlet. This allows you to map your application to the root of your context and still let the container serve resources.

If you use a URL pattern in your filter mapping, you need to specify that also as an init-param to the WicketFilter.


StatelessApplication
wicket.protocol.http.WicketFilter

applicationClassName
wicket.examples.stateless.StatelessApplication


filterPath
stateless




StatelessApplication
/stateless/*




FormComponent.IVisitor

Things have been refactored into interfaces here. If you previously implemented this directly, extend FormComponent.AbstractVisitor instead, and rename your formComponent() implementation to onFormComponent().


ClientProperties

wicket.protocol.http.ClientProperties was taken from the Echo2 project that uses a license which is incompatible with ASL2. It has therefore been rewritten and the usage of it has also changed.

Instead of:


WebClientInfo clientInfo = (WebClientInfo) Session.get().getClientInfo();
ClientProperties properties = clientInfo.getProperties();

// Before constants where used to get properties
System.out.println(properties.get(ClientProperties.BROWSER_INTERNET_EXPLORER));


You now say:

WebClientInfo clientInfo = (WebClientInfo) Session.get().getClientInfo();
ClientProperties properties = clientInfo.getProperties();

// Now you use a property with that name instead
System.out.println(properties.isBrowserInternetExplorer());



Application settings

Application#getSettings is now private (so you can't call nor override that anymore), and the getXxxSettings are now overridable in case you want to do fancy st

svn commit: r497719 - /incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/markup/parser/filter/WicketMessageTagHandler.java

2007-01-18 Thread ivaynberg
Author: ivaynberg
Date: Thu Jan 18 23:10:26 2007
New Revision: 497719

URL: http://svn.apache.org/viewvc?view=rev&rev=497719
Log:
enable by default!

Modified:

incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/markup/parser/filter/WicketMessageTagHandler.java

Modified: 
incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/markup/parser/filter/WicketMessageTagHandler.java
URL: 
http://svn.apache.org/viewvc/incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/markup/parser/filter/WicketMessageTagHandler.java?view=diff&rev=497719&r1=497718&r2=497719
==
--- 
incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/markup/parser/filter/WicketMessageTagHandler.java
 (original)
+++ 
incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/markup/parser/filter/WicketMessageTagHandler.java
 Thu Jan 18 23:10:26 2007
@@ -49,7 +49,7 @@
 * globally enable wicket:message; If accepted by user, we should use an
 * apps setting
 */
-   public static boolean enable = false;
+   public static final boolean enable = true;
 
/**
 * The MarkupContainer requesting the information incl. class, locale 
and




svn commit: r497720 - /incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/markup/parser/filter/WicketMessageTagHandler.java

2007-01-18 Thread ivaynberg
Author: ivaynberg
Date: Thu Jan 18 23:10:40 2007
New Revision: 497720

URL: http://svn.apache.org/viewvc?view=rev&rev=497720
Log:
javadoc fix

Modified:

incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/markup/parser/filter/WicketMessageTagHandler.java

Modified: 
incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/markup/parser/filter/WicketMessageTagHandler.java
URL: 
http://svn.apache.org/viewvc/incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/markup/parser/filter/WicketMessageTagHandler.java?view=diff&rev=497720&r1=497719&r2=497720
==
--- 
incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/markup/parser/filter/WicketMessageTagHandler.java
 (original)
+++ 
incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/markup/parser/filter/WicketMessageTagHandler.java
 Thu Jan 18 23:10:40 2007
@@ -29,8 +29,6 @@
 import wicket.settings.IResourceSettings;
 
 /**
- * THIS IS EXPERIMENTAL ONLY AND DISABLED BY DEFAULT
- * 
  * This is a markup inline filter. It identifies wicket:message attributes and
  * replaces the attributes referenced. E.g. wicket:message="value=key" would
  * replace or add the attribute "value" with the message associated with "key".