01: /*
02: * $Id$ $Revision$ $Date$
03: *
04: * ==================================================================== Licensed
05: * under the Apache License, Version 2.0 (the "License"); you may not use this
06: * file except in compliance with the License. You may obtain a copy of the
07: * License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13: * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14: * License for the specific language governing permissions and limitations under
15: * the License.
16: */
17: package wicket.examples.compref;
18:
19: import wicket.examples.WicketExamplePage;
20: import wicket.markup.html.link.ExternalLink;
21:
22: /**
23: * Page with examples on {@link wicket.markup.html.link.ExternalLink}.
24: *
25: * @author Eelco Hillenius
26: */
27: public class ExternalLinkPage extends WicketExamplePage {
28: /**
29: * Constructor
30: */
31: public ExternalLinkPage() {
32: // add a link that goes to javalobby
33: add(new ExternalLink("externalLink1",
34: "http://www.javalobby.org", "To JavaLobby"));
35: // add a link that goes to the server side
36: add(new ExternalLink("externalLink2",
37: "http://www.theserverside.com", "To The Server Side"));
38: }
39:
40: /**
41: * Override base method to provide an explanation
42: */
43: protected void explain() {
44: String html = "<a href=\"#\" target=\"_new\" wicket:id=\"externalLink1\">this body will be replaced</a>";
45: String code = " add(new ExternalLink(\"externalLink1\", \"http://www.javalobby.org\", \"To JavaLobby\"));";
46: add(new ExplainPanel(html, code));
47: }
48: }
|