.NET DateTime serialised to JSON for use in ExtJs JsonStore(event store for ExtJs Calendar)?
By : Sandeep Pidshetti
Date : March 29 2020, 07:55 AM
|
Java Child Error in Hadoop TaskRunner
By : Florian
Date : March 29 2020, 07:55 AM
may help you . not sure if this is still relevant as hadoop is now version 1.0.x. If it can help I've managed to port 1.0.1 on cygwin-1.7 win-7 jdk1.7_x64.
|
Open a ExtJS Desktop Window on ExtJS grid item double click
By : allen
Date : March 29 2020, 07:55 AM
This might help you I don't think you are right about the code thing... But anyway, the code of this guy is a mess and mitchel already answered how it should be done. So forget about the code of the guy for a second, cause it is really simple to archive this. Here's a working snipped how you can do this: code :
Ext.define('Ext.ux.DemoWin', {
extend: 'Ext.window.Window',
alias: 'widget.demowin',
width: 200,
height: 200,
title: 'demo',
initComponent: function() {
this.callParent(arguments);
},
loadRecord: function(rec) {
// simplified - just update the html. May be replaced with a dataview
this.update(rec.data.name + ' - ' + rec.data.email);
}
});
Ext.create('Ext.data.Store', {
storeId:'simpsonsStore',
fields:['name', 'email', 'phone'],
data:{'items':[
{ 'name': 'Lisa', "email":"lisa@simpsons.com", "phone":"555-111-1224" },
{ 'name': 'Bart', "email":"bart@simpsons.com", "phone":"555-222-1234" },
{ 'name': 'Homer', "email":"home@simpsons.com", "phone":"555-222-1244" },
{ 'name': 'Marge', "email":"marge@simpsons.com", "phone":"555-222-1254" }
]},
proxy: {
type: 'memory',
reader: {
type: 'json',
root: 'items'
}
}
});
Ext.create('Ext.grid.Panel', {
title: 'Simpsons',
store: Ext.data.StoreManager.lookup('simpsonsStore'),
columns: [
{ text: 'Name', dataIndex: 'name' },
{ text: 'Email', dataIndex: 'email', flex: 1 },
{ text: 'Phone', dataIndex: 'phone' }
],
height: 200,
width: 400,
renderTo: Ext.getBody(),
listeners: {
// the registration should be done with the control() method of the responsible controller
itemclick: function(grid,record) {
var win = Ext.widget('demowin').show().loadRecord(record);
}
}
});
createWindow : function(){
var desktop = this.app.getDesktop();
var win = desktop.getWindow('grid-win');
if(!win){
win = desktop.createWindow({
// ...
loadRecord: function(rec) {
this.update(rec.data.name + ' - ' + rec.data.email);
}
//....
|
Using Ext.util.TaskRunner to display a clock in a load mask
By : F.Sanli
Date : March 29 2020, 07:55 AM
will be helpful for those in need Using ExtJS 5.1.0. , Got it, finally! Here is the configuration that worked: code :
var task, runner = new Ext.util.TaskRunner();
task = runner.newTask({
run: function () {
// show loadMask during request
Ext.getBody().mask("Computing..." + Ext.Date.format(new Date(), 'g:i:s A'));
},
interval: 10000
});
task.start();
|
running into issues with getting a taskRunner to run
By : user2259282
Date : March 29 2020, 07:55 AM
may help you . You can do this using some concepts from Builder pattern for an OperationExecutor class. Builder allows you to construct something step by step and at the end you can get the result. code :
class OperationExecutor {
constructor(value) {
this.value = value; //value is the initial number on which we operate
}
add(valueToAdd) {
this.value += valueToAdd;
return this.value;
}
multiply(multiplyBy) {
this.value = this.value * this.multiplyBy;
return this.value;
}
getValue() {
return this.value;
}
}
var operationExecutor = new OperationExecutor(2);
operationExecutor.add(4);
operationExecutor.multiply(5);
console.log(operationExecutor.getValue());
|