详细查看

查看

方式一:用超链接

{ display: 'id', name: 'customid', align: 'left', width: 120, minWidth: 120,

render:function(row){

                  return "<a href='#' οnclick='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>


 [d1]单击事件,调用方法,并传递id

 [d2]可不看,这是扩展字段的。查看,只需要根据id获得相应实体类即可

转载于:https://www.cnblogs.com/pujiajia/p/3287140.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值