今天在问答中看到这样的问题,我这里给出简单的实现,没有后台,纯extjs代码实现component的titlechange问题
Ext.define('TitleChange', {
extend: 'Ext.data.Model',
fields: [
{name: 'title',mapping:'title'}
],
idProperty: 'titleChange'
});
Ext.onReady(function () {
var myData = [
{'title':"WindowTitileChange"}
];
var store = Ext.create('Ext.data.ArrayStore', {
model: 'TitleChange',
data: myData,
autoLoad: true
});
var win = Ext.create('Ext.window.Window', {
title: 'Hello',
height: 200,
width: 400
});
store.load({
callback : function(r, options, success) {
win.setTitle(store.getAt(0).data.title);
win.show();
}
});
});
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Test</title>
<link rel="stylesheet" type="text/css" href="../../extjs-4.1.0/resources/css/ext-all.css" charset="UTF-8">
<script type="text/javascript" src="../../extjs-4.1.0/ext-all-debug.js"></script>
<script type="text/javascript" src="test.js"></script>
</head>
<body>
<div id="test" style="margin:10px;height:800px;"></div>
</body>
</html>
分享到:
相关推荐
color from red to green in the specified display state of the component part. This is not the overriding color level. 6. Closes, but does not save, the assembly document. 7. Opens the component's ...
标题和描述中提到的《Carbonomics-The future of energy in the age of climate change.pdf》文档,主要探讨了气候变化时代能源行业的未来走向,特别是通过技术革新和资本市场的压力重塑能源领域。文中强调了在发电...
As the computer industry changes from single-processor to multiprocessor architectures, this revolution requires a fundamental change in how programs are written. To leverage the performance and power...
We found suitable direction-change features of the imaginary strokes in the pen-up state for on-line handwritten cursive character recognition. Our method simultaneously uses both directional features...
(b) the name of the table, the names of the table's attributes, the data types of the table's attributes, the formats of the table's attributes, and the maximum number of rows that the table can have...
This component lists a list of TDBSum objects that include the type of operation (goSum or goCount), as well as the field name for displaying the calculation, and performs the corresponding request. ...
The breathtakingly rapid pace of change in computing makes it easy to overlook the pioneers who began it all. Written by Martin Davis, respected logician and researcher in the theory of computation, ...
Because many readers are familiar with the layout of the first edition, we have tried to change it as little as possible. Here is a summary of the main changes: 1On the Web, this quote has been ...
As more and more connected devices generate data, we will need to solve the problem of how to collect, store, and make sense of IoT data by leveraging the power of database systems. The book begins ...
Source code of registry manager.... 4)Change the Title of Windows Media Player. 5)Remove Recent Documents from the Start Menu. 6)Hide the Taskbar Clock. 7)Remove Username from the Start Menu.
Viewer ActiveX SDK is a fully featured, ready to incorporate facsimile of the End User PDF-XChange Viewer, again embedded within a Window of the application, the developer is able to hide and disable ...
FRM 2020 Current Issues指定阅读材料。"The Impact of Blockchain Technology on Finance: A Catalyst for Change,” International Center for Monetary and Banking Studies, 2018.
UV-B辐射和遮阴对地黄幼苗和根际梓醇含量的影响,张佩佩,张中田,本研究以地黄(Rehmannia glutinosa Libosch.)为材料研究UV-B辐射和遮阴对地黄幼苗和根际梓醇含量的影响。利用水培方法,将地黄分别培养于�
Moreover, we discuss the control parameters which can change the behavior of the mapping, and also find that the maximum period can change with the control parameter. Furthermore, we analyze some ...
Fundamentals of the JavaMail API Presented by developerWorks, your source for great tutorials ibm.com/developerWorks Table of Contents If you're viewing this document online, you can click ...