extjs

ExtJS 5: confusion with persisting changes to view model/form record

馋奶兔 提交于 2019-12-23 03:13:18
问题 I've been having a little trouble figuring out the best approach for this problem... should I use a form with a loaded record (gives me easy access to validation on each field), or should I let binding do all of the work (can leverage the ViewModel more). I haven't been able to decide, so currently, I'm utilizing both... I'm setting a viewModel record AND loading my form with the same record. I really don't like this approach, but it's getting the job done. That's besides the point of this

Button click in Android app using Sencha Touch 2 running fine on emulator but not working on Android Device

霸气de小男生 提交于 2019-12-23 02:58:09
问题 Button click in Android app using Sencha Touch 2 running fine on emulator but create problem on Android Device. When I am click on button in emulator it shows correct alert message but when I am clicking on button in Device it shows nothing. It doesn't go inside if case. My code for button is as follows:- { xtype: 'button', text: 'Save', handler: function(){ val3 = Ext.getCmp('na').getValue(); console.log(val3); val = Ext.getCmp('ea').getValue(); console.log(val); val4 = val.indexOf("@");

How to attach an On Click event for Icon In Ext.js

允我心安 提交于 2019-12-23 02:39:31
问题 I Have an Ext.js Container with an header , header contains a text as its title and an icon . Used to refresh the tab . How can i get icon click event for that container header ? Ive used icon: '@Url.Content("~/Images/icon-supp.png")', for getting the icon next to the text. Here is my code: 'TabChange' also activates only when tab is changed and not while clicked on icon. More information : I have an center container . Im adding an Ext.tab.Panel to it , which has items: [ { xtype: 'container'

How to create a field class containing an image in Ext JS 4?

对着背影说爱祢 提交于 2019-12-23 02:29:55
问题 i'm creating an application in Ext JS 4 and i'm stuck because i need a class containing an image to use into a form or a fieldset (like a regular textfield ); moreover the image will change depending on the value passed to the form. Something like an imagefield : Ext.define('Properties', { extend : 'Ext.form.Panel', alias : 'properties', bodyPadding: 5, // The fields defaultType: 'textfield', items: [{ fieldLabel: 'Device Name', name: 'deviceName' }, { xtype:'imagefield', fieldLabel: 'Status'

change border color of text field in ExtJS

天大地大妈咪最大 提交于 2019-12-23 01:52:32
问题 I am trying to validate a textfiled value on ajax request call. and I want to turn the color of the border of text field as green if the value is valid. I tried doing so by calling Ext.getCmp('loginid').style = 'valid-text'; and also I tried Ext.getCmp('loginid').filedClass = 'valid-text'; where valid-text has the code: <style> .valid-text{ background-color:#bbb; border-color:#008B00; } </style> I dont understand why it is not taking this class. Could anyone please help. Thanks in advance!

ViewModel bind record phantom

蹲街弑〆低调 提交于 2019-12-23 01:46:35
问题 I want to hide a checkbox depending on wheter a record is phantom. Trying to implement this using viewmodels, but it doesn't seem to work. See below for the related code. I've left out unrelated code for brevity. The binding of the viewModel to the view is working as expected. When I try to bind activeRecord.name to the title attribute 2-way data binding is working correctly. Viewmodel Ext.define('MyApp.view.content.ContentViewModel', { extend: 'Ext.app.ViewModel', alias: 'viewmodel.content',

ExtJS 4 - How to download a file using Ajax?

半世苍凉 提交于 2019-12-22 18:44:26
问题 I have a form with various textfields and two buttons - Export to Excel and Export to CSV. The user can provide the values to different fields in the form and click one of the buttons. Expected behaviour is that an Ajax request should be fired carrying the values of fields as parameters and the chosen file (Excel/CSV as per the button click) should get downloaded (I am not submitting the form as there needs to be done some processing at the values before submit). I have been using the

Is it a good idea to combine an Ajax/UI JS Framework (ext,jquery-ui) with an MVC PHP framework (zend, symfony)?

喜你入骨 提交于 2019-12-22 18:41:34
问题 I realize this is a very generic question, but I guess I'm not really looking for a definitive answer. Being new to PHP frameworks I'm having a hard time getting my head around it. Javascript frameworks, especially with UI extensions, seem to have their sort-of MVC-like approach by separating your JS code from your design. It just seems like it would get confusing to use an additional MVC framework on the backend. Is this commonly done for primarily AJAX-driven applications? Is there an

Extjs - how can I add subtotal/summary for each Grid Grouping row?

耗尽温柔 提交于 2019-12-22 18:19:34
问题 Using an ExtJS 3.4 grid, how can I achieve the neat sub-total row under every Grouped section as in the following example: http://dev.sencha.com/playpen/gxt/totals/ I'm unable to upgrade as 3.4 is the version used by the CMS I use (MODX). 回答1: Never mind, the same example is given for 3.4: http://dev.sencha.com/deploy/ext-3.4.0/examples/grid/totals.html 来源: https://stackoverflow.com/questions/10908120/extjs-how-can-i-add-subtotal-summary-for-each-grid-grouping-row

Integrating Ext.grid.panel validation and Ext.data.Model.validations

随声附和 提交于 2019-12-22 18:08:34
问题 I've been learning ExtJS4 after having done quite a bit of dev in ExtJS3. I'm quite intrigued by the new class Ext.data.Models, but I would love to integrate these validations with the validation function in Ext.grid.Panel. Can anyone point me in the direction of any examples of using the validations property of Ext.data.Model in a Grid panel? I've tried adding the validations to the model and putting invalid values in the grid, but it doesn't seem to throw an errors or the normal red lines.