Category: Dojo

Generating optimized JavaScript Source Code using Dojo’s Build System 0

Generating optimized JavaScript Source Code using Dojo’s Build System

The Dojo Toolkit represents one of the most powerful and feature-rich JavaScript libraries to-date. Apart from its core functionality such as DOM manipulation (i.e. Dojo namespace) it provides developers with a vast range of...

Verbinden von JSON Objekten mittels DojoMerging JSON objects using Dojo 0

Verbinden von JSON Objekten mittels DojoMerging JSON objects using Dojo

A simple way to merge JSON objects is to use dojo.mixin(): The above code will result in {foo:”bar”, bar:”foo”}.

html is null” error using set(‘value’) for dijit.Editor 0

html is null” error using set(‘value’) for dijit.Editor

Be aware of the fact the using editorDijit.set(‘value’, null) will result in an error (“html is null”) rather than setting an empty value. I’ve experienced this behavior when trying to update a dijit.Editor using...

Scrollbar in dijit.layout.ContentPane aktivierenActivate scrollbar in dijit.layout.ContentPane 1

Scrollbar in dijit.layout.ContentPane aktivierenActivate scrollbar in dijit.layout.ContentPane

It seems that if dijit.layout.ContentPanes are nested inside other containers, such as dijit.layout.BorderContainer they do not automatically display the scrollbar when content overflows their visible area. In order to force a scrollbar simply specifiy...

dojo.dnd Elemente programmatisch zwischen Containern verschiebenProgrammatically move dojo.dnd items between containers 0

dojo.dnd Elemente programmatisch zwischen Containern verschiebenProgrammatically move dojo.dnd items between containers

In order to programmatically move dojo.dnd items (dojo.dnd.Item) between containers (dojo.dnd.Container) you only need to insert existing nodes from the source container into the target container, delete any moved nodes from the source container...

dijit.form.Button versteckenHide dijit.form.Button 2

dijit.form.Button versteckenHide dijit.form.Button

In order to hide dijit.form.Buttons (and other dijits for that matter) you need to access the dijit’s DOM element and set the CSS styles visibility and display correspondingly, like so:

Filter dijits using dojo.query 0

Filter dijits using dojo.query

Yesterday I struggled to find a way to filter all dijits in a root container (in my case a simple <div>) to toggle their enabled/disabled state. The approach I was using before looked like...