[jira] Created: (WICKET-923) Back button browser problem and ajax

2007-09-04 Thread Stanislav Dvorscak (JIRA)
Back button browser problem and ajax


 Key: WICKET-923
 URL: https://issues.apache.org/jira/browse/WICKET-923
 Project: Wicket
  Issue Type: Bug
  Components: wicket-extensions
Affects Versions: 1.3.0-beta3
 Environment: gnome on gentoo linux / windows xp, Firefox 2.0.0.6
Reporter: Stanislav Dvorscak


- I have problem with the Firefox browser. I attach a example. When you click 
on link select, than on link 1 and click on back button of Firefox browser, 
than I have exception. Please see exception below. This problem is only on the 
Firefox browser. I have no problem with this on the Internet explorer.

WicketMessage: component homePanel:linksTable:rows:3:cells:2:cell:ajaxLink not 
found on page wicket.HomePage[id = 0], listener interface = 
[RequestListenerInterface name=IBehaviorListener, method=public abstract void 
org.apache.wicket.behavior.IBehaviorListener.onRequest()]

Root cause:

org.apache.wicket.WicketRuntimeException: component 
homePanel:linksTable:rows:3:cells:2:cell:ajaxLink not found on page 
wicket.HomePage[id = 0], listener interface = [RequestListenerInterface 
name=IBehaviorListener, method=public abstract void 
org.apache.wicket.behavior.IBehaviorListener.onRequest()]
at 
org.apache.wicket.request.AbstractRequestCycleProcessor.resolveListenerInterfaceTarget(AbstractRequestCycleProcessor.java:394)
at 
org.apache.wicket.request.AbstractRequestCycleProcessor.resolveRenderedPage(AbstractRequestCycleProcessor.java:440)
at 
org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:139)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1091)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1177)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:500)
at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:261)
at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:127)
at 
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1089)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:365)
at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
at org.mortbay.jetty.Server.handle(Server.java:295)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:503)
at 
org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:827)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:511)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:210)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:379)
at 
org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:226)
at 
org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (WICKET-923) Back button browser problem and ajax

2007-09-04 Thread Stanislav Dvorscak (JIRA)

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

Stanislav Dvorscak updated WICKET-923:
--

Attachment: bug.tar.gz

example wicket app of this bug

 Back button browser problem and ajax
 

 Key: WICKET-923
 URL: https://issues.apache.org/jira/browse/WICKET-923
 Project: Wicket
  Issue Type: Bug
  Components: wicket-extensions
Affects Versions: 1.3.0-beta3
 Environment: gnome on gentoo linux / windows xp, Firefox 2.0.0.6
Reporter: Stanislav Dvorscak
 Attachments: bug.tar.gz


 - I have problem with the Firefox browser. I attach a example. When you click 
 on link select, than on link 1 and click on back button of Firefox 
 browser, than I have exception. Please see exception below. This problem is 
 only on the Firefox browser. I have no problem with this on the Internet 
 explorer.
 WicketMessage: component homePanel:linksTable:rows:3:cells:2:cell:ajaxLink 
 not found on page wicket.HomePage[id = 0], listener interface = 
 [RequestListenerInterface name=IBehaviorListener, method=public abstract void 
 org.apache.wicket.behavior.IBehaviorListener.onRequest()]
 Root cause:
 org.apache.wicket.WicketRuntimeException: component 
 homePanel:linksTable:rows:3:cells:2:cell:ajaxLink not found on page 
 wicket.HomePage[id = 0], listener interface = [RequestListenerInterface 
 name=IBehaviorListener, method=public abstract void 
 org.apache.wicket.behavior.IBehaviorListener.onRequest()]
 at 
 org.apache.wicket.request.AbstractRequestCycleProcessor.resolveListenerInterfaceTarget(AbstractRequestCycleProcessor.java:394)
 at 
 org.apache.wicket.request.AbstractRequestCycleProcessor.resolveRenderedPage(AbstractRequestCycleProcessor.java:440)
 at 
 org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:139)
 at org.apache.wicket.RequestCycle.step(RequestCycle.java:1091)
 at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1177)
 at org.apache.wicket.RequestCycle.request(RequestCycle.java:500)
 at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:261)
 at 
 org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:127)
 at 
 org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1089)
 at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:365)
 at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
 at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
 at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
 at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
 at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
 at org.mortbay.jetty.Server.handle(Server.java:295)
 at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:503)
 at 
 org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:827)
 at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:511)
 at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:210)
 at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:379)
 at 
 org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:226)
 at 
 org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (WICKET-923) Back button browser problem and ajax

2007-09-04 Thread Stanislav Dvorscak (JIRA)

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

Stanislav Dvorscak updated WICKET-923:
--

Description: 
- I have problem with the Firefox browser. I attach a example. When you click 
on link select, than on link 1 and then on link select click on back 
button of Firefox browser, than I have exception. Please see exception below. 
This problem is only on the Firefox browser. I have no problem with this on the 
Internet explorer.

WicketMessage: component homePanel:linksTable:rows:3:cells:2:cell:ajaxLink not 
found on page wicket.HomePage[id = 0], listener interface = 
[RequestListenerInterface name=IBehaviorListener, method=public abstract void 
org.apache.wicket.behavior.IBehaviorListener.onRequest()]

Root cause:

org.apache.wicket.WicketRuntimeException: component 
homePanel:linksTable:rows:3:cells:2:cell:ajaxLink not found on page 
wicket.HomePage[id = 0], listener interface = [RequestListenerInterface 
name=IBehaviorListener, method=public abstract void 
org.apache.wicket.behavior.IBehaviorListener.onRequest()]
at 
org.apache.wicket.request.AbstractRequestCycleProcessor.resolveListenerInterfaceTarget(AbstractRequestCycleProcessor.java:394)
at 
org.apache.wicket.request.AbstractRequestCycleProcessor.resolveRenderedPage(AbstractRequestCycleProcessor.java:440)
at 
org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:139)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1091)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1177)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:500)
at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:261)
at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:127)
at 
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1089)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:365)
at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
at org.mortbay.jetty.Server.handle(Server.java:295)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:503)
at 
org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:827)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:511)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:210)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:379)
at 
org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:226)
at 
org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)

  was:
- I have problem with the Firefox browser. I attach a example. When you click 
on link select, than on link 1 and click on back button of Firefox browser, 
than I have exception. Please see exception below. This problem is only on the 
Firefox browser. I have no problem with this on the Internet explorer.

WicketMessage: component homePanel:linksTable:rows:3:cells:2:cell:ajaxLink not 
found on page wicket.HomePage[id = 0], listener interface = 
[RequestListenerInterface name=IBehaviorListener, method=public abstract void 
org.apache.wicket.behavior.IBehaviorListener.onRequest()]

Root cause:

org.apache.wicket.WicketRuntimeException: component 
homePanel:linksTable:rows:3:cells:2:cell:ajaxLink not found on page 
wicket.HomePage[id = 0], listener interface = [RequestListenerInterface 
name=IBehaviorListener, method=public abstract void 
org.apache.wicket.behavior.IBehaviorListener.onRequest()]
at 
org.apache.wicket.request.AbstractRequestCycleProcessor.resolveListenerInterfaceTarget(AbstractRequestCycleProcessor.java:394)
at 
org.apache.wicket.request.AbstractRequestCycleProcessor.resolveRenderedPage(AbstractRequestCycleProcessor.java:440)
at 
org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:139)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1091)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1177)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:500)
at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:261)
at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:127)
at 
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1089)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:365)
at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
at 

[jira] Updated: (WICKET-923) Back button browser problem and ajax

2007-09-04 Thread Stanislav Dvorscak (JIRA)

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

Stanislav Dvorscak updated WICKET-923:
--

Description: 
- I have problem with the Firefox browser. I attach a example. When you click 
on link select, than on link 1 and then click on back button of Firefox 
browser, and than on link select , than I have exception. Please see 
exception below. This problem is only on the Firefox browser. I have no problem 
with this on the Internet explorer.

WicketMessage: component homePanel:linksTable:rows:3:cells:2:cell:ajaxLink not 
found on page wicket.HomePage[id = 0], listener interface = 
[RequestListenerInterface name=IBehaviorListener, method=public abstract void 
org.apache.wicket.behavior.IBehaviorListener.onRequest()]

Root cause:

org.apache.wicket.WicketRuntimeException: component 
homePanel:linksTable:rows:3:cells:2:cell:ajaxLink not found on page 
wicket.HomePage[id = 0], listener interface = [RequestListenerInterface 
name=IBehaviorListener, method=public abstract void 
org.apache.wicket.behavior.IBehaviorListener.onRequest()]
at 
org.apache.wicket.request.AbstractRequestCycleProcessor.resolveListenerInterfaceTarget(AbstractRequestCycleProcessor.java:394)
at 
org.apache.wicket.request.AbstractRequestCycleProcessor.resolveRenderedPage(AbstractRequestCycleProcessor.java:440)
at 
org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:139)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1091)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1177)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:500)
at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:261)
at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:127)
at 
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1089)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:365)
at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
at org.mortbay.jetty.Server.handle(Server.java:295)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:503)
at 
org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:827)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:511)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:210)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:379)
at 
org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:226)
at 
org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)

  was:
- I have problem with the Firefox browser. I attach a example. When you click 
on link select, than on link 1 and then on link select click on back 
button of Firefox browser, than I have exception. Please see exception below. 
This problem is only on the Firefox browser. I have no problem with this on the 
Internet explorer.

WicketMessage: component homePanel:linksTable:rows:3:cells:2:cell:ajaxLink not 
found on page wicket.HomePage[id = 0], listener interface = 
[RequestListenerInterface name=IBehaviorListener, method=public abstract void 
org.apache.wicket.behavior.IBehaviorListener.onRequest()]

Root cause:

org.apache.wicket.WicketRuntimeException: component 
homePanel:linksTable:rows:3:cells:2:cell:ajaxLink not found on page 
wicket.HomePage[id = 0], listener interface = [RequestListenerInterface 
name=IBehaviorListener, method=public abstract void 
org.apache.wicket.behavior.IBehaviorListener.onRequest()]
at 
org.apache.wicket.request.AbstractRequestCycleProcessor.resolveListenerInterfaceTarget(AbstractRequestCycleProcessor.java:394)
at 
org.apache.wicket.request.AbstractRequestCycleProcessor.resolveRenderedPage(AbstractRequestCycleProcessor.java:440)
at 
org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:139)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1091)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1177)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:500)
at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:261)
at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:127)
at 
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1089)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:365)
at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
at 

svn commit: r572596 - /wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.4/wicket/src/main/java/org/apache/wicket/Component.java

2007-09-04 Thread ate
Author: ate
Date: Tue Sep  4 02:55:58 2007
New Revision: 572596

URL: http://svn.apache.org/viewvc?rev=572596view=rev
Log:
WICKET-650: New Wicket Portlet support: use a RequestContext for abstracted url 
generation,  writing header response and namespacing
See: https://issues.apache.org/jira/browse/WICKET-650#action_12504782
- proper namespacing Component.getMarkupId()



Modified:

wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.4/wicket/src/main/java/org/apache/wicket/Component.java

Modified: 
wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.4/wicket/src/main/java/org/apache/wicket/Component.java
URL: 
http://svn.apache.org/viewvc/wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.4/wicket/src/main/java/org/apache/wicket/Component.java?rev=572596r1=572595r2=572596view=diff
==
--- 
wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.4/wicket/src/main/java/org/apache/wicket/Component.java
 (original)
+++ 
wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.4/wicket/src/main/java/org/apache/wicket/Component.java
 Tue Sep  4 02:55:58 2007
@@ -1232,7 +1232,7 @@
// {
// if not in the markup, generate one
 
-   markupId = getId() + page.getAutoIndex();
+markupId = RequestContext.get().encodeMarkupId(getId() + 
page.getAutoIndex());
// make sure id is compliant with w3c requirements 
(starts with a
// letter)
char c = markupId.charAt(0);




[jira] Commented: (WICKET-908) There is no way to specify what exceptions to log in RequestCycle

2007-09-04 Thread Chuck Deal (JIRA)

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

Chuck Deal commented on WICKET-908:
---

This didn't get reverted properly.  The logic (in at least RequestCycle) got 
inverted.  

IS:

if (e instanceof PageExpiredException)
{
logRuntimeException(e);
}

WAS (and should be):

if (!(e instanceof PageExpiredException))
{
logRuntimeException(e);
}


 There is no way to specify what exceptions to log in RequestCycle
 -

 Key: WICKET-908
 URL: https://issues.apache.org/jira/browse/WICKET-908
 Project: Wicket
  Issue Type: Bug
  Components: wicket
Affects Versions: 1.3.0-beta3
Reporter: Marat Radchenko
Assignee: Juergen Donnerstag
Priority: Critical
 Fix For: 1.3.0-beta4


 RequestCycle, line 1135 logs all exceptions except for PageExpiredException. 
 This is not a wanted behavior for us (for example, it also logs 
 AuthorizationException which is not a error).
 So we need some way to specify which exceptions should be treated as errors 
 and which ones are just need to be handled by 
 RequestCycleProcessor#respond(RuntimeException, RequestCycle).
 Maybe there is some way to globally catch application exceptions other than 
 writing a custom RequestCycleProcessor. If so then tell me please.
 The possible solution is to move exception logging to 
 RequestCycleProcessor#respond(RuntimeException, RequestCycle) because it can 
 be overriden.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Created: (WICKET-926) New Wicket Portlet support: Support for detached/popup pages

2007-09-04 Thread Ate Douma (JIRA)
New Wicket Portlet support: Support for detached/popup pages


 Key: WICKET-926
 URL: https://issues.apache.org/jira/browse/WICKET-926
 Project: Wicket
  Issue Type: Sub-task
  Components: wicket, wicket-portlet
Affects Versions: 1.3.0-beta3
Reporter: Ate Douma
Assignee: Ate Douma


Supporting statefull detached/popup pages from a Portlet is tricky business.
With JSR-168, Portlet API 1.0, this is completely impossible without using 
portal specific extensions.

In JSR-168, a portlet is only allowed to write out content the render phase.
That content is, potentially together with content produced by other portlets, 
aggregated by the portal in one single page before it is send out to the client.
Furthermore, as each render or action request may change portlet navigational 
state maintained by the portal, even if you would create a page with a single 
portlet, interacting with that portlet through the popup window can cause 
navigational state changes which is not reflected on the page containing the 
original portlet initiating the popup page (window). So, after coming back to 
that portlet window, interacting with it might result in unexpected/invalid 
behavior.

But, with JSR-286, Portlet API 2.0, this now changes :)
The new Portlet ResourceURL and serveResource phase will allow directly 
calling a portlet, albeit still only through the portal, and has full control 
over the response/content it produces.
Furthermore, navigational state changes are not allowed/possible during 
serverResource thus there is less danger of inconsistent state between the two 
browser windows. Note: you are allowed to changes server state like the session 
or the portlet preferences.

Using the preliminary, pre-JSR-286 support for ResourceURLs from Apache Portals 
Bridges (PB-65) which I already integrated in wicket, rendering detached/popup 
pages is possible to implement.
Although, because JSR-286 nor container implementations are available yet, at 
runtime we still need a portal specific implementation for handling 
ResourceURLs.

But, for Wicket there is another problem: how to detect when a page url is 
going to be used for opening a popup page?

There are many different ways to create an url, but in a servlet environment, 
it doesn't matter if it will be used as popup or not: they are just the same.
All (most all) Wicket url generation is manged through RequestCycle.urlFor(..) 
calls which delegates this in the end to the RequestEncodingStrategy.encode(..).
For Wicket portlet-support, the only sensible location to intercept page url 
generation is within the RequestEncodingStrategy.encode(..) method, see 
WICKET-655, but there it is currently impossible to detect what the usage of 
the url will be (popup or non-popup).

To solve this there are 3 different solutions AFAICS:
a) Add a boolean popup parameter to to RequestEncodingStrategry.encode(...)
This solution will have a very big cascading effect as this means adding this 
parameter to all RequestCycle urlFor methods, and from there to Component and 
all its children which override or call that method. Of course, the current 
method signatures should also be preserved with a default value false, but 
still ...

b) Find some other way to pass the popup target information through the calling 
chain, like setting some transient property on the (page) Component.
This won't be possible with one a single solution though as there are so many 
different ways urlFor can be called.

c) Add a hacky temporary flag in RequestCycle only valid for the duration of 
one urlFor method call, indicating if the next call is intended for a popup or 
not.
Yes, I know this isn't going to win a coding beauty contest either, but neither 
will the above alternatives.

As solution c) is at least the least intrusive, I've chosen to implemented that 
for now.
I'm definitely all ears if someone can come up with: hey dude, that's what I 
call mighty stupid! Why not use this much easier and cleaner solution... :)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



svn commit: r572694 - in /wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.4: wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/ wicket/src/main/java/org/apac

2007-09-04 Thread ate
Author: ate
Date: Tue Sep  4 07:47:41 2007
New Revision: 572694

URL: http://svn.apache.org/viewvc?rev=572694view=rev
Log:
WICKET-926: New Wicket Portlet support: Support for detached/popup pages
See: https://issues.apache.org/jira/browse/WICKET-926
- Implementing a somewhat hacky solution which involves setting a temporary 
flag in RequestCycle to indicate the next urlFor call is targetted at a popup 
page
- Hooking this solution in the Link and ModalWindow as example
  There are maybe more locations in the codebase requesting page urls for popup 
usage, but this should already cover most cases.

Modified:

wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/ModalWindow.java

wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.4/wicket/src/main/java/org/apache/wicket/RequestCycle.java

wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/link/Link.java

Modified: 
wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/ModalWindow.java
URL: 
http://svn.apache.org/viewvc/wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/ModalWindow.java?rev=572694r1=572693r2=572694view=diff
==
--- 
wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/ModalWindow.java
 (original)
+++ 
wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/ModalWindow.java
 Tue Sep  4 07:47:41 2007
@@ -927,6 +927,7 @@
{
throw new WicketRuntimeException(Error 
creating page for modal dialog.);
}
+   RequestCycle.get().setNextUrlForNewWindow();
buffer.append(settings.src=\ + 
RequestCycle.get().urlFor(page) + \;\n);
 
if (getPageMapName() != null)

Modified: 
wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.4/wicket/src/main/java/org/apache/wicket/RequestCycle.java
URL: 
http://svn.apache.org/viewvc/wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.4/wicket/src/main/java/org/apache/wicket/RequestCycle.java?rev=572694r1=572693r2=572694view=diff
==
--- 
wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.4/wicket/src/main/java/org/apache/wicket/RequestCycle.java
 (original)
+++ 
wicket/branches/wicket-1.3.0-beta3-portlet-support/jdk-1.4/wicket/src/main/java/org/apache/wicket/RequestCycle.java
 Tue Sep  4 07:47:41 2007
@@ -267,6 +267,13 @@
 
/** The current response. */
protected Response response;
+   
+   /**
+* Boolean if the next urlFor call is intended for a new window 
(ModalWindow, popup, tab).
+* This temporary flag is specifically needed for portlet-support as 
then such a page needs a special target (Resource) url.
+* After each urlFor call, this flag is reset to false.
+*/
+   private transient boolean nextUrlForNewWindow;
 
/**
 * Constructor. This instance will be set as the current one for this
@@ -687,6 +694,30 @@
}
 
/**
+* @return true if the page is intended to be displayed in a new window 
(ModalWindow, popup, tab).
+*/
+   public final boolean isNextUrlForNewWindow()
+   {
+   return nextUrlForNewWindow;
+   }
+   
+   /**
+* Indicate if the next urlFor call is intended for a new window 
(ModalWindow, popup, tab).
+* This temporary flag is specifically needed for portlet-support as 
then such a page needs a special target (Resource) url.
+* After each urlFor call, this flag is reset to false.
+*/
+   public final void setNextUrlForNewWindow()
+   {
+   nextUrlForNewWindow = true;
+   }
+   
+   private final CharSequence resetNextUrlForNewWindow(CharSequence url)
+   {
+   nextUrlForNewWindow = false;
+   return url;
+   }
+   
+   /**
 * Returns a bookmarkable URL that references a given page class using a
 * given set of page parameters. Since the URL which is returned 
contains
 * all information necessary to instantiate and render the page, it can 
be
@@ -745,7 +776,7 @@
listener, params);
final IRequestCodingStrategy requestCodingStrategy = 
getProcessor()
.getRequestCodingStrategy();
-   return requestCodingStrategy.encode(this, target);
+  

[jira] Updated: (WICKET-117) Page expired using ajax

2007-09-04 Thread Martijn Dashorst (JIRA)

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

Martijn Dashorst updated WICKET-117:


Fix Version/s: 1.2.7

 Page expired using ajax
 ---

 Key: WICKET-117
 URL: https://issues.apache.org/jira/browse/WICKET-117
 Project: Wicket
  Issue Type: Bug
  Components: wicket
Affects Versions: 1.2.2, 1.2.3, 1.2.6
Reporter: Adam Smyczek
Assignee: Johan Compagner
 Fix For: 1.2.7


 We are still getting page expired using wicket with ajax. The problem is 
 related to the PageMap and occurs as following:
 1. We have a page with an ajax time behavior that updates a status every 2 
 sec. This page is the most top one on the page map stack. 
 2. On this page you click the link to go to another page. The new page is 
 added to the page stack but the response is expensive, let's say it take 1-2 
 sec. to build the page.
 3. During the response is processed, the browser triggers the ajax request, 
 to the server. The request goes to the PageMap to get the current page.
 The page of the ajax request is the second top one on the stack, so the 
 current code assumes the user clicked the back button and removes the 
 top one page.
 4. In the browser everything seams to be ok, but the page in the browser and 
 in the PageMap don't match anymore. So any new request to the server will 
 cause page expired.
 This is very simple to reproduce, following is a snippet for the quickstart:
 --- Index.java ---
 public class Index extends QuickStartPage
 {
   public Index(final PageParameters parameters)
   {
   // link to the same page
   Link link = new Link(link)
   {
   public void onClick()
   {
   setResponsePage(Index.class);
   }
   };
   add(link);
   // we just need a delayed call to the server
   AjaxEventBehavior behavrior = new AjaxEventBehavior(onClick)
   {
   protected void onEvent(AjaxRequestTarget target)
   {
   }
   };
   behavrior.setThrottleDelay(Duration.milliseconds(200));
   link.add(behavrior);
   }
   protected void onAfterRender()
   {
   // simulate expensive response
   try
   {
   Thread.sleep(500);
   }
   catch (InterruptedException e)
   {
   e.printStackTrace();
   }
   }
 }
 --- Index.html ---
 html
 body
   a wicket:id=linkClick/a
 /body
 /html
 I used Firefox only to reproduce it, not sure if this occurs with other 
 browser as well.
 We have a small workaround('fix') for it. In 
 DefaultRequestTargetResolverStrategy we check the type of the request. If it 
 is a IUnversionedBehaviorListener, we don't update the PageMap in the 
 access() method. It is not a clean solution but it works so far.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Closed: (WICKET-677) Move mailinglists to wicket.apache.org

2007-09-04 Thread Martijn Dashorst (JIRA)

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

Martijn Dashorst closed WICKET-677.
---

Resolution: Fixed

 Move mailinglists to wicket.apache.org
 --

 Key: WICKET-677
 URL: https://issues.apache.org/jira/browse/WICKET-677
 Project: Wicket
  Issue Type: Sub-task
Reporter: Martijn Dashorst

 - mailinglists: 
  [EMAIL PROTECTED] - [EMAIL PROTECTED]
  [EMAIL PROTECTED] - [EMAIL PROTECTED]
  [EMAIL PROTECTED] - [EMAIL PROTECTED]
  [EMAIL PROTECTED] - [EMAIL PROTECTED]
  [EMAIL PROTECTED] - remove?
 Please coordinate with Nabble, Gmane and other mail archives to reflect these 
 changes.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Created: (WICKET-927) Deprecate Fragment constructors that dont take a markup provider

2007-09-04 Thread Oli Evans (JIRA)
Deprecate Fragment constructors that dont take a markup provider


 Key: WICKET-927
 URL: https://issues.apache.org/jira/browse/WICKET-927
 Project: Wicket
  Issue Type: Improvement
  Components: wicket
Affects Versions: 1.3.0-beta3
Reporter: Oli Evans
Priority: Minor
 Fix For: 1.3.0-final


From the wicket dev mailing list:

seems this is confusing a lot of users and it doesnt work the greatest, so
here is a vote

so the vote is to deprecate the constructor variants that do not take a
markup provider as an arg.

-igor


On 8/29/07, Oli Evans [EMAIL PROTECTED] wrote:
 
  I just lost a few hours on a problem where an ajax operation on a Panel
  nested in a Fragment was failing as my nested panel could not find its
  associated markup. It seems this was because a Fragment will only
  reliably find its markup if you explicitly provide it with the Component
  that contains its markup in the Fragment constructor.
 
  If you don't, Fragment.getAssociatedMarkupStream() will find its
  markupProvider field is null, and so have to take a guess at where its
  markup might be. If your fragment usage happens to be as a direct child
  of the component that defines the fragment markup then it will all work
  out, but if you have nested it in something like a ListView then it will
  fail.
 
  ...So watch out kids, if you use fragments, use a constructor that tells
  it where its markup is. Would you like to have to guess who your real
  parents are? I think not.
 
  Oli

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (WICKET-927) Deprecate Fragment constructors that dont take a markup provider

2007-09-04 Thread Oli Evans (JIRA)

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

Oli Evans updated WICKET-927:
-

Fix Version/s: (was: 1.3.0-final)

 Deprecate Fragment constructors that dont take a markup provider
 

 Key: WICKET-927
 URL: https://issues.apache.org/jira/browse/WICKET-927
 Project: Wicket
  Issue Type: Improvement
  Components: wicket
Affects Versions: 1.3.0-beta3
Reporter: Oli Evans
Priority: Minor

 From the wicket dev mailing list:
 seems this is confusing a lot of users and it doesnt work the greatest, so
 here is a vote
 so the vote is to deprecate the constructor variants that do not take a
 markup provider as an arg.
 -igor
 On 8/29/07, Oli Evans [EMAIL PROTECTED] wrote:
  
   I just lost a few hours on a problem where an ajax operation on a Panel
   nested in a Fragment was failing as my nested panel could not find its
   associated markup. It seems this was because a Fragment will only
   reliably find its markup if you explicitly provide it with the Component
   that contains its markup in the Fragment constructor.
  
   If you don't, Fragment.getAssociatedMarkupStream() will find its
   markupProvider field is null, and so have to take a guess at where its
   markup might be. If your fragment usage happens to be as a direct child
   of the component that defines the fragment markup then it will all work
   out, but if you have nested it in something like a ListView then it will
   fail.
  
   ...So watch out kids, if you use fragments, use a constructor that tells
   it where its markup is. Would you like to have to guess who your real
   parents are? I think not.
  
   Oli

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Created: (WICKET-928) Exception when clicking two times rapidly on the next button in a wizard

2007-09-04 Thread JIRA
Exception when clicking two times rapidly on the next button in a wizard
--

 Key: WICKET-928
 URL: https://issues.apache.org/jira/browse/WICKET-928
 Project: Wicket
  Issue Type: Bug
  Components: wicket-extensions
Affects Versions: 1.3.0-beta3, 1.3.0-beta2
Reporter: Joël Vimenet


On a tree steps wizard, the first step contains two fields without any 
validation. The second one contains only one field that must be an integer. The 
last step will display the data entered in the two first steps.
When I am on the first step, and I click two times rapidly on the next 
button, it throws an exception.
Here is the stack trace : 

--

WicketMessage: Method onFormSubmitted of interface 
org.apache.wicket.markup.html.form.IFormSubmitListener targeted at component 
[MarkupContainer [Component id = form, page = test.www.factory.TestPage, path = 
0:wizard:form.Form, isVisible = true, isVersioned = false]] threw an exception

Root cause:

java.lang.NullPointerException
at 
org.apache.wicket.util.convert.converters.AbstractConverter.parse(AbstractConverter.java:50)
at 
org.apache.wicket.util.convert.converters.AbstractNumberConverter.parse(AbstractNumberConverter.java:71)
at 
org.apache.wicket.util.convert.converters.IntegerConverter.convertToObject(IntegerConverter.java:44)
at 
org.apache.wicket.markup.html.form.FormComponent.convertInput(FormComponent.java:1159)
at 
org.apache.wicket.markup.html.form.FormComponent.validate(FormComponent.java:1027)
at org.apache.wicket.markup.html.form.Form$15.validate(Form.java:1671)
at 
org.apache.wicket.markup.html.form.Form$ValidationVisitor.formComponent(Form.java:160)
at 
org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrderHelper(FormComponent.java:403)
at 
org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrderHelper(FormComponent.java:390)
at 
org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrderHelper(FormComponent.java:390)
at 
org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrderHelper(FormComponent.java:390)
at 
org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrder(FormComponent.java:368)
at 
org.apache.wicket.markup.html.form.Form.visitFormComponentsPostOrder(Form.java:1004)
at org.apache.wicket.markup.html.form.Form.validateComponents(Form.java:1667)
at org.apache.wicket.markup.html.form.Form.validate(Form.java:1658)
at org.apache.wicket.markup.html.form.Form.process(Form.java:811)
at org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:783)
at java.lang.reflect.Method.invoke(Method.java:585)
at 
org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:186)
at 
org.apache.wicket.request.target.component.listener.ListenerInterfaceRequestTarget.processEvents(ListenerInterfaceRequestTarget.java:73)
at 
org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:90)
at 
org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1032)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1108)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1177)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:500)
at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:261)
at org.apache.wicket.protocol.http.WicketServlet.doPost(WicketServlet.java:144)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)
at 
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at 
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
at 
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
at java.lang.Thread.run(Thread.java:595)

Complete stack:


svn commit: r572760 - in /wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket: RequestCycle.java protocol/http/WebRequestCycle.java

2007-09-04 Thread jdonnerstag
Author: jdonnerstag
Date: Tue Sep  4 10:59:30 2007
New Revision: 572760

URL: http://svn.apache.org/viewvc?rev=572760view=rev
Log:
ups. now reverted correctly

Modified:

wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/RequestCycle.java

wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/WebRequestCycle.java

Modified: 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/RequestCycle.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/RequestCycle.java?rev=572760r1=572759r2=572760view=diff
==
--- 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/RequestCycle.java 
(original)
+++ 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/RequestCycle.java 
Tue Sep  4 10:59:30 2007
@@ -1118,7 +1118,7 @@
// probably our last chance the exception can 
be logged.
// Note that a PageExpiredException should not 
be logged, because
// it's not an internal error
-   if (e instanceof PageExpiredException)
+   if (!(e instanceof PageExpiredException))
{
logRuntimeException(e);
}

Modified: 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/WebRequestCycle.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/WebRequestCycle.java?rev=572760r1=572759r2=572760view=diff
==
--- 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/WebRequestCycle.java
 (original)
+++ 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/WebRequestCycle.java
 Tue Sep  4 10:59:30 2007
@@ -212,7 +212,7 @@
throw ex;
}
 
-   if (ex instanceof PageExpiredException)
+   if (!(ex instanceof PageExpiredException))
{
logRuntimeException(ex);
}




[jira] Created: (WICKET-929) ExceptionErrorPage only works with WebResponse (get HTML source code from a wicket page)

2007-09-04 Thread Oliver Henlich (JIRA)
ExceptionErrorPage only works with WebResponse (get HTML source code from a 
wicket page)


 Key: WICKET-929
 URL: https://issues.apache.org/jira/browse/WICKET-929
 Project: Wicket
  Issue Type: Bug
  Components: wicket
Affects Versions: 1.3.0-beta3
Reporter: Oliver Henlich


Trying to get the html source of a wicket page by making the RequestCycle write 
to a StringResponse. 

The issue is discussed at length on the mailing list:

http://www.nabble.com/How-to-get-HTML-source-code-from-a-wicket-page-(was-on-old-list)-tf4276165.html#a12171769
http://www.nabble.com/How-to-get-HTML-source-code-from-a-wicket-page-tf3968790.html#a12044817

Stacktrace: 
--- 
11:45:49.263 WARN!! Exception for 
/app/?wicket:interface=:1:linkDumpHtml::ILinkListener:: 
org.apache.wicket.WicketRuntimeException: Internal Error: Could not render 
error page class org.apache.wicket.markup.html.pages.InternalErrorPage 
  at 
org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:165)
 
  at org.apache.wicket.RequestCycle.step(RequestCycle.java:1142) 
  at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1176) 
  at org.apache.wicket.RequestCycle.request(RequestCycle.java:499) 
  at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:257) 
  at 
org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:126) 
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:689) 
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) 
  at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:360) 
  at 
org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:294)
 
  at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:558) 
  at org.mortbay.http.HttpContext.handle(HttpContext.java:1714) 
  at 
org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:507)
 
  at org.mortbay.http.HttpContext.handle(HttpContext.java:1664) 
  at org.mortbay.http.HttpServer.service(HttpServer.java:863) 
  at org.mortbay.http.HttpConnection.service(HttpConnection.java:775) 
  at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:939) 
  at org.mortbay.http.HttpConnection.handle(HttpConnection.java:792) 
  at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:201) 
  at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:289) 
  at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:455) 
Caused by: java.lang.ClassCastException: 
org.apache.wicket.response.StringResponse cannot be cast to 
org.apache.wicket.protocol.http.WebResponse 
  at 
org.apache.wicket.protocol.http.WebRequestCycle.getWebResponse(WebRequestCycle.java:108)
 
  at 
org.apache.wicket.markup.html.pages.ExceptionErrorPage.configureResponse(ExceptionErrorPage.java:107)
 
  at org.apache.wicket.Page.onRender(Page.java:1419) 
  at org.apache.wicket.Component.render(Component.java:1941) 
  at org.apache.wicket.Page.renderPage(Page.java:927) 
  at 
org.apache.wicket.request.target.component.PageRequestTarget.respond(PageRequestTarget.java:64)
 
  at 
org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:103)
 
  at org.apache.wicket.RequestCycle.respond(RequestCycle.java:1046) 
  at org.apache.wicket.RequestCycle.step(RequestCycle.java:1112) 
  ... 19 more

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (WICKET-929) ExceptionErrorPage only works with WebResponse

2007-09-04 Thread Jean-Baptiste Quenot (JIRA)

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

Jean-Baptiste Quenot updated WICKET-929:


Summary: ExceptionErrorPage only works with WebResponse  (was: 
ExceptionErrorPage only works with WebResponse (get HTML source code from a 
wicket page))

 ExceptionErrorPage only works with WebResponse
 --

 Key: WICKET-929
 URL: https://issues.apache.org/jira/browse/WICKET-929
 Project: Wicket
  Issue Type: Bug
  Components: wicket
Affects Versions: 1.3.0-beta3
Reporter: Oliver Henlich

 Trying to get the html source of a wicket page by making the RequestCycle 
 write to a StringResponse. 
 The issue is discussed at length on the mailing list:
 http://www.nabble.com/How-to-get-HTML-source-code-from-a-wicket-page-(was-on-old-list)-tf4276165.html#a12171769
 http://www.nabble.com/How-to-get-HTML-source-code-from-a-wicket-page-tf3968790.html#a12044817
 Stacktrace: 
 --- 
 11:45:49.263 WARN!! Exception for 
 /app/?wicket:interface=:1:linkDumpHtml::ILinkListener:: 
 org.apache.wicket.WicketRuntimeException: Internal Error: Could not render 
 error page class org.apache.wicket.markup.html.pages.InternalErrorPage 
   at 
 org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:165)
  
   at org.apache.wicket.RequestCycle.step(RequestCycle.java:1142) 
   at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1176) 
   at org.apache.wicket.RequestCycle.request(RequestCycle.java:499) 
   at 
 org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:257) 
   at 
 org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:126) 
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:689) 
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) 
   at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:360) 
   at 
 org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:294)
  
   at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:558) 
   at org.mortbay.http.HttpContext.handle(HttpContext.java:1714) 
   at 
 org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:507)
  
   at org.mortbay.http.HttpContext.handle(HttpContext.java:1664) 
   at org.mortbay.http.HttpServer.service(HttpServer.java:863) 
   at org.mortbay.http.HttpConnection.service(HttpConnection.java:775) 
   at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:939) 
   at org.mortbay.http.HttpConnection.handle(HttpConnection.java:792) 
   at 
 org.mortbay.http.SocketListener.handleConnection(SocketListener.java:201) 
   at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:289) 
   at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:455) 
 Caused by: java.lang.ClassCastException: 
 org.apache.wicket.response.StringResponse cannot be cast to 
 org.apache.wicket.protocol.http.WebResponse 
   at 
 org.apache.wicket.protocol.http.WebRequestCycle.getWebResponse(WebRequestCycle.java:108)
  
   at 
 org.apache.wicket.markup.html.pages.ExceptionErrorPage.configureResponse(ExceptionErrorPage.java:107)
  
   at org.apache.wicket.Page.onRender(Page.java:1419) 
   at org.apache.wicket.Component.render(Component.java:1941) 
   at org.apache.wicket.Page.renderPage(Page.java:927) 
   at 
 org.apache.wicket.request.target.component.PageRequestTarget.respond(PageRequestTarget.java:64)
  
   at 
 org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:103)
  
   at org.apache.wicket.RequestCycle.respond(RequestCycle.java:1046) 
   at org.apache.wicket.RequestCycle.step(RequestCycle.java:1112) 
   ... 19 more

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (WICKET-929) ExceptionErrorPage only works with WebResponse

2007-09-04 Thread Jean-Baptiste Quenot (JIRA)

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

Jean-Baptiste Quenot updated WICKET-929:


Fix Version/s: 1.3.0-beta4
 Assignee: Jean-Baptiste Quenot

 ExceptionErrorPage only works with WebResponse
 --

 Key: WICKET-929
 URL: https://issues.apache.org/jira/browse/WICKET-929
 Project: Wicket
  Issue Type: Bug
  Components: wicket
Affects Versions: 1.3.0-beta3
Reporter: Oliver Henlich
Assignee: Jean-Baptiste Quenot
 Fix For: 1.3.0-beta4


 Trying to get the html source of a wicket page by making the RequestCycle 
 write to a StringResponse. 
 The issue is discussed at length on the mailing list:
 http://www.nabble.com/How-to-get-HTML-source-code-from-a-wicket-page-(was-on-old-list)-tf4276165.html#a12171769
 http://www.nabble.com/How-to-get-HTML-source-code-from-a-wicket-page-tf3968790.html#a12044817
 Stacktrace: 
 --- 
 11:45:49.263 WARN!! Exception for 
 /app/?wicket:interface=:1:linkDumpHtml::ILinkListener:: 
 org.apache.wicket.WicketRuntimeException: Internal Error: Could not render 
 error page class org.apache.wicket.markup.html.pages.InternalErrorPage 
   at 
 org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:165)
  
   at org.apache.wicket.RequestCycle.step(RequestCycle.java:1142) 
   at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1176) 
   at org.apache.wicket.RequestCycle.request(RequestCycle.java:499) 
   at 
 org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:257) 
   at 
 org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:126) 
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:689) 
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) 
   at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:360) 
   at 
 org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:294)
  
   at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:558) 
   at org.mortbay.http.HttpContext.handle(HttpContext.java:1714) 
   at 
 org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:507)
  
   at org.mortbay.http.HttpContext.handle(HttpContext.java:1664) 
   at org.mortbay.http.HttpServer.service(HttpServer.java:863) 
   at org.mortbay.http.HttpConnection.service(HttpConnection.java:775) 
   at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:939) 
   at org.mortbay.http.HttpConnection.handle(HttpConnection.java:792) 
   at 
 org.mortbay.http.SocketListener.handleConnection(SocketListener.java:201) 
   at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:289) 
   at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:455) 
 Caused by: java.lang.ClassCastException: 
 org.apache.wicket.response.StringResponse cannot be cast to 
 org.apache.wicket.protocol.http.WebResponse 
   at 
 org.apache.wicket.protocol.http.WebRequestCycle.getWebResponse(WebRequestCycle.java:108)
  
   at 
 org.apache.wicket.markup.html.pages.ExceptionErrorPage.configureResponse(ExceptionErrorPage.java:107)
  
   at org.apache.wicket.Page.onRender(Page.java:1419) 
   at org.apache.wicket.Component.render(Component.java:1941) 
   at org.apache.wicket.Page.renderPage(Page.java:927) 
   at 
 org.apache.wicket.request.target.component.PageRequestTarget.respond(PageRequestTarget.java:64)
  
   at 
 org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:103)
  
   at org.apache.wicket.RequestCycle.respond(RequestCycle.java:1046) 
   at org.apache.wicket.RequestCycle.step(RequestCycle.java:1112) 
   ... 19 more

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Resolved: (WICKET-929) ExceptionErrorPage only works with WebResponse

2007-09-04 Thread Jean-Baptiste Quenot (JIRA)

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

Jean-Baptiste Quenot resolved WICKET-929.
-

Resolution: Fixed

Fixed, thanks for reporting!  Note that 
MockWebApplication.postProcessRequestCycle() was also suffering of the same 
problem.

 ExceptionErrorPage only works with WebResponse
 --

 Key: WICKET-929
 URL: https://issues.apache.org/jira/browse/WICKET-929
 Project: Wicket
  Issue Type: Bug
  Components: wicket
Affects Versions: 1.3.0-beta3
Reporter: Oliver Henlich
Assignee: Jean-Baptiste Quenot
 Fix For: 1.3.0-beta4


 Trying to get the html source of a wicket page by making the RequestCycle 
 write to a StringResponse. 
 The issue is discussed at length on the mailing list:
 http://www.nabble.com/How-to-get-HTML-source-code-from-a-wicket-page-(was-on-old-list)-tf4276165.html#a12171769
 http://www.nabble.com/How-to-get-HTML-source-code-from-a-wicket-page-tf3968790.html#a12044817
 Stacktrace: 
 --- 
 11:45:49.263 WARN!! Exception for 
 /app/?wicket:interface=:1:linkDumpHtml::ILinkListener:: 
 org.apache.wicket.WicketRuntimeException: Internal Error: Could not render 
 error page class org.apache.wicket.markup.html.pages.InternalErrorPage 
   at 
 org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:165)
  
   at org.apache.wicket.RequestCycle.step(RequestCycle.java:1142) 
   at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1176) 
   at org.apache.wicket.RequestCycle.request(RequestCycle.java:499) 
   at 
 org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:257) 
   at 
 org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:126) 
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:689) 
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) 
   at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:360) 
   at 
 org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:294)
  
   at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:558) 
   at org.mortbay.http.HttpContext.handle(HttpContext.java:1714) 
   at 
 org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:507)
  
   at org.mortbay.http.HttpContext.handle(HttpContext.java:1664) 
   at org.mortbay.http.HttpServer.service(HttpServer.java:863) 
   at org.mortbay.http.HttpConnection.service(HttpConnection.java:775) 
   at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:939) 
   at org.mortbay.http.HttpConnection.handle(HttpConnection.java:792) 
   at 
 org.mortbay.http.SocketListener.handleConnection(SocketListener.java:201) 
   at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:289) 
   at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:455) 
 Caused by: java.lang.ClassCastException: 
 org.apache.wicket.response.StringResponse cannot be cast to 
 org.apache.wicket.protocol.http.WebResponse 
   at 
 org.apache.wicket.protocol.http.WebRequestCycle.getWebResponse(WebRequestCycle.java:108)
  
   at 
 org.apache.wicket.markup.html.pages.ExceptionErrorPage.configureResponse(ExceptionErrorPage.java:107)
  
   at org.apache.wicket.Page.onRender(Page.java:1419) 
   at org.apache.wicket.Component.render(Component.java:1941) 
   at org.apache.wicket.Page.renderPage(Page.java:927) 
   at 
 org.apache.wicket.request.target.component.PageRequestTarget.respond(PageRequestTarget.java:64)
  
   at 
 org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:103)
  
   at org.apache.wicket.RequestCycle.respond(RequestCycle.java:1046) 
   at org.apache.wicket.RequestCycle.step(RequestCycle.java:1112) 
   ... 19 more

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



svn commit: r572828 - in /wicket/trunk/jdk-1.4/wicket/src: main/java/org/apache/wicket/markup/html/pages/ main/java/org/apache/wicket/protocol/http/ test/java/response/

2007-09-04 Thread jbq
Author: jbq
Date: Tue Sep  4 15:41:31 2007
New Revision: 572828

URL: http://svn.apache.org/viewvc?rev=572828view=rev
Log:
WICKET-929 ExceptionErrorPage only works with WebResponse

Added:
wicket/trunk/jdk-1.4/wicket/src/test/java/response/
wicket/trunk/jdk-1.4/wicket/src/test/java/response/BrokenPage.java   (with 
props)
wicket/trunk/jdk-1.4/wicket/src/test/java/response/StringResponseTest.java  
 (with props)
Modified:

wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/pages/ExceptionErrorPage.java

wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/MockWebApplication.java

Modified: 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/pages/ExceptionErrorPage.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/pages/ExceptionErrorPage.java?rev=572828r1=572827r2=572828view=diff
==
--- 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/pages/ExceptionErrorPage.java
 (original)
+++ 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/pages/ExceptionErrorPage.java
 Tue Sep  4 15:41:31 2007
@@ -27,6 +27,7 @@
 import org.apache.wicket.markup.html.basic.MultiLineLabel;
 import org.apache.wicket.markup.html.debug.PageView;
 import org.apache.wicket.markup.html.link.Link;
+import org.apache.wicket.protocol.http.WebResponse;
 import org.apache.wicket.util.string.Strings;
 
 
@@ -108,8 +109,12 @@
protected void configureResponse()
{
super.configureResponse();
-   
getWebRequestCycle().getWebResponse().getHttpServletResponse().setStatus(
-   HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
+
+   if (getWebRequestCycle().getResponse() instanceof WebResponse)
+   {
+   
getWebRequestCycle().getWebResponse().getHttpServletResponse().setStatus(
+   
HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
+   }
}
 
/**

Modified: 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/MockWebApplication.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/MockWebApplication.java?rev=572828r1=572827r2=572828view=diff
==
--- 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/MockWebApplication.java
 (original)
+++ 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/MockWebApplication.java
 Tue Sep  4 15:41:31 2007
@@ -395,22 +395,25 @@
{
previousRenderedPage = lastRenderedPage;
 
-   // handle redirects which are usually managed by the browser
-   // transparently
-   final MockHttpServletResponse httpResponse = 
(MockHttpServletResponse)cycle
-   .getWebResponse().getHttpServletResponse();
-
-   if (httpResponse.isRedirect())
+   if (cycle.getResponse() instanceof WebResponse)
{
-   this.lastRenderedPage = generateLastRenderedPage(cycle);
-
-   MockHttpServletRequest newHttpRequest = new 
MockHttpServletRequest(this.application,
-   servletSession, 
this.application.getServletContext());
-   
newHttpRequest.setRequestToRedirectString(httpResponse.getRedirectLocation());
-   wicketRequest = 
this.application.newWebRequest(newHttpRequest);
-
-   cycle = createRequestCycle();
-   cycle.request();
+   // handle redirects which are usually managed by the 
browser
+   // transparently
+   final MockHttpServletResponse httpResponse = 
(MockHttpServletResponse)cycle
+   
.getWebResponse().getHttpServletResponse();
+   
+   if (httpResponse.isRedirect())
+   {
+   this.lastRenderedPage = 
generateLastRenderedPage(cycle);
+   
+   MockHttpServletRequest newHttpRequest = new 
MockHttpServletRequest(this.application,
+   servletSession, 
this.application.getServletContext());
+   
newHttpRequest.setRequestToRedirectString(httpResponse.getRedirectLocation());
+   wicketRequest = 
this.application.newWebRequest(newHttpRequest);
+   
+   cycle = createRequestCycle();
+   cycle.request();
+   }
}
this.lastRenderedPage = 

[jira] Assigned: (WICKET-925) embedded jetty configuration stops working on beta3

2007-09-04 Thread Igor Vaynberg (JIRA)

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

Igor Vaynberg reassigned WICKET-925:


Assignee: Matej Knopp

 embedded jetty configuration stops working on beta3
 ---

 Key: WICKET-925
 URL: https://issues.apache.org/jira/browse/WICKET-925
 Project: Wicket
  Issue Type: Bug
  Components: wicket
Affects Versions: 1.3.0-beta3
 Environment: Windows 2000sp4, Java 1.6.0-b105
Reporter: Stojce Dimski
Assignee: Matej Knopp
 Attachments: jettyWicket.zip


 When using beta3 with embedded configuration, which means there is no 
 web.xml, but wicket servlet instance is injected in jetty server context. 
 During the startup application generates NPE in (DiskPageStore.java:486) 
 which means that wicket servlet cannot retrieve temp dir... Adding the 
 following line before string the application resolves the question:
 serverContext.setAttribute(javax.servlet.context.tempdir, new File(.));
 I am not sure if this is just treating effect and not the cause which can be 
 related to recent WicketFilter/WicketServlet 'thread' questions ?
 Attached simple hello world application reproduce this...

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Resolved: (WICKET-921) AbstractRepeater.add(int index, Component c) method

2007-09-04 Thread Igor Vaynberg (JIRA)

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

Igor Vaynberg resolved WICKET-921.
--

Resolution: Won't Fix
  Assignee: Igor Vaynberg

AbstractRepeater.java:66

/**
 * Returns an iterator for the collection of child components to be rendered. 
Users can override
 * this to change order of rendered children.
 * 
 * @return iterator over child components to be rendered
 */
protected abstract Iterator renderIterator();

wicket does not guarantee internal ordering of components via add() method.

so really what you can do is create your own items that contain the index, and 
your own insert and renderiterator() method that use that index.

 AbstractRepeater.add(int index, Component c) method
 ---

 Key: WICKET-921
 URL: https://issues.apache.org/jira/browse/WICKET-921
 Project: Wicket
  Issue Type: New Feature
  Components: wicket
Affects Versions: 1.3.0-beta3
Reporter: Sam Hough
Assignee: Igor Vaynberg
Priority: Minor

 The ability to insert a Component into an AbstractRepeater would save having 
 to rebuild the list from scratch. Behaviour could/should be like 
 List.add(int index, E element).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.