Author: jbq
Date: Fri Feb 23 03:25:03 2007
New Revision: 510906
URL: http://svn.apache.org/viewvc?view=rev&rev=510906
Log:
WICKET-38 WicketTester fails when calling clickLink on a ResourceLink to a
mounted resource
Revert changes from revision 472330 because the problem has gone away, as
suggested by AlMaw
Modified:
incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/tester/WicketTester.java
incubator/wicket/trunk/wicket/src/main/java/wicket/util/tester/WicketTester.java
Modified:
incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/tester/WicketTester.java
URL:
http://svn.apache.org/viewvc/incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/tester/WicketTester.java?view=diff&rev=510906&r1=510905&r2=510906
==============================================================================
---
incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/tester/WicketTester.java
(original)
+++
incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/tester/WicketTester.java
Fri Feb 23 03:25:03 2007
@@ -725,35 +725,7 @@
// process the request target
requestCycle.getRequestTarget().respond(requestCycle);
}
- // ResourceLink
- else if (linkComponent instanceof ResourceLink)
- {
- // Let's see if we should invoke the onclick or not
- Resource resource = null;
-
- try
- {
- Field resourceField =
ResourceLink.class.getDeclaredField("resource");
- resourceField.setAccessible(true);
- resource =
(Resource)resourceField.get(linkComponent);
- }
- catch (Exception e)
- {
- Assert.fail(e.getMessage());
- }
-
- // If the link holds the resource itself we should
- if (resource != null)
- {
- newRequestToComponent(linkComponent);
- }
- // Else we should not (Should we do anything else?)
- else
- {
- // Do nothing
- }
- }
- // if the link is a normal link
+ // if the link is a normal link (or ResourceLink)
else if (linkComponent instanceof Link)
{
Link link = (Link)linkComponent;
Modified:
incubator/wicket/trunk/wicket/src/main/java/wicket/util/tester/WicketTester.java
URL:
http://svn.apache.org/viewvc/incubator/wicket/trunk/wicket/src/main/java/wicket/util/tester/WicketTester.java?view=diff&rev=510906&r1=510905&r2=510906
==============================================================================
---
incubator/wicket/trunk/wicket/src/main/java/wicket/util/tester/WicketTester.java
(original)
+++
incubator/wicket/trunk/wicket/src/main/java/wicket/util/tester/WicketTester.java
Fri Feb 23 03:25:03 2007
@@ -733,35 +733,7 @@
// process the request target
requestCycle.getRequestTarget().respond(requestCycle);
}
- // ResourceLink
- else if (linkComponent instanceof ResourceLink)
- {
- // Let's see if we should invoke the onclick or not
- Resource resource = null;
-
- try
- {
- Field resourceField =
ResourceLink.class.getDeclaredField("resource");
- resourceField.setAccessible(true);
- resource =
(Resource)resourceField.get(linkComponent);
- }
- catch (Exception e)
- {
- Assert.fail(e.getMessage());
- }
-
- // If the link holds the resource itself we should
- if (resource != null)
- {
- newRequestToComponent(linkComponent);
- }
- // Else we should not (Should we do anything else?)
- else
- {
- // Do nothing
- }
- }
- // if the link is a normal link
+ // if the link is a normal link (or ResourceLink)
else if (linkComponent instanceof Link)
{
Link link = (Link)linkComponent;