LoginSignup
0
0

More than 5 years have passed since last update.

AjaxCheckBoxの入力値取得結果一覧

Last updated at Posted at 2015-04-24

はじめに

org.apache.wicket.ajax.markup.html.form.AjaxCheckboxの入力値を取得する方法は複数ある。それぞれの方法での取得結果を備忘録としてまとめた。

使用したコード

AjaxCheckBox groupselector = new AjaxCheckBox("groupselector",new Model<Boolean>()) {

    private static final long serialVersionUID = -1892999458510654835L;

    @Override
    protected void onUpdate(AjaxRequestTarget arg0) {
        System.out.println("--------入力結果の色々な取得方法--------");

        System.out.println("getInput():\t" + getInput());
        System.out.println("getConvertedInput():\t" + getConvertedInput());
        System.out.println("getValue():\t" + getValue());
        System.out.println("getDefaultModelObject():\t" + getDefaultModelObject());
        System.out.println("getModelValue():\t" + getModelValue());

    }
};
add(groupselector);

結果

メソッド名 選択時 解除時
getInput "on" null
getConvertedInput true false
getValue true false
getDefaultModelObject true false
getModelValue true false

終わりに

getInput() だけは on/null となる。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0