I just tested it, and everything works fine here. Here's the patch of
what I tried on wicket-examples.
I think your problems is somewhere else. Could you give us some more
information?
Eelco
Index: src/java/wicket/examples/helloworld/HelloWorld.html
===================================================================
RCS file:
/cvsroot/wicket/wicket-examples/src/java/wicket/examples/helloworld/HelloWorld.html,v
retrieving revision 1.11
diff -u -r1.11 HelloWorld.html
--- src/java/wicket/examples/helloworld/HelloWorld.html 3 Apr 2005
09:24:52 -0000 1.11
+++ src/java/wicket/examples/helloworld/HelloWorld.html 1 Sep 2005
22:20:29 -0000
@@ -7,5 +7,8 @@
<body>
<span wicket:id="mainNavigation"/>
<span wicket:id="message" id="message">Message goes here</span>
+
+ <span wicket:id="p"></span>
+
</body>
</html>
Index: src/java/wicket/examples/helloworld/HelloWorld.java
===================================================================
RCS file:
/cvsroot/wicket/wicket-examples/src/java/wicket/examples/helloworld/HelloWorld.java,v
retrieving revision 1.5
diff -u -r1.5 HelloWorld.java
--- src/java/wicket/examples/helloworld/HelloWorld.java 9 Feb 2005
09:42:25 -0000 1.5
+++ src/java/wicket/examples/helloworld/HelloWorld.java 1 Sep 2005
22:20:29 -0000
@@ -20,6 +20,7 @@
import wicket.examples.WicketExamplePage;
import wicket.markup.html.basic.Label;
+import wicket.markup.html.link.Link;
/**
* Everybody's favorite example!
@@ -33,6 +34,16 @@
*/
public HelloWorld()
{
- add(new Label("message", "Hello World!"));
- }
+ add(new Label("message", "Hello World!"));
+ Link l = new Link("l")
+ {
+ public void onClick()
+ {
+
System.err.println("HHSDFJHDFKJHDFJKHSDJKHSFDKJDSHJKDFS");
+ }
+ };
+ MyPanel p = new MyPanel("p");
+ p.add(l);
+ add(p);
+ }
}
\ No newline at end of file
Index: src/java/wicket/examples/helloworld/MyPanel.html
===================================================================
RCS file: src/java/wicket/examples/helloworld/MyPanel.html
diff -N src/java/wicket/examples/helloworld/MyPanel.html
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ src/java/wicket/examples/helloworld/MyPanel.html 1 Jan 1970 00:00:00
-0000
@@ -0,0 +1,3 @@
+<wicket:panel>
+ <a wicket:id="l" href="#">hi</a>
+</wicket:panel>
Index: src/java/wicket/examples/helloworld/MyPanel.java
===================================================================
RCS file: src/java/wicket/examples/helloworld/MyPanel.java
diff -N src/java/wicket/examples/helloworld/MyPanel.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ src/java/wicket/examples/helloworld/MyPanel.java 1 Jan 1970 00:00:00
-0000
@@ -0,0 +1,42 @@
+/*
+ * $Id$
+ * $Revision$
+ * $Date$
+ *
+ *
==============================================================================
+ * 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
+ *
+ * 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.
+ */
+package wicket.examples.helloworld;
+
+import wicket.Component;
+import wicket.MarkupContainer;
+import wicket.markup.html.link.Link;
+import wicket.markup.html.panel.Panel;
+
+
+public class MyPanel extends Panel
+{
+ public MyPanel(String id)
+ {
+ super(id);
+
+ }
+ public MarkupContainer add(final Component component)
+ {
+ // we don't want any of our links to be auto enabled because
we use CSS ...
+ if(component instanceof Link)
+ ((Link) component).setAutoEnable(false);
+
+ return super.add(component);
+ }
+}
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user