sencha-touch-2

ActiveItemChange and Dataview.Dataview display

不羁岁月 提交于 2019-12-13 04:52:26
问题 Here is my SubView I am reworking my UI. At first my back button was a real button in my titlebar. The logic of this button worked perfectly and was MVCed. Now I have linked my tab to send the proper signal to the controller. The controller does receive and navigate threw my Tree structure correctly. The problem is that the Dataview.dataview in the Project Tab is not displaying properly after a tap on the back button. Here is my code onSubviewActiveItemChange: function(container, value,

Creating a 2x2 Button Grid with Centered Buttons?

我怕爱的太早我们不能终老 提交于 2019-12-13 04:45:16
问题 I have a 2x2 button grid. Now I'd like to shrink the buttons to 200x200, place each in a container as a space place holder, then center each button in its respective container. In my image, I've only shrunk the two top buttons so you can see the spacing on the page. How can I go from the first image to the second image, which was Photoshop'ed? The goal: (actually, all 4 centered buttons is the goal) File: app.js Ext.application({ launch: function() { var view = Ext.create('Ext.Container', {

Getting Cookies in Sencha touch 2.0 using Ajax request

天涯浪子 提交于 2019-12-13 04:43:30
问题 I'm developing a web mobile project using Sencha touch 2.0 I made an ajax request as follows: Ext.Ajax.request({ url: myUrl, params: { format: 'xml', callback: 'success' }, method :'POST', xmlData :MyXMLData proxy:{ type: 'ajax', reader:{ type: 'xml', rootProperty:'ns2:user' } }, On the server-side I have the following headers set: header("Access-Control-Allow-Origin: *"); The server returns an XML response and cookies By using Chrome's debugging tools I can see that various Set-Cookie

Sencha Touch - How to pass value in controller to store in view?

只愿长相守 提交于 2019-12-13 04:35:29
问题 I use store filter to search category apps.Value to search apps category is from controller.But I'don't know to pass value from controller to view for use store filter in view.Looks my code: This my controller : Ext.define('Catalog.controller.Main', { extend: 'Ext.app.Controller', config: { refs: { homepanel: 'homepanel', but: 'homepanel #category', categoryButton: 'button[action=Categories]', list:'list', homepanellist: 'homepanel #Applist', navigationlist: 'navigation #Catlist', navigation:

Sencha touch 2: Sorting / Grouping automatically fire when update data in store

馋奶兔 提交于 2019-12-13 04:32:27
问题 I have a model as following: Ext.define('MyProject.model.Contact', { extend: 'Ext.data.Model', config: { fields: [ { name: 'ID' }, { name: 'Image' }, { name: 'Name' }, { name: 'IsSelected' } ] } }); I have a store use this model.This store has a group function as below: groupFn: function(item) { if (item.get('Name')) { return item.get('Name')[0].toUpperCase(); } else { return ' '; } } I show this store in a listview, the template of listview as below: <img src="{Image}" height="45" width="45"

Sencha touch2: How can i parse my nested json data?

拥有回忆 提交于 2019-12-13 04:29:49
问题 i could not able to parse my nested json data and i tried in many ways but i could not succeed. any help is appreciated. Here is my json output looks like: [ { "task": { "locator": "FGWESD", "subtask": [ { "work": { "number": "1145", "id": "0", "status": true, "gate": "N\/A", }, "sequenceNumber": "0", "id": "0" }, { "work": { "number": "1145", "id": "0", "status": true, "gate": "N\/A", }, "sequenceNumber": "0", "id": "0" } ], "connectTime": "0", "id": "0" } } ] Here is my model: Ext.define(

Generating Sencha Touch 2 app nullpointer error

痴心易碎 提交于 2019-12-13 03:23:21
问题 I'm trying to generate a new app using the following: root@li184-76:/var/www/touch-2.3.1# sencha generate app NewApp ../newapp However, I get the following: Sencha Cmd v4.0.1.4 [INF] Workspace does not have framework touch at /var/www ... copying [ERR] java.lang.NullPointerException at com.sencha.util.Version.<init>(Version.java:36) at com.sencha.command.generator.GeneratorCommands$WorkspaceCommand.getParameters(GeneratorCommands.java:130) at com.sencha.command.BasePluginCommands

Sencha Touch 2: belongsTo association callback usage?

百般思念 提交于 2019-12-13 02:11:31
问题 I call a belongsTo assocation generated getter function: token.getUser({ callback: function(user, operation) { console.info('getUser callback'); Ext.Viewport.unmask(); console.dir(operation); }, failure: function(user, operation) { console.info('getUser failure'); }, success: function(user) { console.info('getUser success'); } }); My console shows the following: getUser success Auth.js:74 getUser failure Auth.js:69 getUser callback Auth.js:64 undefined Can someone please enlighten me how this

Search for CSS(Sencha Touch) tutorials

倾然丶 夕夏残阳落幕 提交于 2019-12-13 01:23:16
问题 I want to change the layout of my app. I want use my own buttons and change background color. Can someone post some useful tutorials. I'm not so good in css thanks for help 回答1: My only advice is for you to use Firebug if you want to customize you app. Set cls attributes to your components, launch the app on a Firefox/Chrome/Safari and then just right click on the HTML element you want to customize and take a look at the CSS set for the element. Then, it's all about CSS writing. 回答2: Either

What is the purpose of classnames in angle brackets in definitions?

耗尽温柔 提交于 2019-12-12 23:51:50
问题 In another question here on Stack Overflow (this one) I have seen this piece of code: Ext.define("App.view.leaders.MyViewName", { extend: 'App.view.basePopup', xtype: 'MyViewName', config: <Ext.form.IPanel>{ scrollable: 'vertical', items: [ { xtype: 'fieldset', title: 'Add New Auto Asset', instructions: '<hr class="separate" />', items: [ <Ext.field.ISelect>{ xtype: 'selectfield', label: 'Borrower Position', store: 'BorrowerPositionSelectorStore', }, <Ext.field.ISelect>{ xtype: 'selectfield',