This series mainly includes the following content:
The design of MIS architecture based on ExtJS.
The dynamic loading of JS.
Use the database to save client state.
Polling and stateless design.
Use action to abstract client actions.
Client MVC.
Finally, if there is energy, then write some ExtJS performance aspects of the experience.
The examples in this article, the code, and so on are from real pro
Extjs initializes the checkboxgroup value Code. For more information, see.
The Code is as follows:
Ext. override (Ext. form. CheckboxGroup ,{SetValueForItem: function (val) {// multiple option values are separated by commasVal = "," + val + ","This. items. each (function (item ){If (val. indexOf (item. inputValue)>-1 ){Item. setValue (true );} Else {Item. setValue (false );}});}, ClearValueForItem: function () {// clear all valuesThis. items. ea
Today, I helped my friend solve the problem: how to get the information of the first leaf node of the tree using the ExtJs TreePanel control.
The principle is very simple, that is, the sequence traversal of the tree. When the first leaf node is encountered during the traversal process, the work is completed.
Results::The Code is as follows:
The Code is as follows:
Var currentRootNode = null; // the currently selected Root NodeFunction NodeClass (){
This article discusses the default expansion of the RowExpander control in Extjs. The following is a good example. If you are interested, refer
The Code is as follows:
// Expand the row that meets a conditionFunction expendRow (){Var I; // temporary variable for LoopVar arr = []; // array of rows to be expandedFor (I = 0; I
{
Var record = ProdRequireInfoStore. getAt (I); // traverse each row cyclically
If (record. data. StatusID
You may have seen the drag and drop effects. The implementation method is similar. In the following article, I will introduce how ExtJS is used.
The Code is as follows:
Hello
other user information, you can construct the object based on the actual situation, as long as it is easy to access.
There is a problem here, that is, all objects simplecms may be null here, so you need to call the NS method of ext to name it. This can be added to the loader and the code is as follows:
Ext. NS ('Extmvcone');Then run and log on to the system through Firefox firenbug. I logged on to the admin as the system administrator.
Finally, all the code in the index View
This article describes how to select the last selected node after ExtJS refresh by default, if you need a reload operation, you may need to reload the tree after performing operations on the tree node. However, many businesses need to select the last selected node by default after the tree refreshing. In this way, you must first save the information of the previous selected node, and then expand it layer by layer through the node information after rel
Page code:
[Javascript]View plaincopyprint?
Event examples, including user-defined events and Use of on, addListener, and EventManager.
Move the mouse over to me!
Js Code
[Javascript]View plaincopyprint?
/*************************************** *
* Use custom events
*/
Var Person = function (){
// Register an event. The event name is "say ".
This. addEvents ("say ");
// Register multiple events in another way
This. addEvents ({
"Run": true,
"See": fal
Create a new my directory, and all subsequent sample files will be created in this directory.1. Hello world!First look at all the hello World pages of extjsCode:
Copy code The Code is as follows:
The result is as follows: Note that the sequence of JS files introduced above cannot be reversed, otherwise the correct results cannot be obtained. 2. Ext. MessageBoxExt. MessageBox provides common prompt box functions. Ext. MSG is an object exactly the same as it, but its name is different. Ext. M
Extjs implements paging and transmits data using jsp. The specific implementation process is as follows.
Ext. onReady (function () {store3 = new Ext. data. jsonStore ({autoDestroy: true, totalProperty: 'totle', url: 'service. do ', storeId: 'mystore', root: 'data', fields: ['id', "name", "pw"]}); var pagingToolbar = new Ext. pagingToolbar ({emptyMsg: "No data", displayInfo: true, displayMsg: "displays {2} pieces of data from {0} to {1} pieces of data
Class.registerpreprocessor (' ClassName ', function (CLS, data) { if (data. $className) { cls. $className = data.$ ClassName; First look at the ClassName processor, which is relatively simple, the third parameter is true, indicating that this is a must be performed by the preprocessor, debug source code debugging.Ext.define ("My.test.AAA", {aaa: ' AAA ', BBB: ' BBB '});The CLS can be understood as a class that adds a static property $classname to the class, and by ob
= "color: #800000;" > " ) // get Dom 3 Ext.query ( " div:first-child ) // get DOM through pseudo class, support most of CSS3 selector 4.ExtJS Operation Dom and CSS supplementThere are many ways to ExtJS the DOM, and here's a quick addition. Select gets Dom,extjs in the fly and get get DOM objects ar
ExtJS can be used to access container objects. For more information, see.
I. Attributes
OwnerCt: Get the container of the current object.
Items: set list
II. Application Example
The Code is as follows:
Ext. onReady (function (){Var _ window = new Ext. Window ({Title: "test form ",Layout: "form ",Width: 300,Plain: true,Items :{Id: "name ",Xtype: "textfield ",FieldLabel: "name"},Buttons :[{Text: "OK ",Handler: function (){Alert (this. ownerC
You may have seen the drag and drop effects. The implementation method is similar. In the following article, I will introduce how ExtJS is used.
The Code is as follows:
Hello
In ExtJS, the dynamically generated xml file can only be run by IE. To ensure compatibility, Firefox users must be considered.
The Code is as follows:
Function getXml (){// Obtain the input valueVar name = textName. getValue ();Var pwd = textPwd. getValue ();// Initialize the objectVar xmlDoc = document. implementation. createDocument ("", "", null );XmlDoc. async = "false"; // cancel the xml commit action before the complete data is filled in.// W
Original http://www.cnblogs.com/aehyok/archive/2013/04/27/3048278.html
Preface
Image management should be used in two places: one is image management in the tab, and the other isArticleThe content is embedded in the inserted image window during editing. Therefore, it is more convenient to make image management an extension. Of course, you can also make it into the MVC model without argument or discussion.
Remember, extensions should be written in the scripts \
Now MVC uses Modelbinder, controller can now accept many complex types of parameters, but for Jquery,extjs and other JS frameworks, more of the JSON format and server-side transfer parameters more reasonable. For simple parameters, We can post directly to the server side without the JSON format. For example, the user login, we only pass the username and password into the controller:
Handler:function Checklogin () {if (Form.isvalid ()) {var formvalue
In the company internship this period of time, mainly to do the Java aspect.
Learn the ExtJS to layout, realize front-end development.
In the process of learning, profound experience to a word: 工欲善其事 its prerequisite.
The following is a detailed description of the installation of the ExtJS plug-in:
Myeclipse8.5/springsource Tool Suite (STS) Installation ExtJS plu
just take out a single control and you can use it. 4. To develop the system application, the preferred ext, the control library is rich, the extension and the maintenance are convenient. For simple page animations and effects, jquery is preferred 5.jquery is just a tool library, simple and relatively easy. Ext is a true RIA development framework that can even be as powerful as desktop applications. The code itself is extremely high-quality and highly
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.