Friday, May 4, 2012

Mysql 5 : Installation in Windows 7 - Error 1067 El proceso ha terminado de forma inesperada MySQL

If you try to install mysql 5 in windows 7 and you get the following error

"Error 1067 El proceso ha terminado de forma inesperada MySQL"

Search and delete the files "ib_logfile0" and "ib_logfile1" in the installation directory ( usuarlly "C:\Program Files (x86)\MySQL\MySQL Server 5.0\data")

Reference:

Monday, April 23, 2012

JQuery: parse json text to json Object


var obj = jQuery.parseJSON('{"name":"John"}');
alert( obj.name === "John" );


Reference:
http://api.jquery.com/jQuery.parseJSON/

GSON: map to json string simple example


import com.google.gson.Gson;
...
...
Map<String,Object> modelMap = new HashMap<String,Object>();
modelMap.put("message", "welcome");
modelMap.put("success", false);
modelMap.put("data", new Object());                                    


Gson gson = new Gson();
String jsonOutput = gson.toJson(modelMap); // {"message":"welcome","data":{},"success":false}


Resources:
http://blog.pontt.com/json-con-java/introduccion-java-y-json-primera-parte-con-ejemplo/
http://code.google.com/p/google-gson/

Friday, April 20, 2012

ExtJS4: get values from ExtJS form

Use the form.getValues() Method:

var  myFormPanelObj  = Ext.getCmp("myFormPanelId");
var data  =   myFormPanelObj.getForm().getValues();  
console.log("data: " + Ext.JSON.encode(data)); // {field1name : "field1value" , field2name : "field2value"}

References:
http://www.sencha.com/forum/showthread.php?62958-ExtJs-Jquery-form-submit

Thursday, April 19, 2012

Spring 3.0 - Ajax Handling Example

Finally I found a Simple and Fully functional sample of a proyect ussing the spring framework and the Ajax Technology. It's a Netbeans Project. There is the explained code and you can download the project sources.

http://cmop17.wordpress.com/2010/12/17/spring-usando-ajax-con-jquery-post-and-get/


Wednesday, March 14, 2012

ExtJS 4: Uncaught Ext.Error: Ext.Loader is not enabled, so dependencies cannot be resolved dynamically. Missing required class:

if you get the error:

Uncaught Ext.Error: Ext.Loader is not enabled, so dependencies cannot be resolved dynamically. Missing required class: SIBismark.view.Viewport


Add the following line at the beginning of your js file

Ext.Loader.setConfig({enabled:true});


In Example in the app.js :



Ext.Loader.setConfig({enabled:true});
Ext.application({
    name: 'SI'
    ,requires:['SI.view.Viewport']
    ,autoCreateViewport: true
    ,launch: function() {        
        // This is fired as soon as the page is ready
    }
}); 


Reference:
http://www.sencha.com/learn/architecting-your-app-in-ext-js-4-part-3/