spring struts hibernate

源代码在线查看: rolemodel.java

软件大小: 23297 K
上传用户: gxjun686
关键词: hibernate spring struts
下载地址: 免注册下载 普通下载 VIP

相关代码

				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;
				    }
				}
							

相关资源