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获得相应实体类即可

  • 相关阅读:
    日期格式设置
    ccnet编译后dll被删除
    GridView使用
    项目发布命令
    虚拟内存技术原理和使用方法
    一种可以穿透还原卡和还原软件的代码
    DataList控件也玩分页
    如何在 Windows XP 或 Windows Server 2003 的应用程序开发中实现 URL 验证
    vc 6.0中开发驱动设备程序配置方法
    通过CreateFile来读取磁盘扇区的方法
  • 原文地址:https://www.cnblogs.com/pujiajia/p/3287140.html
Copyright © 2011-2022 走看看