Search in sources :

Example 1 with ButtonField

use of cn.cerc.jpage.fields.ButtonField in project summer-mis by cn-cerc.

the class UIFormHorizontal method readAll.

public ButtonField readAll() {
    if (readAll) {
        return submit;
    }
    if (buttons == null) {
        return submit;
    }
    submit = null;
    // 取 form submit 按钮
    for (AbstractField field : buttons.getFields()) {
        if (field instanceof ButtonField) {
            ButtonField button = (ButtonField) field;
            String key = button.getField();
            String val = request.getParameter(key);
            if (val != null && val.equals(button.getData())) {
                submit = button;
                break;
            }
        }
    }
    // 将用户值或缓存值存入到dataSet中
    for (AbstractField field : this.fields) field.updateField();
    // 将可折叠字段的值存入到dataSet中
    for (IField field : this.getExpender().getFields()) ((AbstractField) field).updateField();
    readAll = true;
    return submit;
}
Also used : AbstractField(cn.cerc.jpage.fields.AbstractField) IField(cn.cerc.jpage.core.IField) ButtonField(cn.cerc.jpage.fields.ButtonField)

Aggregations

IField (cn.cerc.jpage.core.IField)1 AbstractField (cn.cerc.jpage.fields.AbstractField)1 ButtonField (cn.cerc.jpage.fields.ButtonField)1