Extjs 4 combobox default value

I had the same problem, afaik has to do with selectlist rendering before the items are added to the store. I tried the callback method mentioned above without any luck (guess it would have to be a callback on the selectlist rather than the store). I added this line after adding items to the store … Read more

Best practice for overriding classes / properties in ExtJS?

For clarification: By real class modification I mean a intended permanent modification/extension of a class, which should always be done by extending a class. But it is not a temporary solution for just a specific problem (bug-fix, etc.). You have at least four options how to override members of (Ext) Classes prototype I guess is … Read more

How to compare null value from the JsonObject in java

Use the following method of JsonObject to check if a value against any key is null public boolean isNull(java.lang.String key) This method is used to check Null against any key or if there is no value for the key. check this in the documentation Your Modified code should be like this if(jsonObject.isNull(“parentId”)) { System.out.println(“inside null”); … Read more

How to display binary data as image – extjs 4

Need to convert it in base64. JS have btoa() function for it. For example: var img = document.createElement(‘img’); img.src=”data:image/jpeg;base64,” + btoa(‘your-binary-data’); document.body.appendChild(img); But i think what your binary data in pastebin is invalid – the jpeg data must be ended on ‘ffd9’. Update: Need to write simple hex to base64 converter: function hexToBase64(str) { return … Read more

to initComponent() or not to initComponent()

If you do not have a deep understanding of how ExtJS class system work, you may want to follow this: Declare all non-primitive types in initComponent(). Terminology Primitive types – strings, booleans, integers, etc. Non-Primitives – arrays & objects. Explanation If the component you extend is to be created more than once, any non-primitive configs … Read more

Explain ExtJS 4 event handling

Let’s start by describing DOM elements’ event handling. DOM node event handling First of all you wouldn’t want to work with DOM node directly. Instead you probably would want to utilize Ext.Element interface. For the purpose of assigning event handlers, Element.addListener and Element.on (these are equivalent) were created. So, for example, if we have html: … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)