mercredi 30 avril 2014

Creating hasMany associations in Sencha Touch 2

I'm trying to create a simple model association in Sencha Touch 2.3.1.

Basically I want to have a store of coupons, arranged in categories. So every category hasMany coupons.

My data is currently hardcoded in the store declarations (no proxy or server).



Category model declaration :



Code:



Ext.define('Category', {
extend: 'Ext.data.Model',
requires:['Ext.data.Model'],
config: {
idProperty: 'id',
fields: [
{ name: 'id'},
{ name: 'name' },
{ name: 'itemType'}
],
hasMany: [
{
associatedModel: 'Coupon',
name: 'Coupons',
foreignKey: 'category_id'
}
]
}
});



Coupon model :



Code:



Ext.define('Coupon', {
extend: 'Ext.data.Model',
config: {


fields: [
{ name: 'couponId'},
{ name: 'title'},
{ name: 'description'},
{ name: 'category_id'},
],
belongsTo: [
{
model: 'Category',
name: 'Category',
associationKey: 'category_id'
}
]
}
});



Category store and data:



Code:



Ext.define('CategoryStore', {
extend: 'Ext.data.Store',


config: {
autoLoad: true,


data: [
{
id: 1,
name: "cat1"
},
{
id: 2,
name: "cat2"
}
],
model: 'Category',
storeId: 'CategoryStore'
}
});



Coupon Store :


Code:



Ext.define('CouponStore', { extend: 'Ext.data.Store',
config: {
autoLoad: true,


data: [
{
id: '1',
title: 'coupon1',
description : 'some desc',
category_id:1
},
{
id: '2',
title: 'coupon2',
description : 'desc2',
category_id:2
}
],
model: 'Coupon',
storeId: 'CouponStore'
}
});




And finally, the code in the launch function in app.js :


Code:



Ext.application({
name: 'hasmany',


launch: function () {
// Destroy the #appLoadingIndicator element
Ext.fly('appLoadingIndicator').destroy();


var categoryStore = Ext.create('CategoryStore');
var cat2 = categoryStore.findRecord('name','cat2');


console.log(cat2.getData()); //This works fine


console.log(cat2.Coupons().getData()); //This returns an empty array
}
});




The Results : The hasMany association method cat2.Coupons() returns an empty array :


Chrome console :


Code:



> Object {id: 2, name: "cat2", itemType: undefined} app.js:100
Class {all: Array[0], items: Array[0], keys: Array[0], indices: Object, map: Object…}

Any help would be appreciated, thanks !



***
EDIT : I managed to achieve the desired results using a manual filter:



Code:



var couponStore = Ext.create('CouponStore');
couponStore.filter('category_id',2);

So that's good enough for me at the moment, however I would be very interested to know why my previous code didn't work.



select listener in CheckboxModel gets called when checkbox is checked on store load

I am new to EXTJS. I have grid with a checkbox, and the checkbox will be checked or unchecked based on the boolean field in the model. I have this listener which does that when the store is loaded .Here is the following code. listeners: {

afterrender: function(obj)

{


var store = THIS.deployAnalyticsGridStore;

var model = THIS.deployAnalyticsGridView.selModel;

model.suspendEvents();

store.load(

{

scope : this,

params : {

method : 'getDevices',

eventId : 'nativemethodcall',

subEventId : ''

},

callback: function(records, operation, success)

{

model.suspendEvents();

// console.log("The call back is called");

//var model = THIS.deployAnalyticsGridView.selModel;

// model.suspendEvents();

var count = store.getTotalCount();


for (var i = 0; i < count; i++) {


var record = store.getAt(i);

if(record != undefined)

{


if (record.get('analyticsEnabled') == true) {


model.selectRange(i, i, true);

}

}

}

model.resumeEvents();

}

});

}

}


After the UI is rendered , I have listeners in checkbox selection model which will be called when the user checks or unchecks the checkbox and updates the model respectively. Code


listeners :

{


deselect: function(model, record, index)

//alert('deselect called');

{

var store = THIS.deployAnalyticsGridStore;

var record = store.getAt(index);

record.set("analyticsEnabled", false);

THIS.deployAnalyticsGridView.refresh();

},

select: function(model, record, index)

{

//alert('select called');

var store = THIS.deployAnalyticsGridStore;

var record = store.getAt(index);

record.set("analyticsEnabled", true);

THIS.deployAnalyticsGridView.refresh();

},

selectionchange: function(model, selected, eOpts)

{

//alert('selection called');

var count = THIS.deployAnalyticsGridStore.getTotalCount();

var selcount = selected.length;

if (selcount == 0)

{

model.deselectAll(true);

var store = THIS.deployAnalyticsGridStore;

var count = store.getTotalCount();

for (var i = 0; i < count; i++) {

var record = store.getAt(i);

if (record.get('analyticsEnabled') == true)

{

record.set("analyticsEnabled", false);

}

}

THIS.deployAnalyticsGridView.refresh();

} else if (selcount == count)

{

model.selectAll(true);

var store = THIS.deployAnalyticsGridStore;

var count = store.getTotalCount();

for (var i = 0; i < count; i++)

{

var record = store.getAt(i);

if (record.get('analyticsEnabled') == false)

{

record.set("analyticsEnabled", true);

}

}

THIS.deployAnalyticsGridView.refresh();

}


}

}

}),


The problem I am facing is that, the selection checkbox model listeners(select & selection change ) function gets called when the call back functions checks the checkbox during the store load .I have suspended the model event like this var model = THIS.GridView.selModel; model.suspendEvents(); during the call back, but it doesn't seems to work .Please help.





Pagination not working.

Hello,

I am trying to get a list of records from database and display them in my search results grid. But for some reason the pagination is not working. It is displaying all the records in the first page and the pagination tool bar shows Page 0 of 0, with previous and next buttons getting disabled. I know I am missing something in my code and I tried different ways but of no result.

My code:


this.dockedItems = [

{

xtype: 'pagingtoolbar',

dock:'bottom',

layout: 'hbox',

items: [

{

store: myEmailStore,

displayInfo: true,

displayMsg: 'Displaying emails {0} - {1} of {2}',

emptyMsg: "No emails to display"

},]


}];

initComponent: function() {

var myEmailStore = Ext.create('First.store.Emails', {

autoDestroy: true

});

this.items = [

{

xtype: 'firstgridpanel',

cls:'gridList',

store: emailStore,

itemId: 'myEmailSearchResultsGrid',

columns: [

{

header: 'Email ID',

width: 100,

dataIndex: 'emailId',

sortable: true

},

{

header: "Subject",

width: 170,

dataIndex: 'subject'

},

{

header: "Received Date",

width: 170,

dataIndex: 'receivedDtFormatted',

sortable: true

},

] }

];


Then I am having

Ext.define('First.store.Emails', {

extend: 'Ext.data.Store',


requires: ['First.model.Email', 'First.EHelper', 'Ext.data.proxy.Ajax'],


model: 'First.model.Email',

autoLoad: false,

storeId: 'emails',

pageSize: 20,


proxy: {

type: 'ajax',

method: 'POST',

url : First.EHelper.getBaseUrl() + 'email/queryMymails',

enablePaging: true,

reader: {

type: 'json',

totalProperty: 'total',

root: 'data',

successProperty: 'success'

},

listeners: {

exception: function(proxy, response, operation){

Ext.MessageBox.show({

title: 'REMOTE EXCEPTION',

msg: operation.error,

icon: Ext.MessageBox.ERROR,

buttons: Ext.Msg.OK

});

}

}

}

});


On the Server Side, I am setting everything like the pagesize,list, etc in a Jason object and returning. On the server side I am getting all the correct values. Not sure what's happening once I return the Json object.

Any help/suggestions?..





IE11 close and maximize buttons orientation

Hi,

Im having an issue with extjs 4.0.7 and IE11 and I can't upgrade to a newer version of extjs.


On my windows, the buttons "close" and "maximize" are align to the left insted of the right. This only happend in IE11, in the other browsers it looks great.


Any fix I can apply here?


Thx





ExtJs and Sencha Touch

Combo live search with SQL

search.png

Code:



...
{
xtype: 'panel',
region: 'west',
tbar: [{
xtype: 'combo',
id: 'searchCombo',
store: Ext.create('Ext.data.Store', {
id: 'searchStore',
model: Ext.define("SearchModel", {
extend: 'Ext.data.Model',
fields: ['id', 'name']
})
}),
triggerAction: 'query',
displayField: 'name',
triggerCls: 'x-form-search-trigger',
listConfig: {
loadingText: 'Searching...',
emptyText: 'user not found.',
// Custom rendering template for each item
getInnerTpl: function () {
return '<span>{name}</span>';
}
},
listeners: {
change: function (combo, newValue, oldValue, eOpts) {
if (newValue.trim().length == 3) {
searchUser(newValue); // sql table search
}
}
}
}
}
...


function returnedData(data) { // returned data: [{id: 'us001', name: 'Mücahid DANIŞ'}]
if (Ext.isArray(data)) {
for (var i = 0; i < data.length; i++) {
searchStore = Ext.data.StoreManager.lookup('searchStore');
searchStore.loadData(data);
}
}
}

data added to combo store but combobox not collapse Note: sql search with xmpp


how to filter store data from view

store:


Code:



Ext.create('Ext.data.Store', { storeId: 'sid', fields: ['name', 'enable', 'label', 'maxlength', 'order'], data: { 'items': [ { 'name': 'Lisa', "enable": true, "label": "555-111-1224", 'maxlength': 5, 'order': 3 }, { 'name': 'Bart', "enable": false, "label": "555-222-1234", 'maxlength': 5, 'order': 3 }, { 'name': 'Homer', "enable": true, "label": "555-222-1244", 'maxlength': 5, 'order': 3 }, { 'name': 'Marge', "enable": false, "label": "555-222-1254", 'maxlength': 5, 'order': 3 } ] }, proxy: { type: 'memory', reader: { type: 'json', root: 'items' } } });

view is grid bind to this store:


Code:



Ext.define('AlertScheduler.view.EventTitleGrid', { extend: 'Ext.grid.Panel', alias: 'widget.EventTitleGrid', store: Ext.data.StoreManager.lookup('sid'), columns: [ { text: '', dataIndex: 'name', flex: 1, align: 'center' }, { text: 'Enable', dataIndex: 'enable', width: 60, align: 'center' }, { text: 'Label', dataIndex: 'label', width: 140, align: 'center' }, { text: 'Maxlength', dataIndex: 'maxlength', width: 70, align: 'center' }, { text: 'Order', dataIndex: 'order', width: 60, align: 'center' } ], width: 450, forceFit: true, initComponent: function () { this.callParent(arguments); } });

From what I understand(i am new for Extjs if I was wrong please correct me) store will automatic load into view when view create.

question: how can I filter the store data before it load into view ? (for example I only want to load the data which name = Lisa) is there any method I can filter data in view level (grab all store data to view and filter them before actually load into view),

or can I pass the filter from view to store so store will filter data and return the data that view required ? (in my case I have different view share same store view1 look up data name = 'Lisa' and view2 look up data label = '555...' if the view pass different filter to store, store will return different sets data)


Changing .sencha location

I'm trying to move the .sencha directory to something non-hidden and then build with Touch 2.3.1.

The reason I want to move it is that our deployment scripts use tar and therefore don't pick up the hidden files. I do not want to change that behavior of those scripts.


After moving the .sencha directory and updating all the paths, running:


results in an error about the command needing to be run from an sdk directory.

Both the -s and --sdk-path flags seem to have no effect.


Is changing the location of the .sencha directory something that can/should be done? If so, some guidance on how would appreciated.





Is the config object concept now the same as in Touch?

Is this config object concept is now the same what the Touch has?

Can I or should I do this in Ext 5?



Code:



Ext.define("User", {
extend: "Ext.data.Model",
config: {
fields: [
{name: "firstName", type: "string"},
{name: "lastName", type: "string"},
{name: "age", type: "int"},
{name: "eyeColor", type: "string"}
]
}
});




why my initialize is no fire

I follow some sample code from google and wonder why initialize method is not fire(extjs 4.21). Can someone help?

below is my code:

Ext.define('Ext4Example.view.stock.StockPanel', { extend: 'Ext.form.Panel', alias: 'widget.stockpanel', config: { height: 455, id: 'FoodPanel', layout: { type: 'vbox' }, scrollable: 'vertical', items: [ { xtype: 'panel', height: 47, id: 'rowTitle', layout: { type: 'hbox' } } ] }, initialize: function () { console.log('gg'); }});





FormPanel causing opening of new blank tab on safari browser after submit



  1. Thank you for reporting this bug. We will make it our priority to review this report.







  2. Default FormPanel causing opening of new blank tab on safari browser after submit



    FormPanel causing opening of new blank tab on safari browser after submit





    Hi,

    We are using GXT 2.3.1. The FormPanel(java.lang.String target) is causing opening of new blank tab on safari browser after submit.

    We are using below code:


    FormPanel form= (target != null) ? new FormPanel(target): new FormPanel();


    The bug does not get replicated on simply using the default constructor of formPanel as below:


    FormPanel form = <strong>new</strong> FormPanel();


    Is there a workaround for closing the extra tab in case of FormPanel(java.lang.String target) constructor?


    Thanks,

    Shweta














building examples for new Theme

[unable to retrieve full-text content]I am trying my new theme using the examples packaged inside the SDK. i made a change in ThemeSwitcher.js to load my new theme - but seems like...


Wanted: Sencha Touch developer / expert

I'm a student and currently doing my thesis. I need to ask a couple of questions to someone who has worked with Sencha Touch regarding the framework.

It will not take long to answer the questions. If someone could help me out it would be a big help.

I'll paste the questions below so if anyone wants to answer they can just reply this thread (or pm me)

Also, IF you want (its not mandatory at all) it would be awesome if you could start with some information about yourself (title (if you work with programming proffessionally), how long you worked with sencha etc).

Questions:

1. Are there any predefined components/controls that you can use? For example buttons, tables etc


2. Which different binding types are supported? (One way, One Time, Two Way etc)


3. Is it easy to generate objects from a model? For example, lets say that a model consist of JSON data with a list of 10 different products. The products has name, price, type etc. If you want to create 10 components (for example table rows, tiles) based on this model, how straightforward is this?


4. Can a webapplication developed in AngularJS automatically adapt itself to different devices? That is, will the application look good both on desktops, smartphones and tablets without needing to write three variants of code?


5. Many frameworks supports modern webbrowsers, but how is the support for older browsers?

Does AngularJS support “Graceful degradation” or something similar?


6. Are there lots of information regarding the framework? (Communities, official documentation like API etc, courses)


7. Is it possible to integrate the framework development into eclipse or other IDE? To get for example the code completion feature for the framework.


Thanks!





Sencha Cmd - Is it possible to catch a sass build error

Hi

I'd like to catch sass build errors so that i can halt deployment of broken css files. Ive been through the compass documentation and the sencha build documentation but cant find anything to do this. Does anyone know if this is possible?


Many Thanks





Sencha Architect XTemplate scope

mardi 29 avril 2014

grid cell display non-ascii character in utf8 encoding value rather than the charater

Updated public beta files please

Hi,

Its been awhile since the public beta release and we are trying to get our application running on ExtJS 5 on a tablet so we can undertake a performance assessment.


Can we please get an updated set of public beta files ASAP as I'm sure the team have resolved numerous issues and bugs that have been raised since the first set of public beta files.

The same is needed for Sencha CMD 5.0


Would be greatly appreciated





Container.doLayout() question

I have lots of nested containers. One of the inner container now has more components in it and needs to be resized.

Do I call doLayout() on the inner most container with the added components and the message bubbles up? Or, do I call doLayout() on the outer most container and it calls doLayout() on it's children??


Is there any documentation which explains how this works?


All help is appreciated...

F





Ext.Msg customization

Problems "Ext.Loader"

Good afternoon, trying to give the path to the "ux" folder to work with the "ClearButton.js" class, I see this error:

"Uncaught Error: The following classes are not declared even if their files have been loaded: 'Ext.app.Application'. Please check the source code of their corresponding files for possible typos: './app/Application.js"



Code:



// @require @packageOverrides
Ext.Loader.setConfig({
enabled: true,
paths: {
Ext: '.',
'Ext.ux': 'ux'
}
});


Ext.application({


requires: [
'Ext.Loader'
],
views: [
'MyPanel'
],
name: 'MyApp',


launch: function() {
Ext.create('MyApp.view.MyPanel', {renderTo: Ext.getBody()});
}


});

Any advice please, thank you very much.

Sencha Architect





Which layout to use for an app that's height keeps increasing?

Hey All,

I'm hoping someone can give me some advice on which layout to use... (So little time, so may layouts... ).


Our app is designed to dynamically add containers / panels as the user interacts with it. The app basically uses a fixed width and the panels are appended so that the app grows vertically.


Our problem is that once we reach the limit of the vertical dimension of the browser height, the new child panels aren't rendered. No scroll bar appears.


We're currently using a layout : 'border' with some minor info in the north region and the rest of the app in the center region. Is a border layout designed to live within a browser window and never have scroll bars?


What layout would you recommend?


All help is appreciated,

F





Am I using the addConfig method correctly?

I was expecting the first getMsg call to return "Hi there!", but I see undefined.


Code:



Ext.define('MyClass', {
isMyClass: true
});


var obj = new MyClass();


obj.self.addConfig({
msg: 'Hi there!'
});


console.log(obj.getMsg()); // <-- Why undefined?
obj.setMsg('Hello');
obj.getMsg(); // <-- "Hello"




How do you build multiple files of the same app?

[unable to retrieve full-text content]I am just wondering what you guys did to generate the different extjs files. Did you use multiple properties files or is there a configuration I can...


Why does Ext 4.2 use x-form-trigger-first and 4.1 used x-form-trigger-last?

So you have a combo box that has a trigger.

In 4.1.x The last trigger button in a combo gets the cls (amongst others) of x-form-trigger-last:



Code:



...
triggerConfigs[i - 1].cn.cls += ' ' + triggerBaseCls + '-last';
...



But in 4.2 the *first* trigger gets x-form-trigger-first:

Code:



...
triggerConfigs[0].cn.cls += ' ' + triggerBaseCls + '-first';
...

Why is that such a problem?

Because you can always guarantee the position of the last trigger but not the first - last is always the right-most, first is only right-most if there's only one trigger.


So if, for example you want to make sure your right most trigger has a right border but others don't - easy in 4.1 and very difficult in 4.2:


http://ift.tt/1m8ry4a


Looking at the markup you can see why:


http://ift.tt/1mX8GSt


If the triggers were in the same table cell, we could rely on :first-of-type, :last-of-type. But they're not.


I can't see any meaningful reason why this change would be necessary. Can anyone help enlighten me?





Handling multiple Ext.MessageBox alerts?

Preventing first grid row from scrolling

I need to lock the first row in my grid to prevent it from scrolling vertically. This is essentially like adding second header however it should look like a row and should contain data from the grid model.

One approach I contemplate is to separate the first row data out in the model and modify the header template to make the second header row look like a regular data row. The disadvantage is that I will have to provide data binding to the second header row to populate it with the numbers I need.


Does anyone have an example of this done (e.g. via a plugin)? Seems like a very common feature (freezing a grid row), and one already done with columns as this post suggests....


P.S. This is very similar to locking columns in this example, except I need it with rows:

http://ift.tt/1iyi89G





Ext.mixin.Observable. clearManagedListeners - minor incompatibility with 4.*



  1. You found a bug! We've classified it as



    EXTJS-13246
    .

    We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.







  2. Default Ext.mixin.Observable. clearManagedListeners - minor incompatibility with 4.*



    Ext.mixin.Observable. clearManagedListeners - minor incompatibility with 4.*





    There's a minor incompatibility in the clearManagedListeners method. In 4.x, this method has no return value, but in 5.0 it may return 'this'.


    Code:



    Ext.define('Ext.mixin.Observable', {
    ...
    clearManagedListeners: function(object) {
    ...
    if (object) {
    ...
    delete managedListeners[id];
    // return this;
    return; // <-- use just return w/o this?
    }

    for (id in managedListeners) {
    if (managedListeners.hasOwnProperty(id)) {
    this.clearManagedListeners(id);
    }
    }
    },
    ...
















how to destroy dom elements associated with Extjs component to avoid memory leaks?

Grid with Comboboxes - controlling the content of the comboboxes in the same row

I built a Grid which contains multiple columns with ComboBoxCell objects only. I have the following problem. I want to change the content of the combobox in the second column, if I change the value in the first row.

But it should work only for the current row, not for the whole grid. By default the comboboxes of the second row are inactive (read-only), if I select in the first combo box a value other than PublicationLevel.PRIVATE, the values in the second combo box should be set.

Here is how I declare them.



Code:




ColumnConfig<PublicationPolicyDto, PublicationLevel> publicationLevelCol;
ColumnConfig<PublicationPolicyDto, KeyValueObject<Integer, String>> publStructureMainCol;

The PublicationPolicyDto is my class with data, the PublicationLevel is a java enum for the first combobox column. KeyValueObject is a key - value pair class for the second combo box column

The first column is instantiated by the following method call, which is appropriately parametrized.



Code:



private <T extends Enum<T>> ColumnConfig<PublicationPolicyDto, T> createComboBoxColumn(ListStore<T> dataStore, int width, String name, SelectionHandler<T> selHandler,
ValueProvider<PublicationPolicyDto, T> prop, LabelProvider<T> lblProv) {
ColumnConfig<PublicationPolicyDto, T> column = new ColumnConfig<PublicationPolicyDto, T>(prop, width, name);

ComboBoxCell<T> cmbCell = new ComboBoxCell<T>(dataStore, lblProv);

cmbCell.addSelectionHandler(selHandler);
cmbCell.setForceSelection(true);
cmbCell.setAllowBlank(false);
cmbCell.setTriggerAction(TriggerAction.ALL);
column.setCell(cmbCell);
return column;
}

This method creates the second combobox column.

Code:



private ColumnConfig<PublicationPolicyDto, KeyValueObject<Integer, String>> createComboBoxColumnGen(ListStore<KeyValueObject<Integer, String>> store, int width, String header,
SelectionHandler<KeyValueObject<Integer, String>> selHandler, ValueProvider<PublicationPolicyDto, KeyValueObject<Integer, String>> prop) {

ColumnConfig<PublicationPolicyDto, KeyValueObject<Integer, String>> column = new ColumnConfig<PublicationPolicyDto, KeyValueObject<Integer, String>>(prop, width, header);

ComboBoxCell<KeyValueObject<Integer, String>> cmbCell = new ComboBoxCell<KeyValueObject<Integer, String>>(store, new LabelProvider<KeyValueObject<Integer, String>>() {
@Override
public String getLabel(KeyValueObject<Integer, String> item) {
return item.getValue();
}
});
cmbCell.addSelectionHandler(selHandler);
cmbCell.setForceSelection(true);
cmbCell.setTriggerAction(TriggerAction.ALL);
cmbCell.setReadOnly(true);
column.setCell(cmbCell);

return column;
}

Here is my selection handler for the first column. It should simply unlock the combobox in the second column but only in the same row, not in the whole column.

Code:



public SelectionHandler<PublicationLevel> createSelHandlerForPublicationLevel() {
SelectionHandler<PublicationLevel> sel = new SelectionHandler<PublicationLevel>() {

@Override
public void onSelection(SelectionEvent<PublicationLevel> event) {

ComboBoxCell<KeyValueObject<Integer, String>> cmb = (ComboBoxCell<KeyValueObject<Integer, String>>) publStructureMainCol.getCell();
if (event.getSelectedItem().getIndex() == PublicationLevel.PRIVATE.getIndex()) {
cmb.getStore().clear();
cmb.setReadOnly(true);
} else {
if (cmb.isReadOnly()) {
cmb.setReadOnly(false);
// change the content of the second combo box, but only for the same row
setInitStructureMain(0);
}
}
}
};
return sel;
}

Here is how I set the data in the combo box. I simply modify the store but it affects the whole column of the combo boxes, not a single combo box.

Code:



private void setInitStructureMain(int structureMainId) {
ArrayList<KeyValueObject<Integer, String>> newList = publicationStructureMain.get(LocaleInfo.getCurrentLocale().getLocaleName().toLowerCase());
if (newList == null) {
newList = publicationStructureMain.get("de");
}
publStructMainStore.clear();
publStructMainStore.add(new KeyValueObject<Integer, String>(0, ""));

for (int i = 0; i < newList.size(); i++) {
publStructMainStore.add(newList.get(i));
}
KeyValueObject<Integer, String> currVal = null;
for (KeyValueObject<Integer, String> kv : publStructMainStore.getAll()) {
if (kv.getKey() != null && kv.getKey().intValue() == structureMainId) {
currVal = kv;
break;
}
}

ComboBoxCell<KeyValueObject<Integer, String>> c = (ComboBoxCell<KeyValueObject<Integer, String>>) publStructureMainCol.getCell();
c.select(currVal);
}

Is there any way I could reload the content of the second column's combo box, but only in the current row, not for the whole column?


Grid - Row editting - messes up after adding more columns

Hi,

I have a basic grid with row editting. I have a few columns defined as hidden : true. The user can use the column menu to display these additional fields.


With default set of columns, row editting works perfectly. But after the user adds a few columns to his view, roweditting messes up completely. Any ideas?


Screenshots below-


1. Row editting working with default columns-

works.jpg


2. Row edditing after I add more columns -

fails.jpg





Month picker

Hello!

I use the date / month picker with German locales.


In file XMessages_de.properties line 41 is the following text:



Code:



datePicker_okText=&#160;OK&#160;

The NBSPs are not shown correctly.

Please update the text file like this:



Code:



datePicker_okText=Ok;

or

change the month picker to render the NBSPs corectly.


Thanks!





default Masking is not working properly

[unable to retrieve full-text content]Hi, I am using infinite grid for my project , the problem was when data were loading for the grid its not enabling the default masking...


Timefield hideMode visibility



  1. Thank you for reporting this bug. We will make it our priority to review this report.







  2. Default Timefield hideMode visibility



    Timefield hideMode visibility





    Small problem with this code: hideMode has no effect.

    Code:



    items:[{
    xtype:'timefield',
    id:'time',
    hideMode:'visibility'
    },{
    xtype:'checkbox',
    labelText:'hide',
    listeners:{
    change:function(cmp,nv) {
    console.log('Checkchange');
    if(nv) Ext.getCmp("time").hide();
    else Ext.getCmp("time").show();
    }
    }
    }]

    http://ift.tt/1khaZ06












Negative Axis Charts - ExtJs 4

I've a case in which the chart data has negative values to be plotted. ExtJs is plotting the negative values in the chart without giving any config change. But it doesn't look fine { as shown in attachment 1 }.

I've added the config as "minimum : -20" and got the desired chart { as in attachment 2}.


Now the problem is, I've given the minimum config but I dont have any negative values to be plotted then the whole thing gets awkward shifting the axis upwards {as in attachment 3 }


My requirements & queries are :

1. Is there a way that ExtJs would act dynamically and place the negative axis only if data has negative values.

2. How to determine the least minimum of all data points that comes for plotting to give in the "minimum : " configuration.


Please help me out.. Thanks and regards,

Satya Dileep Kumar Thotakura.

Chennai.





lundi 28 avril 2014

Post JSON data to PHP page

Hi,

[{"quantity":4,"id":11,"text":"Apple","weight":"120/25 grm","price":27,"img_tmb":"resources/images/products/apple.jpg","leaf":true},{"quantity":4,"id":12,"text":"Cheese","weight":"100 grm","price":34,"img_tmb":"resources/images/products/cheese.jpg","leaf":true}]


Above is my sample json data stored in a variable 'cartdata'

I want to send this data to a PHP page and mail it in HTML format

Please help me on this.





Loading resources from custom URL

I have an application that maps URLs to controllers and actions such as:

/myApp/controller1/action1


The ExtJS resources, however, are accessible via a different URL, e.g.:


/myApp/static/app

/myApp/static/ext


How do I configure ExtJS to look for its resources in these other URLs?


Btw, I am loading&nbsp;ExtJS using the bootstrap.js file generated by Sencha cmd. &nbsp;This tries to load a lot of resource files, but all from relative location to the URL of the controller/action. &nbsp;In version 4, I could set custom paths on the Loader, but this does not seem to work in version 5 anymore.





Accordion with dynamically created panels (from store data) that contain grids.

http://ift.tt/PMzKHV

I am contemplating converting a durandaljs/wijmo/kendoui/knockout app to extjs 5.


I had made significant progress in my app but I am finding layout management especially difficult with the requirements of this app, so I wanted to give extjs a try.


The attached image depicts someones social network and the many groups that they can build. The red circled places are like an accordion, you click on them and they expand to reveal the people that are in that group.


Right now, in extjs, I have a mockup json data file and a center area, where I am aiming to put an accordion. The accordion will create panels for each group from the mock data service. And for now I want to put a dummy grid in to the accordion panes (that are only visible when expanded).


I am finding this a little hard to build since I am a total newbie.


I built a fiddle and in it, as you'll see the grids are being placed side by side instead of below eachother and hidden inside the accordion panes.


Can someone please help me edit the fiddle just a little bit to get me over this hurdle?


Thanks so much





Simple question: Read message from the server

Hi,

I have a simple question. I have a form for registration. I create a model.



Code:



Ext.define('myapp.model.Registration', {
extend: 'Ext.data.Model',
fields: ['username','password', 'retype_password','email','first_name','last_name','phone'],
//default proxy
proxy: {
type: 'rest',
url: 'client_register',
appendId: false,
actionMethods: {
create: 'POST'
},
reader: {
type: 'json',
root: 'results'
},
writer: {
type: 'json'
}
}
});

And in my controller, I register the new user as follows:


Code:



var vals = regForm.getValues();
var new_rec = Ext.create('myapp.model.Registration', vals);
new_rec.save({
success: function (response) {

},
failure: function (response) {

}
});

The server successfully registers the new account and returns basically the same information of the client account in a json object under the "results" entry. However I want to add extra information from the server, for example, status, sessionid....

Code:



{
"status": "success",
"sessionid": "123",
"results": {"username": "...", "password":"...","email":"..." ...}
}

In the success function, I'm able to read the data in the json object under "results" like username, email, phone... but not status, and sessionid. I know that proxy parses whatever under the "root" (results), but how can I read extra data sent by the server, in this case, status and sessionid from the server message? I even tried by making the server put extra data into the json object under "results" but these extra data is not accessible (I guess because of the definition of the fields in the model)

Thank you very much,





Using views outside the context of an app

I am getting the below error, as shown in the image.

Deciphering Sencha Cmd errors

Hi,

When I am building my project, I get the follwoing error.



Code:



[INF] Concatenating output to file C:\dev\BOXIT-Project\Boxit\BoxIT/build/temp/p
roduction/BoxIt/sencha-compiler/cmd-packages.js
[INF] Adding external reference : @full-page => @overrides
[INF] Loading classpath entry C:\dev\BOXIT-Project\Boxit\BoxIT\build\temp\produc
tion\BoxIt\sencha-compiler\cmd-packages.js
[INF] Adding external reference : Ext.util.Observable => C:\dev\BOXIT-Project\Bo
xit\BoxIT/build/temp/production/BoxIt/sencha-compiler/cmd-packages.js
[INF]
[INF] -refresh-app:
[ERR]
[ERR] BUILD FAILED
[ERR] com.sencha.exceptions.ExBuild: java.lang.IllegalArgumentException: 0 > -1
[ERR]
[ERR] Total time: 6 seconds
[ERR] The following error occurred while executing this line:
C:\dev\BOXIT-Project\Boxit\BoxIT\.sencha\app\build-impl.xml:367: The following e
rror occurred while executing this line:
C:\dev\BOXIT-Project\Boxit\BoxIT\.sencha\app\refresh-impl.xml:100: The following
error occurred while executing this line:
C:\dev\BOXIT-Project\Boxit\BoxIT\.sencha\app\refresh-impl.xml:44: com.sencha.exc
eptions.ExBuild: java.lang.IllegalArgumentException: 0 > -1

When I look into the two XML files that Cmd says have the errors it does not make me any wiser.

Anybody who can point me in some ind of direction where to look for a solution to this?


The files in question:


http://ift.tt/1nWQYi0

http://ift.tt/1nWQYi2


Regards, Christian





Question about require and loader:true

Hello,

Im a very new newbie to MVC. I have a question about the setconfig and loader:true.


Will the Ext.loader find all my classes providing Ive got my classes in the correct folders. Or am I required to name all my required classes. I know that's not the way to do it, that I should note all my required classes. But Im an extremely lazy typist . And after I pick up on this will start "Ext.requiring" the classes ...





Using setStore() to set a new store on a grouped list causes 'Uncaught TypeError:...'



  1. Thank you for reporting this bug. We will make it our priority to review this report.







  2. Default Using setStore() to set a new store on a grouped list causes 'Uncaught TypeError:...'



    Using setStore() to set a new store on a grouped list causes 'Uncaught TypeError:...'





    I am running into problems using list.setStore() to assign a new store to a grouped list.

    var list = this.down('#docsList');

    var listStore = doclistStore();

    listStore.setGroupField('groupcaption');

    list.setStore(listStore);


    I can run the code above successfully and repeatedly as long as I only point it to the same store.

    If I attempt to use a different store (with a list of documents belonging to another object), then it will blow up with the error:
    Uncaught TypeError: Cannot read property 'getHeader' of undefined

    If I disable grouping and comment out the line setting the group field then the code works as intended but I lose grouping.



    // Disable Grouping

    list.setGrouped(false);

    //listStore.setGroupField('groupcaption');


    Anthony












Ext.device.Geolocation and Ext.util.Geolocation

Hi

In my app im trying to watch the current position of the user .. so i have tried the watchPosition of Ext.device.Geolocation, but it's seem that the watchPosition don't fetch for the coordinate.


And with Ext.util.Geolocation, i can get the current location but can't watch it.


I need to work with "Ext.util.Geolocation" for the web version and "Ext.device.Geolocation" for the android app for better accuracy.


How can i implement it in the correct way ?


BRGD,


NB: i use S.T 2.3.1 and Cordova 3.3.0 and i build for android 4.3





Sencha buttons remains focused and other problems with buttons ( windows phone 8 only

I'm using sencha touch 2.3.1 I have an app which works fine in android , IOS and even windows apps ( windows store apps ). In windows phone 8, I have the following issues:

1) When I tap on a button, it gets focused and the event I assigned is triggered as expected and a new view is opened. But after closing the new view/returning to the page containing the button I tapped, i noticed that it remains tapped. I'm attaching a few screenshots for better understanding

wp_ss_20140428_0001[1].png









wp_ss_20140428_0002[1].png


2) When a new window or view opens after clicking a button, if I tap on the new view on the places where there is button in the view below, the button gets tapped and the event of the button is fired. I used the following in my previous app to prevent this:

if(Ext.getCmp('center-report')){ return false; }This code checks for the id ( center-report ) and it doesn't view of same report to open. But this works only if all the button's have same id. Also, I can still focus the button below. I ignored this till now, but it's really important to me now.

PS: I'm using direct html code for the buttons.

Here's a sample code:


'<table class="dashboardTable" border=0 cellpadding=1 cellspacing=1 width="100%">', '<tr><td width="80%" class="cardText" valign=top>View service revenue trends</td><td width="20%" >{[this.buttonReport(2,"Revenue")]}</td></tr>', '<tr><td class="cardText" valign=top>View sales trends</td><td>{[this.buttonReport(1,"Sales")]}</td></tr>', '</table>' buttonReport: function(id, name) { return Soham.object.Util.getConfirmButtonHtml('buttonReport0' + id, name, 'chart', id); },getConfirmButtonHtml: function(cls, text, icon, dataid) { var strHtml = ''; if (dataid) { strHtml = '<div ref="' + dataid + '" class="x-button-normal x-button x-button-confirm x-iconalign-left ' + cls + '" '; } else { strHtml = '<div class="x-button-normal x-button x-button-confirm x-iconalign-left ' + cls + '" '; } strHtml += 'ontouchstart="this.className = \'x-button-pressing x-button x-button-confirm x-iconalign-left ' + cls + '\'" '; strHtml += 'onmousedown="this.className=\'x-button-pressing x-button x-button-confirm x-iconalign-left ' + cls + '\'" '; strHtml += 'ontouchend="this.className=\'x-button-normal x-button x-button-confirm x-iconalign-left ' + cls + '\'" '; strHtml += 'onmouseup="this.className=\'x-button-normal x-button x-button-confirm x-iconalign-left ' + cls + '\'">'; if (icon != '') { strHtml += '<span class="x-button-icon ' + icon + ' x-shown" style></span>'; } if (text != '') { strHtml += '<span style class="x-button-label">' + text + '</span>'; } strHtml += '</div>'; return strHtml;},Is there anything I have to add to resolve this issue? Please help me resolve this as this is really important to me. Thanks





[unable to retrieve full-text content]


dimanche 27 avril 2014

Overriding custom theme's basecolor is not getting reflected ONLY in IE?

[unable to retrieve full-text content]I could override the basecolor first time for my custom theme. But from second time it is not getting reflected only in IE. Does anyone faced...


TextField keyup iOS 7

I'm using sencha 2.3 and developing an iOS 7 app. The keyup event isn't returning any keycodes. I'm using the following listener:

Code:



textfield: {
keyup: function (f, e) {
console.log(e.event.keyCode);
if (e.event.keyCode == 13) {
this.validate();
}
},
},

Has anyone else had this issue?


Different objects of same class over writing each other

I am displaying two grids. I have defined the Sc.ListGrid as follows. I have the initComponent changing the Store and Model based on the configs passed to Sc.ListGrid. The Second Sc.ListGrid always uses the first grids model. If i switch them and have leagueList second and leagueHistory first. LeagueList will have leagueHistorys model. I want the them to use the model i have defined instead of using the first model from whatever is created first. FYI both models and stores are basic with only only url changed for stores proxy and different fields for the models. How do i get them to truly create new instances and not use each others components.

Code:



Ext.onReady(function(){


var leagueList = new Sc.ListGrid({
title: 'League <?php echo $leaguename; ?>',
resourceType: "league",
height: 400,
resourceSubType: '<?php echo $resourceSubType; ?>',
resourceId: "<?php echo $id; ?>",
cols: true,
});
leagueList.render('leaguePlayers');

var leagueHistory = new Sc.ListGrid({
title: "<?php echo $leaguename; ?> League History",
resourceType: "league",
resourceSubType: 'history',
resourceId: "<?php echo $id; ?>",
cols: true
});
leagueHistory.render('leagueHistory');


});

ListGrid


Code:



Ext.define('Sc.ListGrid', {
extend: 'Ext.grid.Panel',
title: 'Grid',
store: Ext.data.StoreManager.lookup('defaultStore'),
requires: [// Requires both models and both stores ],
columns: [
{ text: 'id', dataIndex: 'id' },
{ text: 'gamename', dataIndex: 'gamename', flex: 1 },
],
config:{
resourceType: false,
// Assume league with team
resourceSubType: 'team',
resourceId: null,
resourceSubId: null,
cols: null,
parentResource: null,
},
checkRequired: function(){
if(this.resourceType == false || this.resourceId == null ){
throw "A require config is not set.";
}
},
initComponent: function(){

if(this.resourceId == null){
throw "No resourceId";
}
this.checkRequired();

if(this.resourceType == 'team'){
// List The Players
var model = Sc.Model.Team.TeamResourceModel;
var store = new Sc.Store.Team.TeamResourceStore({
model: model,
autoLoad: true
});
this.store = store;
}
else if(this.resourceType == 'league' && this.resourceSubType == 'team'){
// If it is a League full of Teams
var model = Sc.Model.League.LeagueTeamModel;
var store = new Sc.Store.League.LeagueStore({
model: model,
autoLoad: true
});
this.store = store;
}
else if(this.resourceType == 'league' && this.resourceSubType == 'single'){
// If it is a League full
var model = Sc.Model.League.LeagueSingleModel;
var store = new Sc.Store.League.LeagueStore({
model: model,
autoLoad: true
});
this.store = store;
}
else if(this.resourceType == 'league' && this.resourceSubType == 'history'){
// Show the history of the League
var model = Sc.Model.GameModel;
var store = new Sc.Store.League.LeagueStore({
model: model
});
this.store = store;
this.store.getProxy().url = 'index/0/'+this.resourceId;
}
else{
this.store = new Sc.Store.GenericStore({
autoLoad: true
});
}


(this.cols == null ? true : this.setCols() );
this.callParent(arguments);


},
setCols: function(){

var fields = this.getStore().getProxy().getModel().getFields();
var newCols = [];
Ext.each(fields,function(v,i){
var cols = { text: v.name, dataIndex: v.name};
newCols.push(cols);
});
this.columns = newCols;
},
height: 200,
width: 400,
});




Ext.Ajax.request not working on IE

Hi..Need help with this block of code...

Code:



var postData = {}; postData.csrfi = csrfi; postData.data = Ext.JSON.encode(quotations); Ext.Ajax.on('beforerequest', function(conn, options){ //console.log(conn, options); }); Ext.Ajax.request({ url: UrlGenerator.getControllerActionUrl('RfqSE', 'sendQuotations', { media: 'json'} ), params: postData, callback: function(options, success, response) { var showErrorMsg = true; if (success) { var obj = Ext.decode(response.responseText); if (obj && obj.success === true) { showErrorMsg = false; } } if (showErrorMsg) { Ext.Msg.alert("{{#error_title##}", "{{#error#}}"); } callback.call(); } });

...for some reason params are not sent to the server side... it's not working on ie 7,8... Haven't tried 9+.. On chrome and mozilla works as excepted.... Url is fine, checked on chrome, params are fine.. Have no idea actually what is wrong... pls help


ERR: EmptyValue must reference a valid KeyStore key


Code:



jarsigner: Certificate chain not found for: EmptyValue. EmptyValue must reference a valid KeyStore key entry containing a private key and corresponding public key certificate chain.

Not sure why I am getting this error.

my keystore is fine.

I uninstall java sdk 1.7 u45 and went back to 1.6 u30, but same error.


can someone please suggest?





BUG 5.0.0 grid forceFit not works properly



  1. Thank you for reporting this bug. We will make it our priority to review this report.







  2. Default BUG 5.0.0 grid forceFit not works properly



    BUG 5.0.0 grid forceFit not works properly





    steps to reproduce
    1 extend Ext.grid.Panel

    2 use forceFit : true

    3 add columns.

    4 check that grid columns are not forcreFit with layout. Also try to re-size the columns header it will throw some error in console.

    6 if we hide any column from grid then it will show as forceFit layout.

    Test Case: http://ift.tt/QLzfz6














Grid reconfigure - column alignment broken



  1. Thank you for reporting this bug. We will make it our priority to review this report.







  2. Default Grid reconfigure - column alignment broken



    Grid reconfigure - column alignment broken





    Expamle: http://ift.tt/1j39EMn

    Once I use reconfigure to set the columns and store, the columns alignment breaks:

    screenshot.jpg














SA3 Model hasMany assocaition model autoLoad: true throws exception

Please help, I am trying to load associated data from child model and

When I set autoLoad: true in SA 3 on a model with hasMany association it throws an exception.

Err_01.PNG


if I choose to ignore


Uncaught TypeError: Cannot read property 'call' of undefined Filter.js?_dc=1398600845151:144

(anonymous function) Filter.js?_dc=1398600845151:144

Ext.define.filterBy AbstractMixedCollection.js?_dc=1398600845099:1026

Ext.define.filter AbstractMixedCollection.js?_dc=1398600845099:1000

Ext.define.filter Store.js?_dc=1398600846220:1763

Ext.define.loadRecords Store.js?_dc=1398600846220:2071

Ext.define.onProxyLoad Store.js?_dc=1398600846220:1639

Ext.define.processResponse Server.js?_dc=1398600846583:302

(anonymous function) Ajax.js?_dc=1398600846379:301

Ext.apply.callback ext-dev.js:12086

Ext.define.onComplete Connection.js?_dc=1398600846802:1046

Ext.define.onStateChange Connection.js?_dc=1398600846802:982

(anonymous function) ext-dev.js:3332






setter a hasone asociation in a object model

Hello.

I'm trying to have a combobox on a form to add store doing that I have associated with a grid, but can not get pass the value of the associated models.


I tring make a setter (which I defined) but nothing.


Extjs version is 4.1.


Here you have an example of code to see what you think.


What I do is start object which then fill the form values ??and then do an add to this record store.


I am that which I do not. Thank you very much.


Model:


Ext.define('estacionClinica.model.Peticion', {

extend : 'Ext.data.Model',

fields : [{

name: 'id',

type: 'int'

}..],

associations : [{

type : 'hasOne',

model : 'estacionClinica.model.AmbitoPeticion',


getterName : 'getAmbitoPeticion',

setterName : 'setAmbitoPeticion',

associationKey : 'ambitoPeticion'

associatedName : 'ambitoPeticion'

)]


Store:


Ext.define('estacionClinica.store.Peticion', {

extend : 'Ext.data.Store',

model : 'estacionClinica.model.Peticion',

autoLoad : false,

pageSize : itemsPerPage,


proxy : {

type : 'ajax',

autoSave: false,


api: {

create : 'savePeticion.json',

read: 'recuperarPeticionesByIdPaciente.json',

update : 'updatePeticion.json',

destroy : 'deletePeticion.json'

},

reader: {

type: 'json',

root: 'peticiones',

totalProperty: 'results',

successProperty: 'success',

messageProperty: 'mensaje'

},

writer: {

type: 'json'

//root: 'peticion',

//totalProperty: 'total',

//successProperty: 'success',

//messageProperty: 'message',

//idProperty: 'id'

}


}

});


view: (parte of this)


items: [{


xtype: 'form',

alias : 'widget.addPeticionForm',

id: 'formAddPeticion',


,{

xtype : 'combo',

fieldLabel : 'Caracter Peticion',

name : 'caracterPeticion',

id : 'comboCaracterPeticion',

queryMode : 'local',

valueField : 'id',

displayField: 'nombre',

editable:false,

store: 'CaracterPeticion',

typeAhead: true,

triggerAction: 'all',

forceSelection:true

}


}


Controller:


when click addPeticion:


var peticion = Ext.create('estacionClinica.model.Peticion', {

cip: 'hola',

codigo: 'hola'

//caracterPeticion: [{id: '1', name: ''}]

});


var formularioNuevaPeticion = winPeticion.down('form');


formularioNuevaPeticion.loadRecord(peticion);

winPeticion.show();


When I click on save:


var ventanaNuevaPeticion = button.up('window');

var formularioNuevaPeticion = ventanaNuevaPeticion.down('form');


var registroPeticion = formularioNuevaPeticion.getRecord();

var datosPeticion = formularioNuevaPeticion.getValues();


registroPeticion.set(datosPeticion);

registroPeticion.setCaracterPeticion(registroPeticion);


registroPeticion.setAmbitoPeticion(this.getComboAmbitoPeticion().findRecordByValue(this.getComboAmbitoPeticion().getValue()));

registroPeticion.setCaracterPeticion(this.getComboCaracterPeticion().findRecordByValue(this.getComboCaracterPeticion().getValue()));

this.getPeticionStore().add(registroPeticion);


this.getPeticionStore().sync();


In payload I can see nothing of my association data:


cip: "hola"

codigo: "hola"

fechaPeticion: ""

id: 0

idProceso: ""

nhc: 0





Possible bug with BufferedStore and ext direct proxy



  1. Thank you for reporting this bug. We will make it our priority to review this report.







  2. Default Possible bug with BufferedStore and ext direct proxy



    Possible bug with BufferedStore and ext direct proxy





    Hi

    I'm fiddling with extjs 5 and converted a buffered store example from extjs 4 to 5.

    All I did was removing the buffered config option and changing the "class" from Ext.data.Store to Ext.data.BufferedStore.

    At first everything looks good, the BufferedStore sends the initial requests and shows the data, but when I scroll down at some point the BufferedStore needs to request new data the Loading... mask appears and no request is sent to the server. The loading mask never disappears


    Link to the extjs 5 demo: http://ift.tt/1ipW5b6

    Link to the extjs 4 demo: http://ift.tt/1iq4UMd


    Not sure if I'm doing something wrong or this is a bug.

    Ralph














samedi 26 avril 2014

Build Android error


Code:



[ERR] [ERR] BUILD FAILED
[ERR] com.sencha.exceptions.ExProcess: stbuild exited with non-zero code : 7
[ERR] at org.apache.tools.ant.Target.performTasks(Targ
[ERR] et.java:413)

I guess this is something to do with the ANT, but it installed fine and I do have the path in my environment var.

What is the problem?





Showing a loading gif into grid cell on runtime

I have a grid.Panel with some records, when a record is selected then a button in a ToolBar is enabled so I can start a "Long Running Process" on server side, so I need to show in cell (of that row) a Loading icon.


First I will show a Messagebox that will say "Initializing...", on that phase the server will log the task in a Queue so a Windows Service can catch that later. When the server returns a "success" then I hide the messagebox but now the Loading icon should be visible until the Long Running Process ends (maybe after 2 hours).


This button label is "Start Process".


On button click I have the following code:

Code:



onButtonClickProcess: function (button, e, options) { console.log('start process'); Ext.MessageBox.show({ title: 'Please wait', msg: '...', progressText: 'Initializing...', width: 300, progress: true, closable: false, wait: true, waitConfig: { interval: 200 } }); var row = this.getGrid().getSelectionModel().getSelection()[0]; Ext.Ajax.request({ url: '/api/TimeSheet/QueueTask', method: 'GET', params : { "timesheetId" : row.get("TimesheetImportId") }, success: function (response, opts) { Ext.MessageBox.hide(); // TODO: // Here I have to show the loading icon into my row cell ?? }, failure: function (response, opts) { Ext.MessageBox.hide(); } }) },



Any clue on how to do that?



Contextmenu on a chart

Sencha cmd chokes and CPU spikes

Hey guys...I ran into this completely random issue...'sencha app watch' was working just fine and then suddenly it stopped and started choking. The output looks like:

Code:



[INF]
[INF] init-plugin:
[INF]
[INF] cmd-root-plugin.init-properties:
[INF]
[INF] init-properties:
[INF]
[INF] init-sencha-command:
[INF]
[INF] init:
[INF]
[INF] app-watch-impl:
[INF]
[INF] watch:
[INF]
[INF] -before-init-local:
[INF]
[INF] -init-local:
[INF]
[INF] -after-init-local:
[INF]
[INF] init-local:
[INF]
[INF] find-cmd-in-path:
[INF]
[INF] find-cmd-in-environment:
[INF]
[INF] find-cmd-in-shell:
[INF]
[INF] init-cmd:
[INF] [echo] Using Sencha Cmd from /Users/abc/bin/Sencha/Cmd/4.0.4.84 for /Library/WebServer/Documents/myapp/public/build.xml
[INF]
[INF] -before-init:
[INF]
[INF] -init:
[INF] Initializing Sencha Cmd ant environment
[INF] Adding antlib taskdef for com/sencha/command/compass/ant/antlib.xml
[INF]
[INF] -after-init:
[INF]
[INF] -before-init-defaults:
[INF]
[INF] -init-defaults:
[INF]
[INF] -after-init-defaults:
[INF]
[INF] -init-compiler:
[INF]
[INF] init:
[INF]
[INF] -before-watch:
[INF]
[INF] -before-build:
[INF]
[INF] refresh:
[INF]
[INF] -before-refresh:
[INF]
[INF] -init:
[INF]
[INF] -init-compiler:
[INF]
[INF] -detect-app-build-properties:
[INF] Loading app json manifest...
[INF] Loading classpath entry /Library/WebServer/Documents/myapp/public/touch/src
[INF] Loading classpath entry /Library/WebServer/Documents/myapp/public/app.js
[INF] Loading classpath entry /Library/WebServer/Documents/myapp/public/app
[INF] Loading classpath entry /Library/WebServer/Documents/myapp/public/build/temp/production/X/sencha-compiler/app

It stops doing stuff at that last line, and my Activity Monitor shows java taking up 100% of my CPU.

'sencha app build native' also is getting stuck at that same point.


Any ideas? Please help! Thanks!





Styling for Specific Device

Dynamically added Combobox reference.

Hello,

I need some guidance, Help please for the following scenario.


Scenario:

I am adding a combobox dynamically whenever the user clicks a button.

I cannot give any itemId for the combo as the user can add any number of combo boxes.

and I want to listen to the combo's change event,

How should i get hold of the reference of the dynamically added combo boxes?


Regards

Akshay





vendredi 25 avril 2014

Rich Tips for textfield?

Is there a way to do these rich qtips for a textfield?

http://ift.tt/1jOCNHU


I could probably get away with this for definitions of a field, but it would nice to show a little grid and/or chart explaining how I got to a certain number.



Code:



inputAttrTpl: " data-qtip='<b>Attrition</b><br>&nbsp;14,650<br>-14,554' ",




Grid dislocation



  1. Thank you for reporting this bug. We will make it our priority to review this report.





  2. Sencha User



    Join Date

    Mar 2013


    Posts

    1


    Vote Rating

    0












ExtDirect in PHP tutorial?

Will the NEXT Ext 5 webinar allow us to listen to audio VIA the internet

Cannot bind value to grid selection if multiSelect is true



  1. Thank you for reporting this bug. We will make it our priority to review this report.







  2. Default Cannot bind value to grid selection if multiSelect is true



    Cannot bind value to grid selection if multiSelect is true





    Ext version tested:

    Browser versions tested against:



    • Firefox 28

    • Chrome 34.0.1847.116


    Description:

    If you set multiSelect to true on a grid panel, you cannot bind a value to gridPanel.selection.


    Steps to reproduce the problem:

    Here is a fiddle that demonstrates the bug: http://ift.tt/1pzFYf3


    The result that was expected:

    Button should be enabled when a selection is made on the grid.


    The result that occurs instead:

    The button is not enabled.














[OPEN] Container - unused local variable



  1. You found a bug! We've classified it as



    EXTJS-13194
    .

    We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.







  2. Default Container - unused local variable



    Container - unused local variable





    I just noticed that the controller variable is not used, so I thought I'd report it.


    Code:



    Ext.define('Ext.container.Container', {
    ...
    // @private
    initComponent: function(){
    var me = this,
    reference = me.reference,
    controller, // <--- unused variable
    len;


    me.callParent();


    me.getLayout();
    // Set a flag to say we're constructing children, can be useful
    // to know during construction time to save work
    me.constructing = true;


    if (reference && reference.charAt(len = reference.length - 1) === '>') {
    me.isParentReference = true;
    me.reference = reference.substring(0, len);
    //<debug>
    if (!me.validIdRe.test(me.reference)) {
    Ext.Error.raise('Invalid component "reference": "' + me.reference + '"');
    }
    //</debug>
    }


    me.initItems();
    delete me.constructing;
    },
    ...













  3. Default







    Thanks for the report! I have opened a bug in our bug tracker.

    Likely left over from when we moved the ViewController logic from Container to Component.














Unable to create treestore using alias



  1. Thank you for reporting this bug. We will make it our priority to review this report.







  2. Exclamation Unable to create treestore using alias



    Unable to create treestore using alias





    ExtJS 4.2.1:

    Unable to create store inside tree using store alias.

    But same approach works fine for combo!














[OPEN] Draggable components are not resizable



  1. You found a bug! We've classified it as



    EXTJS-13193
    .

    We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.







  2. Default Draggable components are not resizable



    Draggable components are not resizable





    Ext version tested:

    Browser versions tested against:



    • Firefox 28

    • Chrome 34.0.1847.116




    Description:

    A component with resizable handles does not resize.

    Steps to reproduce the problem:

    This fiddle demonstrates the issue: http://ift.tt/1nNBrRw


    The result that was expected:

    Component should be resizable


    The result that occurs instead:

    Component does not resize

















How can I show one tooltip for multiple series?

Let's say I have line chart with 3 different series.

I am using getItemForPoint() function to get the nearest node on each line.

Now, when I move my cursor over the graph, all three closest nodes to my cursor on 3 graphs get highlighted and since tips are implemented for each series. I will see 3 overlapping tips simultaneously.


Is there a clean way of showing just one tooltip that has all 3 graphs info in it?





Associations - examples/docs needed

In these times of NoSQL and alternatives to relational databases.....

I'm trying to wrap my head around this whole new Associations/Schema affair.


It looks promising, but I find myself confused by lack of docs, examples and the general overview.


Looking at data.Model I see that belongsTo, hasMany and associations are available as configs.


But, looking at the examples in schema.ManyToMany there suddenly is a manyToMany-config available on data.Model.


And then, just to make everything seem completely arbitrary and random, you have the examples in schema.ManyToOne. Where/why am I supposed to specify this? No coffee in the world could help me.


Consider the following:



Code:



{
"items":[
{
name: "foo",
greatness: "extreme",
subItems: [
{
text: "bar"
},
{
text: "barred"
},
{
text: "barring"
}
]
},
{
name: "footer",
greatness: "not so much",
subItems: [
{
text: "garr"
},
{
text: "garrred"
},
{
text: "garrring"
}
]
}
]
}

I know that in Ext 5 I can just dump this into a store.Items which creates model.Item and subItems would be available as raw data. But what if I want subItems cast to be of type model.SubItem? In this scenario there are no id's, and the entire data-structure is dumped in one go.

I could of course just parse this with a convert on the subItems-field in the model.Item, and create the models.SubItem on the fly.


What other alternatives are there?


It would be hardcore awesome if ids, relationships and the store containing all the SubItems, with references to its owner, could be configured with just a few lines.





Grid Resizing takes time when panel below it get collapsed/expand

GridView >> Locked Columns >> ID

[unable to retrieve full-text content]Hi, When assigning an ID to a GridView with locked columns, all the fields in those columns where 'moved' to the un-locked columns. This is in...


Got this problem using sencha app build production

Extjs 5.0

[unable to retrieve full-text content]hi, I would like to know when it is planned to integrate Ext js 5 in Sencha Architect. Thanks for the great work you do. greetings


Complex in-line editor

I am looking for a way to manage in-line editing where editor is a bit more complex than one field.

More specificaly I am using rowexpander and within rowxpander I have template. When user clicks on given row in this template I would like to "expand it" with little inline form. I would like to inject component.

Grid can be rather large (up to 100 records) so I would like to keep resources on minimum - no not needed extjs components, containers - just on the "as needed" basis.

Any ideas how to accomplish something like this?

Maybe something along these lines:

http://ift.tt/1tJpP6r






jeudi 24 avril 2014

how to integrate gmappanel in extjs3.4

Hi all i am new to extjs 3.4, i felt difficult in case of integrating google map with extjs3.4. I am using Ext.ux.gmappanel3 of vinylFox google map V3....my code is below

</head>

<body>


<div id="ext-map"></div>

<script src="http://ift.tt/NF9SGx"></script>


<script src="/js/ext/3.2.1/adapter/ext/ext-base.js"></script>

<script src="/js/ext/3.2.1/ext-all.js"></script>

<script src="/js/gmap/Ext.ux.GMapPanel3.js"></script>(This is library js)


<script src="map.js"></script>


</body>

</html>


map.js


var viewport = new Ext.Viewport({

items:[{

title:'center panel',

region:'center',

items:[mygmappanel]

}]

});


var mygmappanel = new Ext.Panel({

layout: 'fit',

height: 500,

hideLabel: true,

items: [

{

xtype: 'gmappanel',

gmapType: 'map',

zoomLevel: 14,

setCenter: {

lat: 40.782686,

lng: -73.96524,

marker: {

title: 'Central Park'

}

}

}

]

});


here i want to add multiple markers for multiple places with multiple infowindow how i can acheive this give me suggestions regarding this.

If my way is wrong advice me correct, Thanks in advance