DWZ和ASP.NET MVC等架構的衝突問題解決方案,dwzmvc

來源:互聯網
上載者:User

DWZ和ASP.NET MVC等架構的衝突問題解決方案,dwzmvc

最近的一個項目用到了dwz和mvc的整合開發,但是dwz中的lookup尋找帶回功能對name標籤進行了綁架,導致向後台傳值不好處理,現在為標籤 單獨設定一個屬性bringbackname來進行帶回的關聯


dwz.min.js


一、2714行,將帶回到的屬性變更,原先帶回到name屬性,現改為

var $input=$(this),inputName=$input.attr("bringbackname");

二、2861行,為th新增屬性

bringbackname: $th.attr("bringbackname") || "",

三、2914行,更改replaceSuffix規則,新增為bringbackname屬性的替換規則

bname = $this.attr('bringbackname');if (bname) $this.attr('bringbackname', bname.replaceSuffix(i));

四、2940行,更改產生的th得標籤屬性,拼html規則,lookup的改為

suggestFrag='autocomplete="off" lookupGroup="'+field.lookupGroup+'"'+suffixFrag+' suggestUrl="'+field.suggestUrl+'" suggestFields="'+field.suggestFields+'"'+' postField="'+field.postField+'"';}html='<input type="hidden" name="'+field.lookupGroup+'.'+field.lookupPk+suffix+'"/>'+'<input type="text" name="'+field.name+'"'+ 'bringbackname="'+field.bringbackname+'"'+suggestFrag+' lookupPk="'+field.lookupPk+'" size="'+field.size+'" class="'+field.fieldClass+'"/>'+'<a class="btnLook" href="'+field.lookupUrl+'" lookupGroup="'+field.lookupGroup+'" '+suggestFrag+' lookupPk="'+field.lookupPk+'" title="尋找帶回">尋找帶回</a>';


聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.