zoukankan      html  css  js  c++  java
  • 详细查看

    查看

    方式一:用超链接

    { 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>


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

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

  • 相关阅读:
    HDU 3709 Balanced Number
    HDU 3652 B-number
    HDU 3555 Bomb
    全局和局部内存管理
    [转]
    [转]
    [转]
    The Stable Marriage Problem
    STL各种容器的使用时机详解
    Qt中图像的显示与基本操作
  • 原文地址:https://www.cnblogs.com/pujiajia/p/3287140.html
Copyright © 2011-2022 走看看