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>