rolemodel.java

来自「this is for appfuse1.8 source using stru」· Java 代码 · 共 42 行

JAVA
42
字号
package org.appfuse.webapp.action;import java.util.List;import org.apache.tapestry.form.IPropertySelectionModel;import org.appfuse.model.LabelValue;public class RoleModel implements IPropertySelectionModel {    private List roles = null;    public RoleModel(List roles) {        this.roles = roles;    }    public int getOptionCount() {        return this.roles.size();    }    public Object getOption(int index) {        LabelValue option = (LabelValue) this.roles.get(index);        return option.getValue();    }    public String getLabel(int index) {        LabelValue option = (LabelValue) this.roles.get(index);        return option.getLabel();    }    public String getValue(int index) {        LabelValue option = (LabelValue) this.roles.get(index);        return option.getValue();    }    public Object translateValue(String value) {        return value;    }}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?