查看
方式一:用超链接
{ display: 'id', name: 'customid', align: 'left', 120, minWidth: 120,
render:function(row){
return "<a href='#' onclick='f_viewCustom("+row.customid+")'>"+row.customid+"</a>";[d1]
}
},
function f_viewCustom(customid){
top.f_addTab("viewcustom", '查看客户信息', 'custom/cusinformation!view.action?id='+customid+'&isView=true');
}
Action:
Service:
/**
* 客户浏览
*
* @return
* @throws Exception
*/
public String view() throws Exception {
// 组织基本信息
entity = cusInfoManager.getCusInfomation(id);
// 组织扩展信息
objectType = sysObjectTypeManager
.getSysObjectType(Constants.CUSTOM_OBJECT_ID);
if (id != null && objectType != null) {
List<SysExtraSet> extraSet = objectType.getExtraSet();
extraSet = this.organExtraSetValue(extraSet, id);
objectType.setExtraSet(extraSet);
}
entity.setTagList(organTagList(id));
Struts2Utils.getRequest().setAttribute("custom", entity);
Struts2Utils.getRequest().setAttribute("objectType", objectType);
[d2] return "view";
}
Dao:
Jsp:
<tr class=tableTr>
<td class="tdb">
<span>客户id:</span>
</td>
<td class="tdb2">
${custom.customid}
</td>
<td class="tdb">
客户名称:
</td>
<td class="tdb2">
${custom.name}
</td>
</tr>