Synchronizing Sencha Architect and Sencha’s CMD Compiler

image.png

Phil Strong has an excellent article on how to update an existing Sencha Architect (SA) project so that it will work with Sencha’s CMD compiler.  Basically, the problem is that SA and CMD do not agree on where the app.js should be by default.  This article will give you a recipe to do a file/save as from SA and then turn that new directory with the SA project into a place where you can, from the command prompt say: “sencha app build production” or “sencha app build testing” to generate a completely optimized version of your web app for deployment. For those that don’t know what either is, Sencha Architect is an awesome tool that Sencha started working on literally 4 years ago and finally released about a year ago.  It’s a beautiful tool … Continue Reading

Using ExtJS with WebAPI CheckBoxList Setting Defaults Correctly

image.png

Often, we found ourselves creating lists of checkboxes with Sencha’s ExtJS and we want to call Microsoft’s WebAPI in Visual Studio.  ExtJS by default wants to send form values on and off and WebAPI expects booleans which are true and false.  You can override this in the ExtJS 4.2.1 checkbox control by setting inputValue: ‘true’ and uncheckedValue: ‘false’ on every checkbox, or, you can take advantage of the “defaults” parameter in the checkboxgroup and then you do not have to do it on each checkbox.  Here is what are checkbox group looks like rendered. The code to generate it is below (notice the default: attribute in the JavaScript) { xtype: 'checkboxgroup', border: 1, defaults: { inputValue: 'true', … Continue Reading

Working With Radio Buttons In Sencha Touch Form Panels

image.png

  Background For some reason, radio buttons always seem to be tricky no matter what technology I’m using.  What I plan to show here is how to work with Radio Buttons in a Sencha Touch (2.2.1) form, how to default the value you want, and how to read the value a user sets.  Just to bring this into perspective, I’m currently building our mobile web application for our upcoming Silicon Valley Code Camp October 5th and 6th.  We want the attendees to able to select a session, then state whether they plan on attending or are just interested.  The problem is we need to show what their previous intention was when the form comes up so we need to bring up the radio button group, then set the current value.  Here is what … Continue Reading

Display Load Mask (Waiting…) with Sencha Touch on Ajax Call

  One of the nice features of using Sencha Touch (and ExtJS for that matter) lists (Ext.dataview.List) is that you can simply set the parameter masked to true and when the store retrieves data, a nice “loading” make appears letting your user know that something is happening and the browser is just not frozen while we wait for data. (example follows): Ext.create('Ext.List', { fullscreen: true, itemTpl: '{title}', store: 'mystore', masked: { xtype: 'loadmask',message: 'loading' }}); If you want to get data using Sencha Touch and the Ext.Ajax method, you don’t get this nice masked option so you have to do it yourself. The strategy is basically this: Create a task that will put up a load mask when the task … Continue Reading

Follow

Get every new post delivered to your Inbox

Join other followers: