mercredi 31 décembre 2014

Number Field in a Widget Column Problem

I'm using ExtJS 5.1.0 (commerical release).

This problem only appears to be happening in IE (worked fine in Chrome).


I have a number field in a Widget Column and when you click on the field you can type any characters (i.e. no number keystoke filtering happening).


It appears to be happening because the column cell is focused when you initially click on the number field (instead of the field), but the cursor is in the field so you can type anything. If you slowly click twice to get the field to focus, then it works as expected.


Here is a fiddle of the problem:

http://ift.tt/1I0NyTP


Any help with a workaround would be appreciated.

Thanks.






Number Field in a Widget Column Problem

setTitle error for a gauge series polar chart

Using ExtJs 5.0.1. A gauge series for a polar chart only defines a single field. However, when I try to change the title in the series using setTitle(...), I get an error that me.getYField() is null. This is reported by the sencha method 'updateTitle' in Series.js. Even though many types of series do allow X and Y fields, a gauge is only a single 'field' option. So I assume this function is erring out because YField does not exist on a gauge series.

I am defining my gauge as:


items: {

xtype: 'polar',

itemId: 'gauge',

store: me.store,

title: 'polar title',

legend: {

docked: 'bottom'

},

series: {

type: 'gauge',

title: 'Avg',

YField: 'loadavg',

label: {

display: 'under',

field: 'loadavg'

},

needle: true,

showInLegend: true,

minimum: 100,

maximum: 800,

field: 'loadavg',

donut: 50,

colors: ['#3AA8CB', '#ddd']

}

}


I am trying to change the title with the following code (form a load callback):


var data = this.store.first();

var cpuValue = data.get(this.chartConfig.series.field);

// Get the series title.

var chart = this.chart.getComponent('gauge');

var series = chart.getSeries()[0]; // only 1 series, so get first one.

var title = series.getTitle();

// Append the display value to the title.

series.setTitle(title + ': ' + cpuValue + "%");






setTitle error for a gauge series polar chart

How to add cancel option to a splashscreen

Hello All,

I have a search screen and when I click the search button, I will have a splash screen coming with the following message.

var splash = Ext.getBody().mask('Retrieving data..This may take a few moments..', 'splashscreen');

Ext.suspendLayouts();


I would like to know if there is a way I can add a cancel option to this message so that when a user clicks on that cancel option, the whole search should stop. In case the user feels that the search is taking too long, he/she will click on that cancel option and the search will stop.


Is there a way to do this. Thanks in advance....






How to add cancel option to a splashscreen

D3js Pie Chart

Let me present Sandbox.ux.chart.series.D3Pie, this is pie serie for ExtJs chart based on d3.js library.

Serie based on ExtJs series class and implement most of defaults methods.

d3pie-example-1.png


To use D3pie follow steps:



  1. add js and scss files to project;

  2. add class to requires;

  3. change 'pie' serie type to 'd3pie' (type: 'd3pie');

  4. include d3 library and define d3 property (d3: d3);

  5. add css class to chart (cls: 'ux-d3-pie').


Documentation and downloads: http://ift.tt/1tAU8j0

Demo: http://ift.tt/1Abgneo


Please feedback!

Thanks!


p.s. Happy New Year!







D3js Pie Chart

Reset form fields in MVVM

usePicker: false not working for datepickerfield



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







  2. Default usePicker: false not working for datepickerfield



    usePicker: false not working for datepickerfield





    I used datepickerfield and there is config called "usePicker". I set it "false" because I don't want to use picker but it didn't work.

    I used it in selectfiled, there it's work fine.

    so I think this is bug.


    I used sencha touch 2.3.1

    Test with chrome 39.0

    Android device 4.4.2















usePicker: false not working for datepickerfield

Ext.dom.Element.setCls() function is not working



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







  2. Default Ext.dom.Element.setCls() function is not working



    Ext.dom.Element.setCls() function is not working





    Ext.dom.Element.setCls() function is not working. It throws the error map is undefined.



    Code:



    Ext.application({
    name : 'Fiddle',


    launch : function() {
    Ext.create('Ext.Component',
    {
    html: 'Test Code'
    ,renderTo: Ext.getBody()
    ,id: 'testId'
    });

    var node = Ext.get(testId);
    console.log(node);
    node.setCls('testCls');
    }
    });














Ext.dom.Element.setCls() function is not working

Datefield getting collapsed when month/year is changed



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











Datefield getting collapsed when month/year is changed

mardi 30 décembre 2014

Layout run failed (layout: hbox)

Hi All,

I am facing an issue with the EXTJS ver. 5, while using a collapsible grid in the hbox layout.

The functioanlity is that the data on the 'Observation Facts' grid will be displayed once the row of the search results is clicked and that row contains a Observation Flag set to 1.


Ths issue is that if I dont bind the store to the grid, there is no issue, expand and collapse are working perfectly, as soon as I bind the store to the grid, and try to doLayout(), I get "Layout run failed",

and the entire panel vanishes.See the 4th sceenshot (ss4)


PFA the code and the screenshots.


Request you to advise.



Code:



{
xtype : 'panel',
layout : {
type : 'hbox',
align : 'stretch'
},
itemId : 'groupPanel',
flex:1,
items : [
{
xtype : 'gridpanel',
title : 'Search Results',
flex:1,
itemId : 'searchResultsGrid',
store : 'facts.FactStore',
columns : [
{
xtype : 'gridcolumn',
dataIndex : 'LOBId',
text : translations['LOB'],
width : 150,
renderer : function(value) {
var rec = Ext.getStore('workflow.common.LOB').getById(
value);
if (rec)
return rec.get('LOBName');
else
return value;
}
},
{
xtype : 'gridcolumn',
dataIndex : 'FactType',
text : translations['FactType'],
width : 150,
renderer : function(value) {
var rec = Ext.getStore(
'workflow.collection.cm.facts.FactType')
.getById(value);
if (rec)
return rec.get('FactTypeDesc');
else
return value;
}
}, {
xtype : 'gridcolumn',
dataIndex : 'FactId',
text : translations['FactId'],
width : 200
}, {
xtype : 'gridcolumn',
dataIndex : 'FactDescription',
text : translations['FactDescription'],
flex:1
} ],
dockedItems : [ {
xtype : 'pagingtoolbar',
dock : 'bottom',
width : '',
store : 'facts.Facts',
displayInfo : true
} ],
viewConfig : {
stripeRows : true,
scroll : true,
listeners : {
cellmousedown : function(grid, td, cellIndex, record, tr,
rowIndex, e, eOpts) {
var columnType = grid.panel.columns[cellIndex].xtype;
if (columnType == 'gridcolumn') {
var panel = Ext.ComponentQuery
.query('#observationFactsGrid')[0];
var searchpanel = Ext.ComponentQuery
.query('#groupPanel')[0];
var ObservationFlag = record.data.ObservationFlag;
if (ObservationFlag === '1') {
var store = Ext.data.StoreManager
.lookup('facts.ObservationFactsStore');
store
.on(
'beforeload',
function(source, operation) {
operation
.setParams({
SearchFactObservationReq : Ext
.encode({
SearchFactObservationReq : {
LOBId : record.data.LOBId,
FactId : record.data.FactId
}
})
})
});
store.loadPage(1);
panel.expand(true);
}
else{
panel.collapse(true);
}
searchpanel.doLayout();
}
}
}
}
},
{
xtype : 'gridpanel',
collapseDirection : 'left',
collapsible : true,
hideCollapseTool : true,
flex:0,
collapsed : true,
title : 'Observation Facts',
itemId : 'observationFactsGrid',
store : 'facts.ObservationFactsStore',
columns : [ {
xtype : 'gridcolumn',
dataIndex : 'ObservationId',
text : 'Observation ID',
width:150
}, {
xtype : 'gridcolumn',
dataIndex : 'ObservationDesc',
text : 'Observation Name',
width: 150
} ],
dockedItems : [ {
xtype : 'pagingtoolbar',
dock : 'bottom',
store : 'facts.ObservationFactsStore',
displayInfo : true
} ],
viewConfig : {
stripeRows : true,
scroll : true
}
} ]


}





Layout run failed (layout: hbox)

EXTJS 3.2 editorgrid How to set focus to next cell

from a combo box I get the value to (sat_beli,kon_beli,satuan), I want to set focus to next cell (start edit). Can U help please


Code:



{
dataIndex : 'kode_sub',
header : 'Kode Stock',
width : 160,
align : 'left',
editor : {
xtype : 'combo',
allowBlank : true,
mode : 'local',
store : ds_stock,
selectOnFocus: true,
listClass : 'x-combo-list-small',
typeAhead : true,
displayField : 'kode_sub',
itemSelector: 'div.column-center-akun',
valueField : 'kode_sub',
tpl : resultTpl_stock,
listWidth : 600,
lazyRender : true,
listeners: {
select : function(combo,e,rec) // 'select' will be fired as soon as an item in the ComboBox is selected with mouse, keyboard.
{
var invoice = this.getValue(); // get value from combo
var index = this.getStore().findExact('kode_sub',invoice) // compare value from combo to field acct_no and returns the index
var record = this.getStore().getAt(index); // get record at the index
//alert(record);
var processed1 = record.get('sat_beli'); // return value of field acct_name
var processed2 = record.get('konv_beli');
var processed3 = record.get('satuan');
//alert(processed);
var oSM = gridDetail.getSelectionModel();
var oGrid = Ext.getCmp('grid-Detail');
oGrid.startEditing(oSM.getSelectedCell()[0],oSM.getSelectedCell()[1]);
oGrid.getStore().getAt(oSM.getSelectedCell()[0]).set('sat_beli',processed1);
oGrid.getStore().getAt(oSM.getSelectedCell()[0]).set('konv_beli',processed2);
oGrid.getStore().getAt(oSM.getSelectedCell()[0]).set('satuan',processed3);


oGrid.stopEditing(false);

}

}


}
}





EXTJS 3.2 editorgrid How to set focus to next cell

5.1.0 trouble with menus disappearing

Is it appropriate for me to put a nightly build into production?

I tested this on Fiddle just now, against the 5.1.0.107 Crisp, and it also fails. Click the first menu item to demonstrate menu disappearing:


Here is the repro.


Ext.create('Ext.panel.Panel', {

width: 500,

height: 300,

title: 'Border Layout',

layout: 'border',

items: [{

title: 'Center Region',

region: 'center', // center region is required, no width/height specified

xtype: 'panel',

layout: 'fit',

margins: '5 5 0 0'

}, { xtype: 'panel',

region: 'west',

split: true,

width: 122,

bodyBorder: false,

collapseDirection: 'left',

collapsible: true,

title: 'Menu',

items: [

{

xtype: 'menu',

floating: false,

items: [

{

xtype: 'menuitem',

text: 'Order Inbox',

handler: function() {Ext.Msg.alert("Hello");}

},

]

}

]

}],

renderTo: Ext.getBody()

});






5.1.0 trouble with menus disappearing

ExtJS 4.2.0 - Ugly and wide checkbox column

I have a grid panel (Ext.grid.Panel), with selType as "checkboxmodel". I am NOT adding any specific checkbox column myself.

When the grid is rendered, it does show the checkbox column as the first column automatically, but it is ugly and wide


How do I make it lean and pretty just like it shows in the ExtJS Grid plugins examples? My code is pretty much same as those examples.


Here is how it looks:

Capture.JPG


And here is how I want it to look:

2Capture.JPG


Thank you for your help!






ExtJS 4.2.0 - Ugly and wide checkbox column

Build Failed ClassCastException: ..StringLiteral cannot be cast to ObjectLiteral

Hey All,

I'm in the process of migrating an existing application to be able to build with CMD. I created a sample app with CMD and that builds without issue (sencha app build). If I copy this 'template' app to my existing app, using the generated app.js, .sencha folder, index.html, etc.. the build no longer works, I get:

Code:



[ERR] BUILD FAILED
[ERR] java.lang.ClassCastException: org.mozilla.javascript.ast.StringLiteral cannot be cast to org.mozilla.javascript.ast.ObjectLiteral

I haven't updated the 'new' app.js or Application.js to reference any of my existing app code, everything is //TODO as it is in the 'template' CMD generated app that does build.

How do you debug this message? Also, are there better ways to migrate an existing app into a CMD app?






Build Failed ClassCastException: ..StringLiteral cannot be cast to ObjectLiteral

[OPEN] [5.1.0.107] VBox Layout Form field blur causes container to scroll to top



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



    EXTJS-16350
    .

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







  2. Default [5.1.0.107] VBox Layout Form field blur causes container to scroll to top



    [5.1.0.107] VBox Layout Form field blur causes container to scroll to top





    Ext version tested:

    • Ext 5.1.0.107 - Broken

    • Ext 5.0.1.1255 - Works




    Browser versions tested against:

    • Chrome 39.0.2171.95 (64-bit)

    • Firefox 34.0.5




    Description:

    If you have a container with layout: 'vbox' that contains form fields with msgTarget: side, when a form field loses focus it causes the parent container to scroll to top. See the test case at: https://fiddle.sencha.com/#fiddle/fnk

    Steps to reproduce the problem:



    • Scroll all the way to the bottom of the panel

    • Focus on a form field

    • Focus on another form field


    The result that was expected:

    The container should not scroll to the top


    The result that occurs instead:

    The container scrolls to the top


















[OPEN] [5.1.0.107] VBox Layout Form field blur causes container to scroll to top

Populating Dataview with different dataitems

Hi guys,

i need assistence. I try to simplify my code but the dataview with component use is a showstopper fpr me.


The dataview with components works fine for me, but i have different dataitem types. So each type has different controls. I would like to change the dataitem class in relation to the type i get from the record.

I tried to change the apply method:



Code:



applyDeviceOverviewBox: function(config) {
if (this.getRecord().get('unique_name') == 'type1') {
return Ext.factory(config, HomeBox.view.type1.DeviceInnerItemView, this.getDeviceOverviewBox());
} else if (this.getRecord().get('unique_name') == 'type2') {
return Ext.factory(config, HomeBox.view.type2.DeviceInnerItemView, this.getDeviceOverviewBox());
}
},

But as soon as i use "this.getRecord()" in applyDeviceOverviewBox method the containing apply methods from datamap are not be called.

DataMap:



Code:



getDeviceOverviewBox: {
setDeviceIcon: 'homebox_type',
setDeviceControlElement1: 'homebox_type',
setDeviceControlElement2: 'homebox_type',
setDeviceId: 'unique_name'
},

Any idea?



Populating Dataview with different dataitems

XTemplate custom Formatter Factories failing



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







  2. Default XTemplate custom Formatter Factories failing



    XTemplate custom Formatter Factories failing





    Hello,

    I cannot seem to successfully define any custom XTemplate property formatters.


    The guide posted at http://docs.sencha.com/gxt/3.1/utili...rty_formatters gives an example which, when copied verbatim, is causing the GWT compiler to error out.



    Code:



    [ERROR] Method with name shorten not registered in this template

    Please advise













XTemplate custom Formatter Factories failing

Select with multiple values

Hi, I need to add each option of a select multiple values..

In ExtJs I used:



Code:



listConfig: {
xtype: 'boundlist',
itemSelector: 'div',
itemTpl: [
'{CodSoft} - {NomInd}'
}



What property should I use to do in Sencha Touch?

Captura.PNG


Thank you






Select with multiple values

Weird assignment failure in AbstractComponent

This is a real weird issue to me. I have a workaround but like to get insights of the cause.

The problem: my app shows a form panel from a list when a list item is tapped. The form panel sometimes will not show in iPhone. It shows fine in iPad, Android Phone/tablets. The app is hosted in a web server and accessed through the default browser of the devices above. Sencha Touch 2.4.1 commercial is used.


The root cause: took a while to identify the failure being at AbstractComponent.initElement line 117 to 119 (below). "element" is an object and "this.innerElement" is null so the assignment inside "if" was executed. The logs (by "console.log") showed that the assignment failed. After the assignment, "this.innerElement" is still null.

if (!this.innerElement) {

this.innerElement = element;

}


The workaround: assign "this.innerElement" to null or a string, then do the "element" assignment caused "this.innerElement" to be set.

this.innerElement=null; //or "aa"

this.innerElement=element;


The curiocity: Has anyone run into issues like this? It is totally weird. I wonder if it implies hidden serious issues.






Weird assignment failure in AbstractComponent

Possible to write an XTemplate custom conditional formatter?

[unable to retrieve full-text content]Simple use case example: is it possible to define an "isNotNullOrEmptyString" that XTemplates can use such that the following works in an XTemplate?...



Possible to write an XTemplate custom conditional formatter?

Sorters doesnt work correct in 5.1



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







  2. Default Sorters doesnt work correct in 5.1



    Sorters doesnt work correct in 5.1





    Hello,

    at the moment i try to migrate my app from 4.1.3 to 5.1. Everything works fine but I got stucked on some store issues.


    Checkout this example code:



    Code:




    var store = Ext.create('Ext.data.Store', {
    fields: ['firstName', 'lastName'],
    sorters: 'lastName',
    data: [
    { firstName: 'Tommy', lastName: 'Maintz' },
    { firstName: 'Rob', lastName: 'Dougan' },
    { firstName: 'Ed', lastName: 'Spencer'},
    { firstName: 'Jamie', lastName: 'Avins' },
    { firstName: 'Nick', lastName: 'Poulden'}
    ]
    });

    console.log(store.sorters);



    In 4.1.3 everything seems to be fine. There are items on the sorters object ... In 5.1 I got one element of null.

    greeetings














  3. Default







    Not sure I've been able to reproduce this. I put your code into this Fiddle:

    https://fiddle.sencha.com/#fiddle/fn0

    I don't see any null values. Do you see the issue when you run that Fiddle?









    Are you a Sencha products veteran who has wondered what it might be like to work at Sencha? If so, please reach out to our recruiting manager:


    sheryl@sencha.com












Sorters doesnt work correct in 5.1

Can I user extjs 3.4 and sencha touch Carousel example in same page

[unable to retrieve full-text content]Hi All, I want to know can i use sencha touch 1.0.1 with extjs 3.4.



Can I user extjs 3.4 and sencha touch Carousel example in same page

Radiogroup selection issue



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







  2. Default Radiogroup selection issue



    Radiogroup selection issue





    When a window maxHeight Config set and the window having a form and the form contains radiogroups, selecting any of the radio button scrolls the form to top for the first time.

    Tested Extjs Version: 5.0.1 and 5.1.0

    Tested Browser: Firefox 34.0


    The fiddle is located at "https://fiddle.sencha.com/fiddle/fmk "



    Code:



    Ext.application({
    name : 'Fiddle',
    getYesNoRadioItems: function()
    {
    return [
    {
    boxLabel : 'Yes'
    ,checked : false
    ,inputValue : true
    },{
    boxLabel : 'No'
    ,checked : true
    ,inputValue : false
    }
    ];
    },
    launch : function()
    {
    var me = this;
    var items = [];
    for (var i = 1; i <= 12; i++)
    {
    items.push({
    xtype : 'radiogroup'
    ,fieldLabel : 'Group ' + i
    ,defaults : {name: 'group' + i}
    ,items : me.getYesNoRadioItems()
    });
    }

    var form = Ext.create('Ext.form.Panel',
    {
    frame : false
    ,autoScroll : true
    ,bodyPadding : '5px 5px 0px'
    ,trackResetOnLoad: true
    ,fieldDefaults :
    {
    labelAlign : 'left'
    ,labelWidth : 200
    ,anchor : '100%'
    ,labelStyle : 'font-weight:bold;'
    ,labelSeparator: ''
    }
    ,items : items
    });

    Ext.create('Ext.window.Window',
    {
    items : form
    ,layout : 'fit'
    ,maxHeight : 200
    ,width : 400
    ,autoShow : true
    });
    }
    });














Radiogroup selection issue

EXTJS3.4 : Uncaught TypeError: Cannot read property 'parentNode' of undefined

HI

If we are closing a tabPanel using closable: true, the default action will be destroying the tabPanel. And so, since the tabPanel is destroyed we wont be able to display the tabPanel again. But, I do not want the tabPanel to be destroyed, it has to be hidden so I tried this



Code:



this.Manage = new Ext.TabPanel({
title: 'Manage',
closable: true,
closeAction: 'hide',
activeTab: 0,
items:[
this.manageGridPanel


]
});

What happens with this is, I am able to display the tabPanel but the child elements within that are not being displayed. And I am getting following exception in js console Uncaught TypeError: Cannot read property 'parentNode' of undefined Also because of this, I am not able to navigate to other tabpanels from my treepanel, I am getting the following exception in js console Uncaught TypeError: Cannot read property 'className' of undefined .

I also tried using the beforeclose event like this in the tabpanel



Code:



listeners: {
'beforeclose': function(panel) {
console.log('TP - beforeclose');
var closeAction = this.ownerCt.closeAction
if (closeAction === 'hide') {
panel.hide();
var el = Ext.get(panel.tabEl);
el._savedWidth = el.getWidth();
el.setWidth(0);
el.setVisible(false);
return false;
}
return true;
}
}

This is how I open the tab panel dynamically,

Code:



if(n.text=='Manage')
{
that.hometabPanel.add(manage.Manage).show();
}

Should I give tab.setVisible(true) ?or what changes should I make for this to work??



EXTJS3.4 : Uncaught TypeError: Cannot read property 'parentNode' of undefined

Combo box do not select Value from drop down

I am using ExtJs to create a combobox.

Here is my code:

Code:



{
xtype : 'combo',
id: 'createformTypeCombo',
allowBlank: false,
forceSelection: true,
editable:false,
store: formTypeStore,
valueField: 'value',
displayField: 'name',
width: 260,
}

And here is the store:

Code:



var formTypeStore = SailPoint.Store.createRestStore({
url : SailPoint.getRelativeUrl('/rest/form/formTypes'),
root: 'objects',
fields: ['name','value']
});

It works fine and combo box is displayed and I can select value.

But if I open and close it 4 times, then in next show it shows the values but It do not allow me to select the last two value. I can only select first value.


Please suggest.


rdTjT.png


**Note:** I have tried copying and executing this code in forms of other pages of my application. But behavior is same in all cases.






Combo box do not select Value from drop down

lundi 29 décembre 2014

Android: Bad List scrolling performance when docked element included (S.T. 2.3.1)

Hi guys,

I have this problem in building Android App using Sencha Touch 2.3.1 and Phonegap.

The list scrolling performs fine on iOS but supremely lags on Android. So I tried things like:



  • Set -webkit-transform on List item to enable GPU acceleration

  • Adjust the scrolling behaviour using list's momentumEasing


None of the above actually works, so I try again removing all other parts out of the app. And when I remove the 'docked: top' titlebar above the list, it runs smoothly again.

My simplified app structure now is:



Code:



/* Remove this titlebar and it will be smooth */
{
docked: 'top',
xtype: 'titlebar',
cls: 'notif-title',
padding: 10,
title: '<span class="title-text">Questions</span>',
items: [
{
xtype: 'image',
src: 'resources/images/logo.png',
height: 40,
width: 40
},
{
xtype: 'image',
itemId: 'user-avatar',
cls: 'user-avatar main',
src: 'resources/images/user-default.png',
height: 40,
width: 40,
align: 'right'
}
]
},
{
xtype: 'carousel',
fullscreen: true,
layout: 'card',
indicator: false,
flex: 1,
activeItem: 0,
hideAnimation: 'fadeOut',
showAnimation: 'fade',
items: [
{
xtype: 'questionlistview'
}
]
}

And the QuestionList Class is

Code:



Ext.define('abc.view.QuestionList', {
extend: 'Ext.Panel',
xtype: 'questionlistview',
requires: [
'Ext.picker.Picker',
'Ext.TitleBar',
'Ext.dataview.List',
'Ext.plugin.ListPaging',
'abc.utils.MyPullRefresh',
'abc.utils.MyListPaging'
],
config: {
layout: 'fit',
items: [
{
xtype: 'list',
itemId: 'listAllQues',
emptyText: 'There is no question available',
store: 'questionstore',
infinite: true,
variableHeights: true,
scrollable: {
direction: 'vertical',
directionLock: true,
},
plugins: [
{
xclass: 'abc.utils.MyPullRefresh',
pullText: 'Pull down for more new questions!'
},
{
xclass: 'abc.utils.MyListPaging',
autoPaging: true,
padding: 10
}
]
}
]
}
});

Is there any body encounter the same problem ? Can any one explain why there is a significant difference in performance in this 2 cases ?



Android: Bad List scrolling performance when docked element included (S.T. 2.3.1)

DatePicker/MonthPicker problem with ok/cancel button



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







  2. Default DatePicker/MonthPicker problem with ok/cancel button



    DatePicker/MonthPicker problem with ok/cancel button





    If you use datepicker as grid filter, and open it and then select "month picker" and then click on "ok" or "cancel" inside of month picker, it disappears suddenly.

    check this fiddle : https://fiddle.sencha.com/#fiddle/fmc















DatePicker/MonthPicker problem with ok/cancel button

Help, problems with variables!

Hi,

I have just completed my first application, and the plan is to go live with it tomorrow, but I am stuck!


I am using a global variable in all my stores, but they dont load - so there must be something going on here.


This is my app.js



Code:



var isAdmin = false;var companyCode = "";
pageParameters = Ext.Object.fromQueryString(window.location.search.substring(1));
var values = Ext.Object.getValues(pageParameters);
companyCode = values[0];

if( Ext.Object.getSize(values)==2){
isAdmin = values[1];
}






var isOpen = false;


Ext.require(['Ext.TitleBar']);






Ext.application({
name: 'Hippocrates',
requires: [
'Ext.MessageBox'
],


views: [
'Main',
"Home",
"Horses",
"Newstat",
"Details",
"Order"
],
models:[
"User",
"NewStat"
],
stores:[
"User",
"NewStat"
],
controllers:["MyController"],
icon: {
'57': 'resources/icons/Icon.png',
'72': 'resources/icons/Icon~ipad.png',
'114': 'resources/icons/Icon@2x.png',
'144': 'resources/icons/Icon~ipad@2x.png'
},


isIconPrecomposed: true,


startupImage: {
'320x460': 'resources/startup/320x460.jpg',
'640x920': 'resources/startup/640x920.png',
'768x1004': 'resources/startup/768x1004.png',
'748x1024': 'resources/startup/748x1024.png',
'1536x2008': 'resources/startup/1536x2008.png',
'1496x2048': 'resources/startup/1496x2048.png'
},


launch: function() {


//Hämta antalet ändringar på foderstat
Ext.Ajax.request({
url: 'Data/getCount.php?id=' + companyCode,
params: {
id: 1
},
success: function(response){
var text = response.responseText;
// Uppdatera knappen med antalet
Ext.getCmp('btn1').tab.setBadgeText(text);
}
});


//Hämta antalet liggandes ordrar
Ext.Ajax.request({
url: 'Data/getOrderCount.php?id=' + companyCode,
params: {
id: 1
},
success: function(response){
var text = response.responseText;
// Uppdatera knappen med antalet
Ext.getCmp('btn2').tab.setBadgeText(text);
}
});



//Hämta hem det senaste till hemskärmen
Ext.Ajax.request({
url: 'Data/viewHome.php?id=' + companyCode,
params: {
id: 1
},
success: function(response){


var text = response.responseText;

var eventDetailView = Ext.create('Hippocrates.view.Details');

Ext.getCmp("homePanel").setHtml(text);
// Destroy the #appLoadingIndicator element
if(isAdmin==false){
Ext.fly('appLoadingIndicator').destroy();
}
}




});

//Hämta arbetsorder
if(isAdmin=='true'){

//Hämta hem det senaste till hemskärmen
Ext.Ajax.request({
url: 'Data/getJob.php?id=' + companyCode,
params: {
id: 1
},
success: function(response){


var text = response.responseText;

var eventDetailView = Ext.create('Hippocrates.view.Details');

Ext.getCmp("orderPanel").setHtml(text);
// Destroy the #appLoadingIndicator element

Ext.fly('appLoadingIndicator').destroy();

}




});




}




// Initialize the main view
Ext.Viewport.add(Ext.create('Hippocrates.view.Main'));






},


onUpdated: function() {
Ext.Msg.confirm(
"Application Update",
"This application has just successfully been updated to the latest version. Reload now?",
function(buttonId) {
if (buttonId === 'yes') {
window.location.reload();
}
}
);
}

});

And here is a sample, where I am loading my store and using the variable.


Code:



Ext.define('Hippocrates.store.NewStat', { extend: 'Ext.data.Store',


config: {
model: 'Hippocrates.model.NewStat',
autoLoad: true,
grouper: {
property: 'Stable',
direction:'ASC'
},
sorters: [{
property: 'Name',
direction: 'ASC'
}],




proxy: {
type: 'ajax',
url: 'Data/getAllNewStat.php?id=' + companyCode ,


reader: {
type: 'json'
}
},


listeners:{
load:function(s,result,success,op){


}
}
}
});



Any suggestions? It works fine in development...

Joakim






Help, problems with variables!

Best Practices - When to create a new view?

Hello everyone,

I am wondering what is the best practice in terms of creating new views. For example, consider the following code:



Code:



Ext.application({
name: 'Sencha',


launch: function() {

Ext.create("Ext.tab.Panel", {
fullscreen: true,
tabBarPosition: 'bottom',


items: [
{
title: 'Home',
iconCls: 'home',
cls: 'home',
html: [
'',
'Welcome to Sencha Touch',
"We're creating the Getting Started app, which demonstrates how ",
"to use tabs, lists, and forms to create a simple app.",
'Sencha Touch'
].join("")
},
{
title: 'Contact',
iconCls: 'user',
xtype: 'formpanel',
url: 'contact.php',
layout: 'vbox',


items: [
{
...
}
]
}
]
});
}
});



Would it be a good idea to create new views to represent the items from the above? Like this:

Code:



Ext.application({
name: 'Sencha',


views: ['Home, Contact'],


launch: function() {

Ext.create("Ext.tab.Panel", {
fullscreen: true,
tabBarPosition: 'bottom',


items: [
{
xtype: 'home'
},
{
xtype: 'contact"
}
]
});
}
});



Thanks for your help.



Best Practices - When to create a new view?

Not all Promises returned

Run the code below:

Code:



var count = 0,
promise = new Ext.Promise(),
syncEngines = ['engine1', 'engine2', 'engine3', 'engine4'],
syncTimestamps = Ext.space.SecureLocalStorage.get('syncTimestamps'),
checkDone = function() {
if(count==syncEngines.length) {
promise.fulfill(new Date());
}
};
Ext.each(syncEngines, function(engine) {
console.log('Getting timestamp for: ' + engine);
syncTimestamps.get(engine).then(function(dt) {
count++;
console.log('Promise return: ' + count);
checkDone();
});
});
return promise;

Here's the result:


Code:



[Log] Getting timestamp for: engine1 (Main.js, line 273)
[Log] Getting timestamp for: engine2 (Main.js, line 273)
[Log] Getting timestamp for: engine3 (Main.js, line 273)
[Log] Getting timestamp for: engine4 (Main.js, line 273)
[Log] Promise return: 1 (Main.js, line 276)
[Log] Promise return: 2 (Main.js, line 276)
[Log] Promise return: 3 (Main.js, line 276)

Never the 4th one back...



Not all Promises returned

GSS Support in GXT 3.x

[unable to retrieve full-text content]Hi GXT Devs, Now that GWT 2.7 supports GSS, are there plans to convert GXT to it? We are interested in CSS3 support that CSSResource does not...



GSS Support in GXT 3.x

[OPEN] Setting minHeight on a grid can cause Layout Run Failures



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



    EXTJS-16336
    .

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

















[OPEN] Setting minHeight on a grid can cause Layout Run Failures

Tree grid using MVC patter

[unable to retrieve full-text content]I followed example of *treegrid* from documentation (http://dev.sencha.com/deploy/ext-4.0.7-gpl/examples/tree/treegrid.html)and separated it into...



Tree grid using MVC patter

Undefined view for Ext.appController

I am starting to convert my Ext 4.2 programs to 5.1. When trying to display a panel, I get an error because the view value is undefined in

var name = Ext.app.Controller.getFullName(view, 'view', this.$namespace)


which is callled by the dispatch function in Ext.app.domain.Component when firing an add event on the panel.


This is being called on a controller that extends Ext.app.Controller so it does not have a view value. What am I doing wrong?






Undefined view for Ext.appController

How to disable one row check box (CheckBoxSelectionModel) in Grid

DatePicker/MonthPicker problem again (now with qtip)



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







  2. Default DatePicker/MonthPicker problem again (now with qtip)



    DatePicker/MonthPicker problem again (now with qtip)





    As mentioned in http://www.sencha.com/forum/showthread.php?289825 , the problem was solved but when you have qtip it fails again!

    to test just enable qtip by this code :


    Ext.QuickTips.init();














  3. Default







    a workaround is ;

    Code:



    // copied from the source code (http://docs.sencha.com/extjs/5.1/5.1.0-apidocs/source/Date2.html#Ext-picker-Date)




    Ext.define('EXTJS-xxxx.picker.Date', {
    override: 'Ext.picker.Date',


    beforeRender: function () {
    /*
    * days array for looping through 6 full weeks (6 weeks * 7 days)
    * Note that we explicitly force the size here so the template creates
    * all the appropriate cells.
    */
    var me = this,
    days = new Array(me.numDays),
    today = Ext.Date.format(new Date(), me.format);


    if (me.padding && !me.width) {
    me.cacheWidth();
    }


    me.monthBtn = new Ext.button.Split({
    ownerCt: me,
    ownerLayout: me.getComponentLayout(),
    text: '',
    tooltip: me.monthYearText,
    tooltipType: 'titlse',//added because of bug when qtip is enabled :
    listeners: {
    click: me.doShowMonthPicker,
    arrowclick: me.doShowMonthPicker,
    scope: me
    }
    });


    if (me.showToday) {
    me.todayBtn = new Ext.button.Button({
    ownerCt: me,
    ownerLayout: me.getComponentLayout(),
    text: Ext.String.format(me.todayText, today),
    tooltip: Ext.String.format(me.todayTip, today),
    tooltipType: 'title',
    handler: me.selectToday,
    scope: me
    });
    }


    //me.callParent(); //commented because of bug


    Ext.applyIf(me, {
    renderData: {}
    });


    Ext.apply(me.renderData, {
    dayNames: me.dayNames,
    showToday: me.showToday,
    prevText: me.prevText,
    nextText: me.nextText,
    days: days
    });


    me.protoEl.unselectable();
    },


    });














DatePicker/MonthPicker problem again (now with qtip)

grid.getView() fails in initComponent



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







  2. Default grid.getView() fails in initComponent



    grid.getView() fails in initComponent





    In previous version I called me.getView() in initComponent of a grid an all thing was ok. but at 5.1 version I should do this only AFTER this.callParent() call otherwise I get this error :

    Uncaught TypeError: Cannot read property 'scroll' of undefined


    you can check this fiddles too :


    https://fiddle.sencha.com/#fiddle/fkn : it is in 5.0.1 and it is ok


    https://fiddle.sencha.com/#fiddle/fko : the same example but in 5.1 and it raises error


    Note that if it is a CHANGE , you should tell about it in Upgrade guide. It makes 80% of my old codes not to work.















grid.getView() fails in initComponent

Design flaw?

Hi, I am trying to use the sample thats created by default with a toolbar in the bottom, with some buttons. I have now added a .js file for each panel and now I am getting some design problems.

I want the header and the toolbar in the bottom to be present on all my panels, no matter whats in them. But I realized that now when I am adding a listview, I am missing my "Title" banner and the title now goes into the button in the bottom menu?


Main



Code:



Ext.define('Hippocrates.view.Main', { extend: 'Ext.tab.Panel',
requries: [
'Hippocrates.view.Home',
"Hippocrates,view.Horses",
"Hippocrates.view.Newstat"],
xtype: 'main',
config: {
name: 'MainTab',
tabBarPosition: 'bottom',
items: [
{xtype: 'homecard'},
{xtype:"newstat"},
{xtype: 'horses'}
]
}
});

Homecard


Code:



Ext.define('Hippocrates.view.Home', {
extend: 'Ext.Panel',
xtype: "homecard",

config: {


title: 'Hem',
iconCls: 'home',
styleHtmlContent: true,
scrollable: true,


items: {

docked: 'top',
xtype: 'titlebar',
title: 'Hippocrates TM'
},


html: [
"Wow!"
].join("")
}


});

the card with the list


Code:



Ext.define('Hippocrates.view.Horses', { extend: 'Ext.List',
xtype: "horses",
requirees: ["Hippocrates.store.User"],
config: {


title: 'Alla horses',
grouped: false,
itemTpl: '{Name} {owner}',
store: 'User',
onItemDisclosure: true
}


});

I know that it is something I am missing here, but as a new beginner - it is hard to track it down?

Joakim






Design flaw?

New bug for IdProperty + inheritance in Ext 5.1



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







  2. Default New bug for IdProperty + inheritance in Ext 5.1



    New bug for IdProperty + inheritance in Ext 5.1





    (Check this fiddle for complete sample : https://fiddle.sencha.com/#fiddle/fkb)

    Assume


    we have these "base" and "child" classes : Ext.define('base', { extend: 'Ext.data.Model', idProperty: 'Id', }); Ext.define('child', { extend: 'base', fields:[ 'Id','Title'], });the following "getField" method returns null : var x = new child(); console.warn(x.self.fieldsMap);//it has not Id !!! console.warn(x.getField('Id'));but if I don't use inheritance it would be ok! Also If I don't define 'Id' field in child class, it would be ok too (check 'child2' class in provided sample)It makes problem wherever this "getField" method called (like in TreePicker).













New bug for IdProperty + inheritance in Ext 5.1

nested treestore questions

Hi

My goal is a JSON CRUD treestore with 2 levels (say Orders and Items). I am able to load the store in 1 go. But now the problems start. If I delete an Item then the key sent is that of the Order

At the moment I have no associations. So my first question is


1) Should I use associations? eg Order hasMany Item


2) will this affect the JSON? Currently, I have "children" at both levels in the JSON. Is this correct or should the names reflect the model names eg "Order" and "Item"?


Peter






nested treestore questions

key events in form inputfield, changes width of grid column



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







  2. Default key events in form inputfield, changes width of grid column



    key events in form inputfield, changes width of grid column





    In my example I have a grid with forceFit set to true, inside a container with layout set to fit.

    On the grid I have docked a form on top with a textfield with msgTarget set to side

    when in the field, on every keypress, keyup and blur, the first column will increase it's width by 1px.

    last version testet was 5.1.1.150 and the error is still there


    Testet in Chrome and IE11


    https://fiddle.sencha.com/#fiddle/fk7















key events in form inputfield, changes width of grid column

dimanche 28 décembre 2014

setValue method of combobox behave differently in chrome and IE10+



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







  2. Default setValue method of combobox behave differently in chrome and IE10+



    setValue method of combobox behave differently in chrome and IE10+





    Ext version tested: Browser versions tested against: Description:

    • When setValue method is invoked in IE10+ combobox will expand and steal focus. This doesn't happen in IE9 and chrome


    Steps to reproduce the problem:



    Open fiddle, press button.



    The result that was expected:



    • value is set, combobox isn't expanded


    The result that occurs instead:

    • value is et, combobox is expanded















setValue method of combobox behave differently in chrome and IE10+

How to hide the sorting arrow in GXT3 grid?

Use case: User initiate the search with the a search criteria and returned result displayed in GXT3 grid. Column sorting enabled in gxt3 grid so user could sort data by selecting column header and there is arrow to indicate the sort order in grid. if the user initiate search second time, I could be able to clear the user selected column and set default sorting but still sort arrow displayed in grid. How can I hide the sorting arrow in grid? Thanks for your time.

Clear sorting info:

PagingLoadConfig.getSortInfo().clear();







How to hide the sorting arrow in GXT3 grid?

Sencha Touch 2.4.1 GPL - Ruby on Rails

Beginners problem!

Hi,

I have just created a simple store and a model that fetches a simpe JSON object.


So, within my store after loading I want to get the 567 data out. I can just get the raw data out, what am I doing wrong?

Code:



load:function(s,result,success,op){
console.info(result[0].raw);
}

And that gives me :

Code:



Object {items: "567"}

I just want the 567 as a result?

Best regards, Joakim






Beginners problem!

How-to add new nodes in a TreeStore/REST with error handling?

.appendChild() works great but don't have any callback method so there are no way of handling backend api errors.

Creating a new node from the model and do a .save() on it gives me the callback but requires the store to be reloaded, i.e. not as neat solution as inserting directly into the story and letting it sync the changes to the backend.


There must be a way of inserting directly with error handling?






How-to add new nodes in a TreeStore/REST with error handling?

TreeStore with Root from Json, how?

Is it possible to define an empty TreeStore without a root: {} config and use a node from JSON as root?

I can't get it to work properly without a static root defined in the TreeStore.

It's working and the static root node is hidden, but I can't see why I needs to be there.


Here is the JSON I would like to use for my Tree. (My Root should be the root node).



Code:



{
"data": {
"id": 0,
"name": "My Root",
"expanded": true,
"data": [
{
"id": 5,
"name": "Test 1",
"data": [
{
"id": 6,
"name": "Sub Folder",
"loaded": true
}
]
},
{
"id": 7,
"name": "Test 2",
"loaded": true
},
{
"id": 8,
"name": "Test 3",
"loaded": true
}
]
}
}





TreeStore with Root from Json, how?

Cannot read property 'getCount' of undefined

i'm receiving this error when trying to display a Panel with one list.

Cannot read property 'getCount' of undefined


The app is failing at this line in sencha-touch-debug.js (v1.0.1):



Code:



var layoutCollection = this.layoutOnShow,
ln = layoutCollection.getCount(),

Here are my source files.

/dl1.html:


Code:



<!DOCTYPE html>
<html>
<head>
<title>Hello World</title>
<link href="touch1/resources/css/sencha-touch-debug.css" rel="stylesheet" type="text/css" />
<script src="touch1/sencha-touch-debug.js" type="text/javascript"></script>
<script type="text/javascript" src="app/model/UserProfile.js"></script>
<script type="text/javascript" src="app/model/Result.js"></script>
<script type="text/javascript" src="app/model/Device.js"></script>


<script type="text/javascript" src="app/DataStores.js"></script>
<script type="text/javascript" src="app/Controller.js"></script>
<script type="text/javascript" src="app/Service.js"></script>

<script type="text/javascript" src="app/UserProfilePage.js"></script>

<script type="text/javascript" src="app/Viewport.js"></script>
<script type="text/javascript" src="app/app1.js"></script>

<script type="text/javascript">
try {
startApp();
} catch(e) {
console.log(e.message);
console.log(e.linenumber);
}
</script>
</head>

<body></body>
</html>

app/app1.js :


Code:



function startApp() {
Ext.setup({
tabletStartupScreen: 'tablet_startup.png',
phoneStartupScreen: 'phone_startup.png',
icon: 'icon.png',
glossOnIcon: false,
onReady: function() {

gUserID='';
gTokenUser='';
gDeviceId='FADECED';

mobile.views.Viewport = new mobile.views.Viewport();

var result = Ext.ModelMgr.create(
{ Action: 'loadUserProfile' },
'mobile.models.Result'
);
result.set('ErrorContainer','errorSection');
result.set('ErrorComponent','errorText');

Ext.dispatch({
controller: mobile.controllers.Controller,
action: result.get('Action'),
animation: {type:'slide', direction:'left'},
model:result
});
}
});
}

app/UserProfilePage.js:


Code:



Ext.ns("mobile.views");

var devicesTpl = new Ext.XTemplate(
'<tpl for=".">',
'<div class="deviceInfo">',
'{OS} {OSVersion} {Model} {DeviceName} {DeviceId}',
'</div>',
'</tpl>'
);

var deviceList = new Ext.List({
id: 'deviceList'
,tpl: '<tpl for="."><div class="deviceInfo">{OS} {OSVersion} {Model} {DeviceName} {DeviceId}</div></tpl>',
itemTpl: '{OS} {OSVersion} {Model} {DeviceName} {DeviceId}',
store: new Ext.data.Store({
model:'mobile.models.Device',
autoLoad: true,
proxy: {
type: 'ajax',
url: 'app/DevicesData.json',
reader: {
type: 'json',
root: 'Devices'
}
}
}),
itemSelector:'div.deviceInfo',
scroll:true
});

mobile.views.UserProfilePage = Ext.extend(Ext.Panel,{
id:'userProfilePanel',
items:[ deviceList ]
});

Ext.reg('mobile.views.UserProfilePage',mobile.views.UserProfilePage);

app/DevicesData.json:


Code:



{
"Devices":[
{
"OS":"iPhone OS",
"OSVersion":"8.1",
"Model":"iPhone Simulator",
"DeviceName":"abcdef1234",
"DeviceId":"abcdef1234"
},
{
"OS":"iPhone OS",
"OSVersion":"8.1",
"Model":"iPhone Simulator",
"DeviceName":"abcdef2345",
"DeviceId":"abcdef2345"
}
]
}

any help is appreciated. Thank you,



Cannot read property 'getCount' of undefined

Desktop Sample stylesheets overridden by examples/desktop/resources/Desktop-all.css?

samedi 27 décembre 2014

Grid/Store sync for Add/Remove

I'm new to ExtJS and this is my first exercise.

I have a REST based model/store that works great. The store is linked to a grid where I can select a row and update it from an external form. However, when I create or delete a record in the store, the grid is not updated. The model/store is working with the REST service on all CRUD operations.


Any ideas?


I can share code if necessary.

Using ExtJS 5.1






Grid/Store sync for Add/Remove

[5.1.1 Nightly Build 20141226] Combo box with inline store no longer works



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







  2. Default [5.1.1 Nightly Build 20141226] Combo box with inline store no longer works



    [5.1.1 Nightly Build 20141226] Combo box with inline store no longer works





    Ext version tested:

    • 5.1.1 Nightly Build 20141226


    Browser versions tested against: Description:


    The combo box in the latest nightly build does no longer work with an inline store.


    Code:



    { xtype: 'combobox', store: [['1', 'One'],['2', 'Two'],['3', 'Three']],

    The combo box shows all three options, the user can select one, the change event is emited, but the combo box does not show the selected value.

    Here is a fiddle that demonstrates the problem:

    https://fiddle.sencha.com/#fiddle/fjl


    As a workaround you can use an external store from a viewModel. But then I run into another problem. The reset() function of the combobox no longer works. Nothing happens when the application calls this function.


    These problems are not present in 5.1.0.107.















[5.1.1 Nightly Build 20141226] Combo box with inline store no longer works

Point TabsPanel gxt 3.1

Hello,

I have this code:


Code:



VerticalPanel vp = new VerticalPanel();
vp.setSpacing(10);



final TabPanel panel = new TabPanel();
panel.setPixelSize(450, 250);
Label normal = new Label("Test");
panel.add(normal, "Test");
vp.add(panel);

RootPanel.get().add(vp);

How to remove this point with the tab?

tabs.jpg






Point TabsPanel gxt 3.1

new Ext.dd.DropZone onNodeDrop isn't called


Code:





var panelDropZone = new Ext.dd.DropZone(v.getEl(), {

getTargetFromEvent: function(e) {
return e.getTarget('.my-div'); // allow to drop op this node.
},

// While over a target node, return the default drop allowed class which
// places a "tick" icon into the drag proxy.
onNodeOver : function(target, dd, e, data){

// onNodeOver is called: target contains = '.my-div'
return Ext.dd.DropZone.prototype.dropAllowed;
},

onNodeDrop : function(target, dd, e, data){

// onNodeDrop isn't called: why?
return true;
}
});

I'm using ext-4.2.2.1118

If onNodeOver is called, why isn't onNodeDrop called; This shouldn't be the case according to the docs. Could this be a bug?


I'm trying to find the code that handles the onNodeXX events.






new Ext.dd.DropZone onNodeDrop isn't called
[unable to retrieve full-text content]


[5.1.0.107] Problem with grid summary feature



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







  2. Default [5.1.0.107] Problem with grid summary feature



    [5.1.0.107] Problem with grid summary feature





    Ext version tested:

    • 5.1.0.107

    • 5.1.1 Nightly Build 20141226


    Browser versions tested against: Description:

    I have a problem with the grid feature 'summary'. It always shows 0 as a value. This only happens when the feature is not configured with a dock option.



    Code:



    features: [ { ftype: 'summary'} ],

    Here is a fiddle that demonstrates the problem:

    https://fiddle.sencha.com/#fiddle/fjg

    With a dock option everything works fine



    Code:



    features: [ {
    ftype: 'summary',
    dock: 'bottom'
    } ],

    Ralph













[5.1.0.107] Problem with grid summary feature

vendredi 26 décembre 2014

REST Store sends "ghost" record.

I'm struggling with a REST-proxie on a TreeStore.

If I don't add a root: {} config in the store, the proxy will always send a empty "ghost"-record on first sync(). It contains all model parameters but they are empty.


If I include a copy of my real (backend) root record in the stores root-config it won't send the ghost record, but on first load() the store loads twice for some reason.


Can someone please shed some light over this, I can't be the first one with this problem, although Google makes it look so...


My Store:



Code:



Ext.define('Archive.store.Directory', { extend: 'Ext.data.TreeStore',


requires: [
'Archive.model.Directory'
],


constructor: function(cfg) {
var me = this;
cfg = cfg || {};
me.callParent([Ext.apply({
storeId: 'Directory',
autoLoad: false,
model: 'Archive.model.Directory',
root: {
id: 0,
name: '/',
games: 0,
expanded: true
}
}, cfg)]);
}
});



My Model:


Code:



Ext.define('Archive.model.Directory', { extend: 'Ext.data.Model',


requires: [
'Ext.data.field.Integer',
'Ext.data.field.String',
'Ext.data.field.Boolean',
'Ext.data.proxy.Rest',
'Ext.data.reader.Json',
'Ext.data.writer.Json'
],


fields: [
{
type: 'int',
name: 'id'
},
{
type: 'int',
name: 'idParent'
},
{
type: 'string',
name: 'name'
},
{
type: 'string',
name: 'description'
},
{
type: 'int',
name: 'games'
},
{
type: 'boolean',
name: 'leaf'
}
],


hasMany: {
model: 'Archive.model.Directory',
name: 'children'
},


proxy: {
type: 'rest',
extraParams: {
otype: 'user',
oid: 1
},
url: '/api/v1/archive/directory.php',
appendId: false,
reader: {
type: 'json',
rootProperty: 'data'
},
writer: {
type: 'json'
}
}
});





REST Store sends "ghost" record.

initConfig() fails for Ext.data.Model



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





  2. Sencha User



    Join Date

    Jun 2014


    Location

    Murmansk, Russia


    Posts

    120


    Vote Rating

    43













initConfig() fails for Ext.data.Model

Grid row truncated rendering at top/bottom

I am using GXT 3.0.6 and have both LiveGridView and GridView in my application.

I've noticed that LiveGridView does a great job of only rendering a complete row at the top and bottom of the grid. In other words, you will not see any truncation of the row text or icons like seen in GridView:


Screen Shot 2014-12-26 at 2.03.06 PM.png


Similar LiveGridView shot (no truncation):


Screen Shot 2014-12-26 at 2.08.15 PM.png


Is there a way to configure GridView to not truncate ?


Thanks,

JR






Grid row truncated rendering at top/bottom

Tabindex not working for multiselect fields in extjs 4

Hello All,

I have some 10 - 15 fields in my form and the tabindex works fine for all the fields except for the multiselect fields. When I am trying to tab to the multiselect field from the previous field, the control never goes to the multi-select field. This is happening in IE with extjs 4.2 version. I saw something which says there is a fix for this extjs 5. But is there any workaround for this to work in extjs 4 version.


Thanks,






Tabindex not working for multiselect fields in extjs 4

ERRORS after build!

Ext JS version 5.1.0.107

Sencha Cmd v5.1.0.26

Sencha Cmd v5.1.1.33


If generate new project:

sencha -sdk ./../extjs5/ generate app TESTPROJECT ./

View in Chrome http_//127.0.0.1/: OK

Throw we have warning:

[W] Overriding existing mapping: 'widget.gridview' From 'Ext.grid.View' to 'Ext.view.Table'. Is this intentional?


If build project:

sencha app build testing

View in Chrome http_//127.0.0.1/build/testing/TESTPROJECT/: BAD


Uncaught TypeError: undefined is not a function

app.js?_dc=1419601267057:7174 [E] Ext.event.publisher.Publisher.constructor(): Cannot create multiple instances of 'Ext.event.publisher.Dom'. Use 'Ext.event.publisher.Dom.instance' to retrieve the singleton instance.

app.js?_dc=1419601267057:7179 Object

app.js?_dc=1419601267057:7184 console.trace()app.js?_dc=1419601267057:7184 logapp.js?_dc=1419601267057:1069 Ext.apply.raiseapp.js?_dc=1419601267057:25005 Ext.define.constructorapp.js?_dc=1419601267057:9983 Ext.Base.Base.addMembers.callParentapp.js?_dc=1419601267057:26959 Ext.define.constructorapp.js?_dc=1419601267057:10563 constructorapp.js?_dc=1419601267057:91774 Ext.onReady.priorityapp.js?_dc=1419601267057:15485 Ext.env.Ready.invokeapp.js?_dc=1419601267057:15529 Ext.env.Ready.doInvokeAllapp.js?_dc=1419601267057:15498 Ext.env.Ready.invokeAllapp.js?_dc=1419601267057:15454 Ext.env.Ready.handleReadyapp.js?_dc=1419601267057:15469 (anonymous function)app.js?_dc=1419601267057:4995 (anonymous function)app.js?_dc=1419601267057:5187 (anonymous function)

app.js?_dc=1419601267057:994 Uncaught Error: Cannot create multiple instances of 'Ext.event.publisher.Dom'. Use 'Ext.event.publisher.Dom.instance' to retrieve the singleton instance.


Any ideas?






ERRORS after build!

Bindable triggers

Hello!

Is there a way to make triggers (Ext.form.trigger.Trigger) bindable.

I tried to override the Ext.form.trigger.Trigger class by adding to the the original mixins array, the Ext.mixin.Bindable mixin. But it doesn't work. Am I doing something wrong?


Thanks in advance..







Bindable triggers

Issue with Post: Model have one to many association.

Models

1. User Model


Code:



Ext.define('UserApp.model.User', { extend: 'Ext.data.Model',


requires: [
'Ext.data.field.Integer'
],
uses: [
'UserApp.model.Phone'
],


idProperty: 'Id',


fields: [
{
type: 'int',
name: 'Id'
},
{
name: 'Name'
},
{
name: 'Email'
},
{
type: 'int',
name: 'Age'
},
{
name: 'Phone',
reference: 'UserApp.model.Phone'
}
]
});

2. Phone Model


Code:



Ext.define('UserApp.model.Address', {
extend: 'Ext.data.Model',


requires: [
'Ext.data.field.Integer'
],


idProperty: 'Id',


fields: [
{
type: 'int',
name: 'Id'
},
{
name: 'Address1'
},
{
name: 'Address2'
}
]
});

On Save Button Click


Code:



var user = this.getViewModel().get('VMObj.User');
var Address = this.getViewModel().get('VMObj.Address');


var modelUser = Ext.create('UserApp.model.User');
modelUser.set(user);
modelUser.set('Address', Address);


var store = Ext.getStore('PhoneStore');
var array = Ext.Array.pluck(store.data.items, 'data');
modelUser.set('Phone',array);


var userStor = Ext.getStore('UserJsonStore');
userStor.insert(0, modelUser);
userStor.sync();

Chrome capture post header like


  • Age: 12

  • Email: "test"

  • Id: "UserApp.model.User-1"

  • Name: "test"

  • Phone: [{Id: "UserApp.model.Phone-3", PhoneNumber: "123", id: "126"},…]

    • 0: {Id: "UserApp.model.Phone-3", PhoneNumber: "123", id: "126"}

    • 1: {Id: "UserApp.model.Phone-2", PhoneNumber: "65413", id: "125"}

    • 2: {Id: "UserApp.model.Phone-1", PhoneNumber: "123456", id: "124"}




But on asp web api post method it shows only Age, Email and Name but Phone.Count() = 0



Issue with Post: Model have one to many association.

jeudi 25 décembre 2014

Functionality to cfgrid toolbar

[unable to retrieve full-text content]Hi, Can i know how to invoke pageData method to get the details of grid when overwriting cfgrid toolbar? Pankaj Kumar M



Functionality to cfgrid toolbar

set the background color of a row in grid when mouseover and select a row

Hello,

I have a grid and set the background color for a row when mouseover or select. I made it by set the viewConfig like this:


viewConfig: {

selectedItemCls: 'my-row-selected-color',

overItemCls: 'my-row-over-color'

}


it works fine but I find a problem: when mouseover a row and mousedown the row is still in mouseover effect. only after the mouse leave the row then it shows the selected effect.


How can i remove the mouseover effect when press a row(but the mouse is still on the row)?


Thanks for any answer in advance.






set the background color of a row in grid when mouseover and select a row