Posts

How to setup GXT 3 examples, samples and demos

Here's how I got the examples that come with GXT 3 working, in six simple steps! 1. Setup a GXT 3 app Setup your Gxt app as shown in the previous post on this blog; Quick Setup for GXT 3 . 2. Add additional jars In addition to the gxt jar there are several other jars that need to be added to the build path; gxt-3.0.0.jar gxt-chart-3.0.0.jar gxt-legacy-3.0.0.jar uibinder-bridge-2.4.0.jar gwt-dev.jar gin-1.5-post-gwt-2.2.jar guice-3.0.jar json-org.jar javax.persistence.jar javax.inject.jar That will fix all of the errors except for 2 in the file Folder.java, (I'm not sure how to fix that one yet, answers on a post card please. I tried using the  javax.persistence.jar from J2EE / Glassfish modules but this didn't fix it for me, so I just had the methods with errors return null ). 3. Import the examples Select the src folder in your project (eclipse), select "file import" navigate to the examples-src folder inside the gxt 3 download and se...

Getting Started: Quick Setup for GXT 3 (includes reset.css link how to)

Image
STEP 1 -> Create a Google Web Application Project project within Eclipse. 1a. Get Ext GWT Download the latest Ext GWT release http://www.sencha.com/products/gxt/download/ (Note: GXT 3.X requires GWT 2.4+.) 1b. Get GWT Running For detailed instructions for getting started with the GWT SDK: https://developers.google.com/web-toolkit/gettingstarted For a quick start guide for the Google Plugin for Eclipse: https://developers.google.com/eclipse/docs/getting_started 1c. Create a User Defined Library Select Windows > Preferences and select Java > Build Path > User Libraries in the preference tree. Click New and type "GXT" into the User library name field. Make sure your new library is selected and click "Add JARs". Navigate to the root folder of the Ext GWT download and add the "gxt.jar" file. Click OK. (Optional; If you prefer seeing jars in the build path rather than a user library, you can just click "Add External JARs...

Resizable JOptionPane Code Snippet

//1 great tip to make JOptionPane resizable //put HierarchyListener on the component that will be used as the message for the JOptionPane myPanel.addHierarchyListener(new HierarchyListener() { public void hierarchyChanged(HierarchyEvent e) { //when the hierarchy changes get the ancestor for the message Window window = SwingUtilities.getWindowAncestor(myPanel); //check to see if the ancestor is an instance of Dialog and isn't resizable if (window instanceof Dialog) { Dialog dialog = (Dialog)window; if (!dialog.isResizable()) { //set resizable to true dialog.setResizable(true); } } } });

Extjs4 First Look Review

A really great resource when migrating to Extjs4, and to anyone new to Extjs in general this would be a great place to start. As a pre-release reviewer of this book I can tell you there's stuff in there at the time of reading wasn't readily available on the web. I recommend this when developing in Extjs4 for newbies as it compact a lot of highly useful information into one place. Get Extjs4 First Look on Amazon

ExtJs Portal Example: adding different sized columns

In the examples section for ExtJs4 there's a portal example. The portal panel where all the content can be shown is made up of a column layout, each column is divide with equal distance. I wanted to change this so I could have one really wide column, and the rest of the space would be diveded up equally between the remaining columns. So using the examples from the ExtJs4 package on my localhost, in the 'portal' directory I changed the HTML file so the classes.js link was commented out and that the script on the same page now includes the line Ext.Loader.setConfig({enabled:true}); This means that it will run the code in the individual files. Then by opening up PortalPanel.js and change the beforeLayout as follows I was able to specify one really large column and which column I want that one to be; // Set columnWidth, and set first and last column classes to allow exact CSS targeting. beforeLayout: function() { var items = this.layout.getLayoutItems(), len = i...

How to: Change Eclipse Console Background Color

Open up a console window in Eclipse, right click the console background and you can edit it from there. You can also change this in the preferences under Run/Debug. Oh, and make sure you have a great day now that your eyes are working just perfectly now! :)

Stop losing you breakpoints when debugging Extjs 4

Stop losing you breakpoints when debugging Extjs 4 even when using dynamic loading with this code snippet; Ext.Loader.setConfig({ enabled : true //enable the dynamic dependency loading feature ,disableCaching : false //Comment this line out when you need to reload your Extjs js files });