Harry Devine | 26 Jul 15:19 2016
Picon
Picon

Observable not updating data store

I have a dGrid that is getting its data from a URL passed to RequestMemory and wrapped in Observable as follows:

store = new Observable(new RequestMemory({url: "getData.php",
   getChildren: function(parent, options) {
     return this.query({parent:parent.id}, options);
   },
   mayHaveChildren: function(parent) {
     return parent.hasChildren == true;
   }
}));

I handle the dgrid-datachange event and use request.post to update my database on the back end.  However, it appears like the store in memory is NOT updated and I can't seem to figure out how to update it.  The grid has the updated value, but if I print the value of the store for that item, its the original value.  I was under the impression that Observable would automatically update the store.  What am I missing to make this happen?

Thanks,
Harry
--

-- 
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

Dojo-interest <at> mail.dojotoolkit.org
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
gstowe | 21 Jul 21:19 2016
Gravatar

Is there any way to cancel an in-progress HTML5 upload?


I have a file uploader in my project that handles very large files. Lots of
times the users will want to cancel an upload. There does not appear to be
any way to make the browser cancel the XHR that is posting the file or
files. Consequently, even though the user may close the upload dialog and
navigate elsewhere in the app, progress and complete events fire much later
and the upload actually completes. Presumably there must be an XHR object
embedded in the uploader somewhere that I could call abort on, but I see
nothing in the API docs, or in a console dump of the uploader object. Is
cancelling an upload possible?

--
View this message in context: http://dojo-toolkit.33424.n3.nabble.com/Is-there-any-way-to-cancel-an-in-progress-HTML5-upload-tp4006972.html
Sent from the Dojo Toolkit mailing list archive at Nabble.com.
--

-- 
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

Dojo-interest <at> mail.dojotoolkit.org
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest

Jonathan Vukadinovic | 21 Jul 20:16 2016
Picon

dojo question

Hi!

 

I work at Teranet and we have an application that uses the dojo toolkit and I have an issue. Our application uses Arcgis javascript API for map services which in turn uses dojo framework which is version 1.10.4. We use the _Template.js module found in the dijit package in one of your modules and we get the following errors when the map is loaded in French:

 

TypeError: k(...) is undefined

Error: custom.MapContainer: parser returned unfilled promise (probably waiting for module auto-load), unsupported by _WidgetsInTemplateMixin. Must pre-load all supporting widgets before instantiation.

 

 

So interestingly, we can load the map in English no problems (we don’t get the error above), but there seems to be some sort of loading issue with the widgets when I try to load the map in French.

 

We are upgrading our application to use the dojo toolkit 1.10.4 version, because we were using 1.9.1 which is going out of support. For the same scenario, loading the map in French the 1.9.1 dojo version has no issues.

 

Do you have any idea why this is happening?

 

*** Note: I already contacted ESRI about the issue and they had no answer. This isn’t an Arcgis issue since it’s failing because of the _Template.js which comes from the dojo toolkit.

 

Thanks!

 

Jonathan Vukadinovic

Application Developer, CSP

Systems & Development

 

Teranet Inc.
123 Front Street West, Suite 700
Toronto, ON M5J 2M2
(416) 360-8863 x 2323

Cell: (416) 553-0439

Email: jonathan.vukadinovic <at> teranet.ca

Website:  www.teranet.ca

 

Flex is obselete

 

The information in this e-mail is confidential and may be legally privileged. It is intended solely for the addressee. Access to this e-mail by anyone else is unauthorized. 
If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful.

 

--

-- 
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

Dojo-interest <at> mail.dojotoolkit.org
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
George Sexton | 19 Jul 23:15 2016

Get Reference To Store

I have some code:


<div data-dojo-type="dojo/store/Memory" data-dojo-id="typeStore" data-dojo-props="data: [ a set of data]"></div>

later in the scripting, I'm trying to get a reference to the store.

E.G.

var store=dojo.byId('typeStore');

or

var store=dom.byId('typeStore');

The result of the byId() methods is null. I was using a reference from a dijit/form/Select, but the problem is that the query parameter in the select's data-dojo-props affects the underlying store.

Any ideas would be appreciated.

--
George Sexton
MH Software, Inc.
Voice: 303 438 9585
http://www.connectdaily.com
--

-- 
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

Dojo-interest <at> mail.dojotoolkit.org
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
Harry Devine | 12 Jul 17:18 2016
Picon
Picon

Refreshing a grid with a RequestMemory store

My dGrid has data fed by a RequestMemory store wrapped in Observable like this:

store = new Observable(new RequestMemory({url: "getData.php",
  getChildren: function(parent, options) {
    return this.query({parent: parent.id}, options);
  },
  mayHaveChildren: function(parent) {
    return parent.hasChildren == true;
  }
}));


When I add or remove items from the store using store.add(...) or store.remove(id), I call grid.refresh.  However, the grid does NOT refresh.  I have to physically refresh the page to have the grid changes reflected.  How do I get the grid to refresh and show the updates?


Thanks,

Harry

--

-- 
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

Dojo-interest <at> mail.dojotoolkit.org
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
Harry Devine | 12 Jul 15:38 2016
Picon
Picon

Creating 2 seperate menus on a dGrid tree

I have a dGrid using the Tree mixin.  I'm on version 0.3.16 currently.  I can create a menu by listening for the .dgrid-row:contextmenu event and display the menu.  However, I would like to have 1 menu displayed when the user clicks on a parent node of the tree, and a separate menu displayed on a child node click.  I'm not sure how to accomplish this.  Here's how I'm making the menu currently:

var activeItem;


grid.on(".dgrid-row:contextmenu", function(evt){
  evt.preventDefault(); // prevent default browser context menu
  row = grid.row(evt);
  mod.activeItem = row && row.data;
  });


var menu = new Menu({
  targetNodeIds: [grid.domNode]
});


menu.addChild(new MenuItem({
  label: "Remove",
  iconClass: "delete",
  onClick: function() {
  if (mod.activeItem) {
      console.log("Clicked on ", mod.activeItem);
    }
  } 
}));


Any thoughts?


Thanks,

Harry

--

-- 
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

Dojo-interest <at> mail.dojotoolkit.org
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
Harry Devine | 6 Jul 20:10 2016
Picon
Picon

Editor in a dgrid tree

I have a dgrid with the tree mix-in.  In the grid, I want to make an editor where it shows a ComboBox on a certain column.  However, I only want the ComboBox to show up for a child element and not for the parent.  The parent should still expand as it always has.  I am capturing the .dgrid-content .dgrid-row:dblclick event, but I'm not sure how to tell the editor mix-in's canEdit function to only work for the child elements.  Any ideas?  Here's how I'm handling my grid currently:

        grid = new Grid({
          id: "Grid",
          columns: [
            tree({label: "Fac ID", field:"site"}),
                 {label: "City", field:"city"},
                 editor({label: "State", field:"state", canEdit:function() {return userCanEdit;}, editorArgs: {store:stateStore, style:"width:95px", labelAttr:"displaystate", searchAttr:"state"}}, ComboBox, "dblclick"),
          ],
          store: store,
          sort: [{attribute: "facid", descending:true}],
          query: {"type":"site"},
          rowsPerPage: 50,
          loadingMessage: "Retrieving data...",
          noDataMessage: "No data found!"
        }, "grid");

        /* Handle the grid double-click event; we don't want to put up a */
        /* ComboBox on a parent-level tree row.                          */
        grid.on(".dgrid-content .dgrid-row:dblclick", function(event) {
          console.log("Row type: ", grid.row(event).data.type);
        });


Thanks,
Harry
--

-- 
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

Dojo-interest <at> mail.dojotoolkit.org
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
Teresa | 1 Jul 01:08 2016
Picon

dgrid extensions not working together (columnReorder and ColumnHider)

Hi there

I am using columnReorder and ColumnHider together for a grid and the re-order is not working.  This is in
dgrid version 1.0.0

Thanks!

--Teresa Underhill
903.356.6097
--

-- 
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

Dojo-interest <at> mail.dojotoolkit.org
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest

Harry Devine | 29 Jun 20:09 2016
Picon
Picon

Question on using Dojo/Deferred

I have a Dojo store that is being created using the following code:

var store = new Observable(new RequestMemory({url: "getData.php"}));

The store is used to populate a Dojo Pie chart.  The issue is that the getData.php file takes some time to run.  The Pie chart does get created but after a few seconds of waiting.  A side effect of this is that I have a Legend I'm trying to build for the chart and that never gets rendered at all.  I suspect because of the asynchronous-ness of the operation to retrieve the data.

I figured I'd wrap the whole process into a Dojo/Deferred and only render that chart and create the legend once the data store has been created as above.  But I can't seem to figure out how to do it.  I've used Deferred before and read the documentation, but it doesn't really cover what I'm trying to do in this case.

So, how would one construct a Dojo/Deferred so that it would make the data store call above, wait for the operation complete, then move on to creating the chart and legend?

Thanks,
Harry
--

-- 
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

Dojo-interest <at> mail.dojotoolkit.org
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
Harry Devine | 28 Jun 19:18 2016
Picon
Picon

Creating a chart that looks like one seen in Cold Fusion

Everyone,

We are converting an application that was written in ColdFusion to work with PHP and Dojo.  I wanted to put an example of what the Cold Fusion chart looks like but it makes the mailing list message larger than 40KB and the message gets rejected.  Let me know if I can attach the  image to an email and post it, or if there is someplace that I can place the image and post a link.

Anyhow, it looks like I can do this by using a 3D Chart, however, I can't seem to be able to find how to use the StoreSeries object to populate the chart.  The data will be coming from a database that I am getting via request.post.  I see that there is a setData method on the 3D chart, but the documentation doesn't really go into if it will accept a data store as the source.

Any ideas?  Thanks,
Harry
--

-- 
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

Dojo-interest <at> mail.dojotoolkit.org
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
FreshSoftware.net | 27 Jun 23:40 2016
Picon

dojo.require set header

I am looking for a work around to defeat a cross-domain policy. Is there a way to set and httpd header inside of dojo.require? Like:

 

dojo.require(["esri.dijit.HomeButton"],function(){

                //Set header similar to: header(“Access-Control-Allow-Origin:”, “ *”);

});


Virus-free. www.avast.com
--

-- 
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

Dojo-interest <at> mail.dojotoolkit.org
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest

Gmane