Search in sources :

Example 1 with GetAction

use of org.osgl.mvc.annotation.GetAction in project act-eagle-allone by mailtous.

the class SysRoleController method edit.

@GetAction("edit_box/{id}")
public RenderAny edit(@Param(defLongVal = -1) Long id) {
    SysRole sysRole = new SysRole();
    // -1:新增
    sysRole.setId(id);
    if (id > 0) {
        sysRole = sysRoleService.get(new Long(id));
    }
    return render("edit_box.html", sysRole);
}
Also used : SysRole(com.artlongs.sys.model.SysRole) GetAction(org.osgl.mvc.annotation.GetAction)

Example 2 with GetAction

use of org.osgl.mvc.annotation.GetAction in project act-eagle-allone by mailtous.

the class SysUserController method role_edit.

/**
 * 角色分配窗口页
 * @param id
 * @return
 */
@GetAction("role_box/{userId}")
public RenderAny role_edit(Long userId) {
    SysUser sysUser = sysUserService.get(userId);
    List<SysRole> sysRoleList = sysRoleService.getAllOfList();
    ctx.renderArg("sysRoleList", sysRoleList);
    ctx.renderArg("sysUser", sysUser);
    ctx.renderArg("roleMap", sysUser.hasRoleMap());
    return render("role_box.html");
}
Also used : SysUser(com.artlongs.sys.model.SysUser) SysRole(com.artlongs.sys.model.SysRole) GetAction(org.osgl.mvc.annotation.GetAction)

Example 3 with GetAction

use of org.osgl.mvc.annotation.GetAction in project act-eagle-allone by mailtous.

the class Hello method pageOfjson.

@GetAction("user/page.json")
public RenderJSON pageOfjson() throws SQLException {
    String sql = " select * from user where id > ?";
    Page<User> userPage = userService.getPage(new Page(), sql, new Object[] { 0 });
    return renderJson(userPage);
}
Also used : Page(com.artlongs.framework.page.Page) GetAction(org.osgl.mvc.annotation.GetAction)

Example 4 with GetAction

use of org.osgl.mvc.annotation.GetAction in project act-eagle-allone by mailtous.

the class SysFuncController method tree.

@GetAction("tree")
public String tree() {
    Map<Long, List<SysFunc>> moduleMap = sysFuncService.getModuleTreeMap();
    SysFunc topMenu = sysFuncService.buildFuncTree(moduleMap);
    String jsonStr = topMenu.childsToJqTreeStr();
    return jsonStr;
}
Also used : SysFunc(com.artlongs.sys.model.SysFunc) List(java.util.List) GetAction(org.osgl.mvc.annotation.GetAction)

Example 5 with GetAction

use of org.osgl.mvc.annotation.GetAction in project act-eagle-allone by mailtous.

the class SysFuncController method edit.

@GetAction("edit_box/{id}")
public RenderAny edit(@Param(defLongVal = -1) Long id) {
    SysFunc sysFunc = new SysFunc();
    // -1:新增
    sysFunc.setId(id);
    if (id > 0) {
        sysFunc = sysFuncService.get(new Long(id));
    }
    // 树型菜单的数据
    Map<Long, List<SysFunc>> moduleMap = sysFuncService.getModuleTreeMap();
    SysFunc topMenu = sysFuncService.buildFuncTree(moduleMap);
    String treeJsonStr = topMenu.childsToJqTreeStr();
    ctx.renderArg("treeJsonStr", treeJsonStr);
    ctx.renderArg("sysFunc", sysFunc);
    return render("edit_box.html");
}
Also used : SysFunc(com.artlongs.sys.model.SysFunc) List(java.util.List) GetAction(org.osgl.mvc.annotation.GetAction)

Aggregations

GetAction (org.osgl.mvc.annotation.GetAction)9 SysFunc (com.artlongs.sys.model.SysFunc)3 SysRole (com.artlongs.sys.model.SysRole)3 SysUser (com.artlongs.sys.model.SysUser)2 List (java.util.List)2 ActionContext (act.app.ActionContext)1 Page (com.artlongs.framework.page.Page)1 Singleton (javax.inject.Singleton)1 Test (org.junit.Test)1 H (org.osgl.http.H)1