⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rolemodel.java

📁 appfuse一套结合STRUTS+SPRING+HIBERNATE的框架
💻 JAVA
字号:
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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -