Label       new Label(“message”,”message content”);

MutLineLabel         new MutlineLabel(“message”,”我的名字:\n我的性别:”);     这里可以将\n转成<br/>,相当于Servlet里面的out.print

Link

Link link = new

Link("link") {

public void onClick() {

super.setResponsePage(NewPage.class);

}

};

注意这里的setResponsePage的参数,最常用的是两个,一个是Class类型,直接跳转到那个页面,如果需要传递参数,只要调用那个页面的构造方法就可以了,例如:setResponsePage(new NewPage(“paramValue”));

ExternalLink   一般这个控件用于外连接

<a wicket:id=”externalLink”>外连接,转向百度</a>

ExternalLink externalLink = new ExternalLink(“externalLink”,http://www.baidu.com);

BookmarkablePageLink 可以传递参数的Link

<a wicket:id=”bookmarkablePageLink”>传递参数到其它页面</a>

PageParameters parameters = new PageParameters();

parameters.put(“name”,”value”);

BookmarkablePageLink link = new BookmarkablePageLink(“bookmarkablePageLink”,NewPage.class,parameters);

PopupSettings        在客户端生成JavaScript代码实现popup窗口

<a wicket:id=”popupLink”>点击弹出窗口</a>

//创建PopupSettings

PopupSettings popup = new PopupSettings(0;

popupSettings.setHeight(400);

popupSettings.setWidth(400);

//创建使用popup的Link

Link link = new

Link("link") {

public void onClick() {

super.setResponsePage(NewPage.class);

}

};

//调用setPopupSettings方法添加进PopupSettings

link.setPopupSettings(popup);

SubmitLink     用于提交表单,调用Form的onSubmit方法

Form form = new Form("wicketForm"){

@Override

public void onSubmit(){

}

};        //创建提交链接

//创建内部提交链接,form要add这个内部提交链接

SubmitLink inSubmitLink = new SubmitLink("inSubmitLink");

form.add(inSubmitLink);

//创建外部提交链接,这个链接要add这个form

SubmitLink outSubmitLink = new SubmitLink("outSubmitLink",form);

Button

//创建按钮

Button button1 = new Button("button1"){

@Override

public void onSubmit(){

}

};

//注意这个方法,false时不调用form的onSubmit方法,true时先调用buttion1的onSubmit方法,再调用form的obSubmit方法

//一般都需要设置为false,可以实现多个按钮提交的功能

button1.setDefaultFormProcessing(false);

TextField         TextField name = new TextField("name");

PasswordTextField              PasswordTextField password = new PasswordTextField("password");

TextArea        TextArea info = new TextArea("info");

CheckBox       CheckBox bool = new CheckBox("bool");

CheckBoxMultipleChoice

List sitesList = new ArrayList();

sitesList.add("百度");

sitesList.add("新浪");

sitesList.add("搜狐");

CheckBoxMultipleChoice sites = new CheckBoxMultipleChoice("sites",sitesList);

DropDownChoice

DropDownChoice dropDownChoice = new DropDownChoice("dropdown",sitesList);

dropDownChoice.setRequired(true);

form.add(dropDownChoice);

RadioChoice        RadioChoice radioChoice = new RadioChoice("radioChoice",sitesList);

Image        Image image = new Image("img","images/emot1.gif");

wicket基本控件使用笔记的更多相关文章

  1. 转)delphi chrome cef3 控件学习笔记 (二)

    (转)delphi chrome cef3 控件学习笔记 (二) https://blog.csdn.net/risesoft2012/article/details/51260832 原创 2016 ...

  2. asp.net、mvc、ajax、js、jquery、sql、EF、linq、netadvantage第三方控件知识点笔记

    很简单,如下: 父页面:(弹出提示框) function newwindow(obj) { var rtn = window.showModalDialog('NewPage.htm','','sta ...

  3. Corelocation及地图控件学习笔记

    Corelocation基本使用 在地图章节的学习中,首先要学的便是用户位置定位,因此我们首先要掌握Corelocation的使用.(在IOS8以前可以系统会直接请求授权,现在需要我们自己调用方式通知 ...

  4. web前端开发控件学习笔记之jqgrid+ztree+echarts

    版权声明:本文为博主原创文章,转载请注明出处.   作为web前端初学者,今天要记录的是三个控件的使用心得,分别是表格控件jqgrid,树形控件ztree,图表控件echarts.下边分别进行描述. ...

  5. asp.net中Repeater控件用法笔记

    大家可能都对datagrid比较熟悉,但是如果在数据量大的时候,我们就得考虑使用 repeater作为我们的数据绑定控件了.Repeater控件与DataGrid (以及DataList)控件的主要区 ...

  6. DataGridView控件-学习笔记总结

    1.GridColor属性用来获取或设置网格线的颜色 dataGridView1.GridColor=Color.Blue; 2.设置宽度 .高度 dataGridView1.Columns[].Wi ...

  7. C# WinForm调用UnityWebPlayer Control控件 <学习笔记1>

    工具 1.三维场景 Unity 5.0.2f1 2.开发环境Microsoft Visual Studio 2010 3.需要使用的控件 UnityWebPlayer Control 出现的问题及解决 ...

  8. Winform控件学习笔记【第六天】——TreeView

    TreeView控件用来显示信息的分级视图,如同Windows里的资源管理器的目录.TreeView控件中的各项信息都有一个与之相关的Node对象.TreeView显示Node对象的分层目录结构,每个 ...

  9. Winform控件学习笔记【第五天】——ListView

    [第五天] 常用的基本属性: FullRowSelect:设置是否行选择模式.(默认为false) 提示:只有在Details视图该属性才有意义. GridLines:设置行和列之间是否显示网格线.( ...

随机推荐

  1. 使用Aspose插件将程序中的表格,导出生成excel表格

    http://www.cnblogs.com/lanyue52011/p/3372452.html这个是原文地址 /// <summary> /// 点击按钮,将内存表导出excel表格! ...

  2. docker 安装

    Docker使用了一种叫AUFS的文件系统,这种文件系统可以让你一层一层地叠加修改你的文件,最底下的文件系统是只读的,如果需要修改文件,AUFS会增加一个可写的层(Layer),这样有很多好处,例如不 ...

  3. 解决 HttpClient 模拟 http 的get 请求后 ,出现 403 错误

    解决方法: URI uri = builder.build(); // 创建http GET请求 HttpGet httpGet = new HttpGet(uri); httpGet.setHead ...

  4. Odoo10 变化

    官方在 https://www.odoo.com/forum/help-1/question/fyi-what-has-odoo-r-d-been-working-on-lately-106945 发 ...

  5. NOIP2013 题解

    转圈游戏 题解:快速幂 #include <cstdio> int n, m, k, x; inline long long QuickPow(int a, int k, int MOD) ...

  6. 数据模型类对比 反射c#

    using System;using System.ComponentModel.DataAnnotations; public class LoginModel    {               ...

  7. 用JS制作简易选项卡

    p.p1 { margin: 0.0px 0.0px 0.0px 0.0px; font: 30.0px Consolas; color: #2b7ec3 } p.p2 { margin: 0.0px ...

  8. 【筛法求素数】【质因数分解】bzoj2721 [Violet 5]樱花

    http://www.cnblogs.com/rausen/p/4138233.html #include<cstdio> #include<iostream> using n ...

  9. 01:Geoserver发布shapfile,中文字段乱码问题

    软件环境:Geoserver 2.1.0 UDig 1.2.1 shapfile文件结构:FID                  地物名称      变化图斑                     ...

  10. pictures of you

    http://pan.baidu.com/s/1dEAiwnB 给某人的. I've been looking so long at these pictures of you 我已对着你的照片凝视太 ...