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. [题解]hdu 1009 FatMouse' Trade(贪心基础题)

    Problem Description FatMouse prepared M pounds of cat food, ready to trade with the cats guarding th ...

  2. PHP 四种基本排序算法的代码实现

    前提:分别用冒泡排序法,快速排序法,选择排序法,插入排序法将下面数组中的值按照从小到大的顺序进行排序. $arr(1,43,54,62,21,66,32,78,36,76,39); 1. 冒泡排序 思 ...

  3. 在UITableViewStylePlain情况下sectionHeader可以与tableview一起滑动的解决方法

    -(void)scrollViewDidScroll:(UIScrollView *)scrollView { CGFloat sectionHeaderHeight = ; ) { scrollVi ...

  4. idhttp的用法

    1)POST function PostMethod(http: TIDhttp; URL: string; Params: TStringList): string;var RespData: TS ...

  5. zz---Tomcat服务器下部署项目几种方式

    http://blog.sina.com.cn/s/blog_550281c60101hvrs.html 一.静态部署1.直接将web项目文件件拷贝到webapps 目录中     Tomcat的We ...

  6. 纯css用图片代替checkbox和radio,无js实现方法

    html <ul id="is_offical_post_links"> <li> <label> <input type="c ...

  7. Html/Css(新手入门第二篇)

    一.在实际工作中,都是一个团队在做项目,不是一个人在工作.多人协作,就是每个团队都有自己 的命名习惯.1.css选择符命名,规范.2.都有命名规范文档. 二.css选择符作用:指定css样式所作用对象 ...

  8. Java垃圾回收小结

    一.如何确定某个对象是“垃圾”? 首先要搞清一个最基本的问题:如果确定某个对象是“垃圾”?既然垃圾收集器的任务是回收垃圾对象所占的空间供新的对象使用,那么垃圾收集器如何确定某个对象是“垃圾”?—即通过 ...

  9. jexus ASP.NET开发注意项1

    Jexus@宇内(273766940) 9:09:02 linux上的文件名和文件路径是大小写敏感的. Jexus@宇内(273766940) 9:10:11 在win上,你文件名是 Login.as ...

  10. Circle3Quit数到三的人退出

    public class Circle3Quit {public static void main(String args[]) {boolean arr[] = new boolean[500];/ ...