/** * 增加可访问的功能路径或方法 * * @return */ @Action( value = "addFunctionM", results = {@Result(name = "json", type = "json")}) public String addFunctionM() { FunctionM fm = new FunctionM(); fm.setId(this.getSerial().Serialid(Serial.FUNCTION)); fm.setFunctionname(this.getFunctionname()); fm.setVisitmethodname(this.getVisitmethodname()); fm.setVisiturl(this.getVisiturl()); fm.setModuleid(this.getModuleid()); fm.setCreatetime(BaseTools.systemtime()); this.getFunctionMService().save(fm); this.setSucflag(true); return "json"; }
/** * 更新功能 * * @return */ @Action( value = "updateFunctionM", results = {@Result(name = "json", type = "json")}) public String updateFunctionM() { bean.setId(this.getId()); bean.setFunctionname(this.getFunctionname()); bean.setVisitmethodname(this.getVisitmethodname()); bean.setVisiturl(this.getVisiturl()); bean.setModuleid(this.getModuleid()); bean.setCreatetime(BaseTools.systemtime()); this.getFunctionMService().updateFunctionM(bean); this.setSucflag(true); return "json"; }
public void ProcessFunctionMList(List<FunctionM> list) { for (Iterator<FunctionM> it = list.iterator(); it.hasNext(); ) { FunctionM fm = (FunctionM) it.next(); Map<String, Object> cellMap = new HashMap<String, Object>(); cellMap.put("id", fm.getId()); cellMap.put( "cell", new Object[] { fm.getFunctionname(), fm.getVisiturl(), fm.getVisitmethodname(), BaseTools.formateDbDate(fm.getCreatetime()), "<a id='editfunction' name='editfunction' href='function.jsp?operate=edit&folder=setting&id=" + fm.getId() + "'>[编辑]</a>" }); rows.add(cellMap); } }