• 详细查看


    查看

    方式一:用超链接

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

  • 相关阅读:
    git命令使用方法
    git与svn对比
    浏览器缓存原理
    网络性能优化常用方法
    sass/scss 和 less的区别
    AngularJS和ReactJS对比
    让IE6,7,8支持HTML5新标签的方法
    Retina 屏移动设备 1px解决方案
    HttpClient学习
    国家二字码对照表
  • 原文地址:https://www.cnblogs.com/pujiajia/p/3287140.html
Copyright © 2020-2023  润新知