dojo

How to determine if a column in a datagrid is sorted or not.

I would like to click on the header of a dojo data grid and retrieve information such as if it is sorted and what direction is it sorted in, the column index, and the column name. Has anyone done this. ...

How do I set the width of dijit.form.Select?

I have a programmatically generated dijit.form.Select. Unlike most other widgets, the Selects do not offer a resize method like dijit.resize({w: width, h: height}); I have not found a standardized way of setting the width of a select. This is quite bad because the autosizing makes Dialogs "explode" on long select values. Is there a s...

How do I highlight all invalid dijit.form.ValidationTextBoxes on a dijit.form.Form?

Hi everyone, what I'm after is a form that when submitted, runs a validation check, and highlights all invalid fields and adds the tooltips. I'm effectively looking for something like this: dojo.forEach(dijit.byId('myForm')._invalidWidgets, function (thisWidget,index,array) { thisWidget.displayMessage("normal invalid/empty message ...

reading json with dojo to show in grid

Hi all, I have been struggeling all day to read a json file from server and view it via dojo datagrid. Please see the code snippets below and help me if possible : the html file is :: <head> <link rel="stylesheet" type="text/css" href="../../_static/js/dijit/themes/claro/claro.css" /> <style type="text/css"> bo...

AddSeries parameters

Hi, I try hard to get some functional charts with dojo... I want to create a stacked area chart with 3 lines. For the "bas", "moy" and "haut" as you see in the JSON data. var jStore = {"identifier":"mois", "items":[{"mois":1, "bas":98, "moy":122.5, "haut":147}, {"mois":2, "bas":91, ...

Is there an equivalent of jQuery's add() function in Dojo?

Using jQuery I can do something like this: var x = $('#hello'); x = x.add('#bye'); This way I have both #hello and #bye elements in the query set called x. Is there a similar function in Dojo? ...

Using Dojo BorderContainer in a Zend Framework layout script

I have just started playing around with using Dojo in Zend Framework and things have been fine up until recently. For now, I would like to be able to make a simple GUI using BorderContainer and ContentPanes, however I have been finding this is a bit awkward. Basically to get the container Dojo elements to work, I have found that I need ...

Zend_Dojo_Form in a layout

I have a Zend_Dojo_Form which I have moved from my view (where it works fine) to my layout, as it's something that will be useful on every page. However in the layout the form no longer works - none of the dijit elements appear and it behaves just as a normal HTML form would. Here's the relevant part of my bootstrap: protected functio...

dojo pass URL parameter into AJAX

Hi, I want to take URL parameter and pass to ajax function, var queryParams = dojo.queryToObject(window.location.search.slice(1)); var data = dojo.toJson(queryParams, true); console.log(data); getCategory( data ); ... function getCategory(input){ dojo.xhrGet( { // The following URL must match that used...

Dojo's dojo/method programatically?

Hello, Is there a way to define a dojo/method programatically, in a JavaScript function? (Instead of defining it through script type="dojo/method" within a declarative widget, for example.) Thanks! ...

[dojo] Serialize JSON data

I have written following function that takes json object and returns a serialized json String: function serializeJson(object) { if(isArray(object)) { console.log("This is an array"); return walkThrough(object); } else { console.log("This is an object"); var key, value; var jsonArr = [...

Preventing form submission with Dojo

Hello, I have a Dojo SubmitButton with jsId="saveParamButtonWidget". I overrided its onClick method by putting: saveParamButtonWidget.onClick = editParam I defined the editParam() function like this: function editParam(eventObj) { dojo.stopEvent(eventObj); // ... } dojo.stopEvent() is supposed to stop event bubbling and de...

Dojo PostCreate issue

I have a custom widget which has a content pane (among other things). In it I have a multiselect listbox. I have a assigned a dojoAttachPoint to the listbox. I want to populate the listbox when the widget is created. In postCreate I try to fill the listbox with items, but the reference to this.selectFrom (which is the dojoAttachPoint) ...

Zend_Json_Server and dojo.rpc.JsonService, can a served class return an object?

I am trying to serve up my user repository via zend_json_server. The problem is the service is returning empty objects. What have i missed? server side: $repo = App_User_Repository::getInstance(); $server = new Zend_Json_Server(); $server->setClass($repo); if ('GET' == $_SERVER['REQUEST_METHOD']) { $server->setTarget('/ser...

not getting dijit.Tree dragrestriction to run propperly!

Hi people! I have worked out a tree which I fed with data, for certain elements I'd love to deactivate "drag&drop", which doesn't work and I don't know why. If you have the answer I would kindly thank you. The task is that certain element shouldn't be draggable, if I set subWidgets[0][subWidgets[1]].dragRestriction = true; it is in t...

Creating Google Maps' interface in Dojo

I am trying to use the ArcGIS 2.1 JS API to create a custom interface that looks similar to Google Maps. What is confusing me (particularly with Dojo's layout scheme) is how Google Maps has a map pane that extends the whole width of the page and has a left search results panel that seems to be floating above the map pane. How does this...

Dojo DataGrid - preventing column resize

Hello, Is there a way to set a fixed column size in Dojo DataGrid, and not allow it to be resized by the user? Thanks. ...

Dojo DataGrid - Getting data store item from formatter?

Hello, From what I've seen, the formatter function in Dojo DataGrid is given the following arguments: cell value, cell row number, and the cell object itself. Can you suggest how to obtain data store item to which this cell refers, given these arguments? Or if you can suggest an alternative way, I'd be grateful. ...

Dojo Grid reload data file upon button click

I know there maybe similar questions out there, but I still cannot find the answer. Much appropriate anyone who can help me. There are 5 departments, and each department has 4 products. So I created 5 buttons and 4 tabs, each tab contains a grid. By default the department A is loaded, user can switch tabs to see different products info...

Commenting Objects within Dojo classes with JSDOC toolkit

Hey, I've searched and have found partial answers but none that seem to working - at least as I expect - in my situation. So I am trying to comment http://pastebin.com/eRF0VjmR and running into issues when I try to comment objects. The ones in question are "subscribers", "options", and "fn". As you can see for "fn" (line 756) I am u...