<s:if>问题
来源: 互联网 发布时间:2017-01-04
本文导语: jsp action ...
jsp
action
tbUser = this.userManageService.findByUserid(id);
String hql1 = "from TbProfiles tb where tb.username='"+ tbUser.getUserName() + "'";
List proList = this.getAgentManager().findAllprofilesHql(hql1);
String hql2 = "from TbProfiles tb where tb.username is null and "+ "tb.name='" + proList.get(0).getName() + "'";
tbprofileList = this.getAgentManager().findAllprofilesHql(hql2);
if (tbprofileList.size()>0) {
List list = new ArrayList();
String hql = "from TbProfiles where username is null";
list = agentManager.findAllprofilesHql(hql);
if (list != null && list.size() > 0) {
for (TbProfiles dict : list) {
}
tbprofileList = list;
}
}
我做的是一个查看的页面 我想经过判断 从数据库中得到的值 当成默认 显示出来
这个判断 怎么去写 也就是 这块 求帮助
action
tbUser = this.userManageService.findByUserid(id);
String hql1 = "from TbProfiles tb where tb.username='"+ tbUser.getUserName() + "'";
List proList = this.getAgentManager().findAllprofilesHql(hql1);
String hql2 = "from TbProfiles tb where tb.username is null and "+ "tb.name='" + proList.get(0).getName() + "'";
tbprofileList = this.getAgentManager().findAllprofilesHql(hql2);
if (tbprofileList.size()>0) {
List list = new ArrayList();
String hql = "from TbProfiles where username is null";
list = agentManager.findAllprofilesHql(hql);
if (list != null && list.size() > 0) {
for (TbProfiles dict : list) {
}
tbprofileList = list;
}
}
我做的是一个查看的页面 我想经过判断 从数据库中得到的值 当成默认 显示出来
这个判断 怎么去写 也就是 这块 求帮助
|
ajax