Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
后端镜像
java镜像
Springside4
提交
8c0cf8d0
S
Springside4
项目概览
后端镜像
/
java镜像
/
Springside4
通知
0
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
Springside4
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
8c0cf8d0
编写于
9月 03, 2012
作者:
C
Calvin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
JQuery Valdiate 对checkbox 必填项的支持
上级
62f3c7b0
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
14 addition
and
3 deletion
+14
-3
examples/showcase/src/main/java/org/springside/examples/showcase/entity/User.java
...in/java/org/springside/examples/showcase/entity/User.java
+4
-0
examples/showcase/src/main/webapp/WEB-INF/views/account/userForm.jsp
...owcase/src/main/webapp/WEB-INF/views/account/userForm.jsp
+10
-3
未找到文件。
examples/showcase/src/main/java/org/springside/examples/showcase/entity/User.java
浏览文件 @
8c0cf8d0
...
...
@@ -18,6 +18,7 @@ import org.hibernate.annotations.Fetch;
import
org.hibernate.annotations.FetchMode
;
import
org.hibernate.validator.constraints.Email
;
import
org.hibernate.validator.constraints.NotBlank
;
import
org.hibernate.validator.constraints.NotEmpty
;
import
org.springside.modules.utils.Collections3
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
...
...
@@ -112,7 +113,10 @@ public class User extends IdEntity {
@Fetch
(
FetchMode
.
SUBSELECT
)
//集合按id排序
@OrderBy
(
"id ASC"
)
//缓存策略
@Cache
(
usage
=
CacheConcurrencyStrategy
.
READ_WRITE
)
//JSR303规则
@NotEmpty
public
List
<
Role
>
getRoleList
()
{
return
roleList
;
}
...
...
examples/showcase/src/main/webapp/WEB-INF/views/account/userForm.jsp
浏览文件 @
8c0cf8d0
...
...
@@ -18,14 +18,21 @@
rules
:
{
loginName
:
{
remote
:
"
${ctx}/account/user/checkLoginName?oldLoginName=
"
+
encodeURIComponent
(
'
${user.loginName}
'
)
}
},
roleList
:
"
required
"
},
messages
:
{
loginName
:
{
remote
:
"
用户登录名已存在
"
}
},
errorContainer
:
"
#messageBox
"
errorContainer
:
"
#messageBox
"
,
errorPlacement
:
function
(
error
,
element
)
{
if
(
element
.
is
(
"
:checkbox
"
)
)
error
.
appendTo
(
element
.
parent
().
next
()
);
else
error
.
insertAfter
(
element
);
}
});
});
</script>
...
...
@@ -37,7 +44,7 @@
<input
type=
"hidden"
name=
"id"
value=
"${user.id}"
/>
<fieldset>
<legend><small>
管理用户
</small></legend>
<div
id=
"messageBox"
class=
"alert alert-error"
style=
"display:none"
>
输入有误,请先更正。
</div>
<div
id=
"messageBox"
class=
"alert alert-error
input-large controls
"
style=
"display:none"
>
输入有误,请先更正。
</div>
<div
class=
"control-group"
>
<label
for=
"loginName"
class=
"control-label"
>
登录名:
</label>
<div
class=
"controls"
>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录