Archive for June, 2011

Again big pain to find the solution of this one. I was trying to create a MultiSelect declaratively, and the problem was I had to populate it programmatically.

Well it appears it isn’t as bad as it looks as long as you know that dojo data doesn’t apply to multiSelect. So the only thing you need is to add html options inside your widget. Mmmm

So the solution looks like that :
(removing divs because wordpress won't show them...)
div dojoType="dijit.form.MultiSelect" dojoAttachPoint="List"


And the code looks like this :

// Add each of the items
dojo.forEach(items, function(item){
var c = dojo.doc.createElement(‘option’);
c.innerHTML = item.Name;
c.value = item.Value;
}, this);

Simple no ?

I forget about this all the time… I mean I spend times and times again trying to figure out solutions of problems I already solved. Baaahhh that sucks. I really need to get organized !

Well I guess it’s the reason why I got this blog online at the first place. Well today’s a simple problem I spend another 10 minutes trying to find out how to solve: how to enable/disable a button, or an object in javascript :

Here’s the code : this.CommentMsgBox.setAttribute(‘disabled’, false);

Well if anyone has a solution for organiszing that kind of problems/solutions I’m in guys !

I recently came to use netbeans (I used zend studio before) ; I have to say it’s better than zend studio but it really lacks quick access to code snippets. At least I haven’t found out where and how to add them (sucks…).

Welcome PEM !

Hey guys, PEM is building his blog @ with great dojo stuff !

Leave him a few cool comments !!