use of org.osgl.mvc.annotation.GetAction in project act-eagle-allone by mailtous.
the class SysFuncController method perm_edit.
/**
* 权限分配窗口页
* @param id
* @return
*/
@GetAction("perm_box/{funcId}")
public RenderAny perm_edit(Long funcId) {
SysFunc sysFunc = sysFuncService.get(new Long(funcId));
List<SysRole> sysRoleList = sysRoleService.getAllOfList();
List<Long> roleIds = sysPermissionService.getRoleIdsOfFuncId(funcId);
Map<Long, Boolean> roleMap = sysPermissionService.roleMapOfpermission(roleIds);
ctx.renderArg("sysRoleList", sysRoleList);
ctx.renderArg("sysFunc", sysFunc);
ctx.renderArg("roleMap", roleMap);
return render("perm_box.html");
}
use of org.osgl.mvc.annotation.GetAction in project act-eagle-allone by mailtous.
the class SysHomeController method home.
@GetAction({ "home", "" })
public RenderAny home(H.Session session, H.Request req) {
H.Cookie cookie = SysUser.getMyCookie(req);
if (null == cookie) {
to("/sys/login");
}
SysUser sysUser = session.cached(cookie.value());
if (null == sysUser) {
to("/sys/login");
}
ctx.renderArg("sysUser", sysUser);
ctx.renderArg("menuDataUrl", "/sys/home/my/menu.json?userId=" + sysUser.getId());
return render("home.html");
}
use of org.osgl.mvc.annotation.GetAction in project actframework by actframework.
the class AnnotationUtilTest method testGetAnnotation.
@Test
public void testGetAnnotation() {
Singleton singleton = AnnotationUtil.getAnnotation(Derived.class, Singleton.class);
assertNotNull(singleton);
GetAction getAction = AnnotationUtil.getAnnotation(Derived.class, GetAction.class);
assertNull(getAction);
}
use of org.osgl.mvc.annotation.GetAction in project actframework by actframework.
the class HelloWorldApp method greeting.
@GetAction("/greeting")
public Result greeting(String who, int age) {
ActionContext ctx = ActionContext.current();
ctx.renderArg("who", who);
return render(who, age);
}
Aggregations