Solutions to conflicts between DWZ and ASP. net mvc frameworks, dwzmvc

Source: Internet
Author: User

Solutions to conflicts between DWZ and ASP. net mvc frameworks, dwzmvc

A recent project used the integrated development of dwz and mvc. However, The lookup function in dwz has kidnapped the name tag, which makes it difficult to transmit values to the background, now we have set a separate bringbackname attribute for the tag for association.


Dwz. min. js


Rows 1 and 2714 change the attributes that are returned. The attributes that are originally returned are changed to the name attribute.

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

Rows 2 and 2861 add properties for th

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

3. Row 3: Change the replaceSuffix rule and add a replacement rule as the bringbackname attribute.

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

4. In row 3, change the generated th tag attribute, and set the html rule to 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> ';


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.