extjs4

Add tip text dynamically to a slider

对着背影说爱祢 提交于 2019-12-12 02:06:51
问题 In my project, I am trying to add the tip text (config) dynamically to a slider. How to do that? I need to add it dynamically because I am generating the array of variables in a "Controller", which holds the text for each value of the slider (for tip text). var slider = Ext.getCmp('slider') slider.setTipText(arrayOfVariables) //What should I do here instead? There is no such method like setTipText in docs. What should I use then? EDIT : { xtype:'slider', animate: false, //plugins: [Ext.create

ExtJS 4: Store data not populated with data inside store load callback function

徘徊边缘 提交于 2019-12-12 01:56:13
问题 Why would records.length be set to a number greater than 0, but the store.data.length is equal to 0? I'm basically trying to reference my store inside of the callback, so that my grid has data before I add it to my form. But the store data doesn't exist for some reason. If you have a better way of achieving the same end result, I'm willing to change it to your suggestion. Essentially, each grid is dynamically built based on different filters from the wrapping loop of this code. var p = item

Should I specify the proxy in the Model or the Store?

你。 提交于 2019-12-12 01:53:40
问题 I'm relatively new to cross-platform mobile development, and recently have been going through some basic tutorials on how to use Sencha Touch in my app. I have been confused by what seems to me as inconsistency in their methodology. So here is my question: I am using the MVC design pattern. When defining a proxy for storing data in an app, should I do this in the Model or in the Store? I have seen both done and am not sure which is better, or the cases when each should be used. The following

UnCaught SyntaxError with extjs 4

一笑奈何 提交于 2019-12-12 01:47:15
问题 I have been getting UnCaught SyntaxError : Unexpected Token : . I'm really puzzled where this would come from. When i use the sample json it works http://www.sencha.com/forum/topics-browse-remote.php The issue maybe that i should use httpProxy. But i'm unsure how to incorporate this. Ext.Loader.setConfig({ enabled: true }); Ext.Loader.setPath('Ext.ux', '../ux/'); Ext.require([ 'Ext.grid.*', 'Ext.data.*', 'Ext.util.*', 'Ext.toolbar.Paging', 'Ext.ux.PreviewPlugin', 'Ext.ModelManager', 'Ext.tip

how to scrollToDeltaX gridpanel to the active editor(cellediting)?

放肆的年华 提交于 2019-12-12 01:46:33
问题 i have a gridpanel with cellediting plugin, and with a lot of grid header (at least make the grid shown it horizontal scrollbar)... here is the DEMO... there is a bug in my grid, try to edit one of the collumn, and then press tab key to navigate to header15 .. the grid didn't scroll to where i am editing,... is it a bug?? a have looking for this at their forum, but no luck.. so, how to fix it?? how to make my grid scroll to the active editor?? from docs, there is a method scrollByDeltaX , but

ExtJS 4.2 How to set grid filter height when header text is wrapped?

纵然是瞬间 提交于 2019-12-12 01:38:08
问题 I have a grid with many columns, each of them has a filter, and some of the columns has a long text in the header: I added a css rule to wrap text in the header: .x-column-header-inner .x-column-header-text { white-space: pre-wrap; } In result I got filters with different height: How to make the same height filters? 回答1: I implemented the search filter with your hint. You can find it here. I didn't have your issue with long column labels. They just cut off using an ellipsis like it is the

Saving edited record in a cell editing grid

人走茶凉 提交于 2019-12-12 01:29:14
问题 How can I save the edited record on click of the save button? my code : // create the Data Store var store = Ext.create('Ext.data.Store', { //autoSync: true, autoLoad:true, autoDestroy: true, url: 'update_premise.php', model: 'Plant', proxy: { type: 'ajax', // load remote data using HTTP url: 'getLab.php', // specify a XmlReader (coincides with the XML format of the returned data) reader: { type: 'json' }, writer: { type: 'json' } }, sorters: [{ property: 'lab_name', direction:'ASC' }] });

posting form to iframe with extjs without rendering to bidy

≯℡__Kan透↙ 提交于 2019-12-12 01:07:49
问题 I am trying to post a form to an iframe. my issue is that my form gets posted just fine when I render the iframe to body. But the issue with this is that the container displays at the bottom of the page instead of the place where I want it to show. If I don't use the renderTo property, my form never gets posted to iframe at all. It almost seems like that in the case when I do not use renderTo property, i think my form does not even see the iframe. here is my code thats working for the form

How to use HTML tags in a Chart Legend?

寵の児 提交于 2019-12-12 01:04:02
问题 How can use HTML tags in a chart legend while using title to apply custom legend text? If we apply something like this title:['Your<b>New</b><br />Label'] the tags are just written as plain text. Ext.application({ name: 'Fiddle', launch: function () { var store = Ext.create('Ext.data.JsonStore', { fields: ['name', 'data', 'data2'], data: [{ 'name': 'metric one', 'data': 10, 'data2': 2 }, { 'name': 'metric two', 'data': 27, 'data2': 5 }] }); Ext.create('Ext.chart.Chart', { renderTo: Ext

I want to show node value in extjs 4 line chart

一个人想着一个人 提交于 2019-12-11 23:22:02
问题 When we take mouse on line chart node then it is showing nodes values. Same thing i want to permanently without pointing to node. My complete code is: items:[{ xtype:'displayfield', value:'Avg. Freight Percentage' },{ xtype: 'linechart', store: store30DaysTo180Days, xField: 'days', height:200, yField: 'averageFreightPercentLast', xAxis: new Ext.chart.CategoryAxis({ title: 'In Days', }) }] 回答1: The config label is for this purpose. Try something like: series: [{ type: 'line', axis: 'left',