How to apply the Code generated in extdesign to JSP

Source: Internet
Author: User

Step 1: drag and drop in extdesign to generate a page and export the Code as follows:

(Take generating a simple Panel as an example)

Ext. mypanel = ext. extend (ext. panel, {xtype: "Panel", title: "My panel", width: 400, height: 250, initcomponent: function () {Ext. mypanel. superclass. initcomponent. call (this );}})

Step 2: introduce the required JS and CSS files on the JSP page and create a new JavaScript label header. The Code is as follows:

Ext.onReady(function(){});

Part 3 cut the generated code into the function (note that the initialization function is removed and an ID is specified for receiving on the page). The Code is as follows:

Ext. onready (function (){
MyPanel=Ext.extend(Ext.Panel ,{
Renderto: "test", // Add a line here, pointing to the idxtype: "Panel", title: "My panel", width: 400, height: 250, initcomponent: function () {mypanel. superclass. initcomponent. call (this); // remove Ext. if you do not use the initialization method, the initialization parameters will not be displayed }});

VaR UI = new mypanel ();});

Step 4: add the receiving container to the body tag on the JSP page

<div id="test"></div>

Related Article

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.