Today, teacher Liang Yanbing explained Ajax. According to the feedback from the students yesterday, he thought that the ajaxtable project was too big and he had a hard time learning. He hoped that Mr. Liang could explain a small comprehensive case. Therefore, instructor Liang first explained the Javascript component of the xtree client, and then developed an Ajax demo Based on the xtree, Buffalo, spring, and hibernate frameworks.
Small gains:
VaR OBJ = {
A: 'xxx'
B: function (){}
}
Defines the attributes and methods of an object.
When you click an element on the tree, the returned seleteditem is an object of the element of the display layer, but the ID of the business layer corresponding to this element cannot be known.
This reminds me of the setuserdata method in the DOM node. For JavaScript objects, attributes can be dynamically added. You can temporarily set an attribute for the xtreeitem object so that it is equal to the business layer ID.
Why does buffalo integrate with spring based on the spring integration principle? It is nothing more than using spring to solve the dependency problem of service objects. To use spring, you must use its IOC and AOP functions. Do not abuse some frameworks blindly.
Instructor Liang analyzed the compilation of the entire ajaxtable, and the server integrated spring and hibernate.