KVR | 1 Jul 13:36 2015
Picon

gridx selected row index

My page consists one Gridx grid and one button control.
When user clicks on button i want to know the selected row index of grid.
Iam calling below function when user clicks on button but not getting any
value

function GetSeleectedRows()
{
 var x=dijit.byId("GridId").select.row.getSelected(); //but  here
getselected returning an empty array
}

--
View this message in context: http://dojo-toolkit.33424.n3.nabble.com/gridx-selected-row-index-tp4006159.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

George Sexton | 30 Jun 20:45 2015

dGrid Issues - Non-Trivial Example

So, I've been working with dgrid. I wanted to create a form similar to a typical desktop invoicing app. It's a really complex page, but it mirrors almost exactly my app. The demo is non-trivial. E.G. it demonstrates adding new line items, putting a select in a grid, calculated column values, right click context menus, and more. If you don't think it sucks totally, I'd be willing to donate this for the demo folder. It's composed of three sections:

grid of invoices
fieldset of invoice details (ship to, bill to, etc)
grid of line items for specific invoice.

You can see the working form at:

https://www.mhsoftware.com/invoices/Invoices.html

general notes:

I'm using dgrid 0.4, dojo 1.10.4, and the current version of dstore. I made a custom layer file but that's the only mod. It wasn't working without the layer file...

Each time you start a new browser session to the site, you get the original data. IOW, the form does serialize back to the back-end, but those changes aren't persisted beyond the session. If you make a fresh request to Invoices.html, it will return a fresh copy of the data that's serialized to the back-end. IOW, you can see how the saves went. If you close your browser and re-open it, you'll get the original data set again.

If you click on an invoice in the grid, it will refresh the field set and the line items grid. Clicking on save, or clicking on a different invoice in the grid will serialize any changes to the back-end.

You can right click on the details grid to add a line item or delete one.

Tests were conducted using the current versions of Chrome and Firefox.

****************************************
* Issues
****************************************
Here are the issues I'm having:

****************************************
* Erratic Editor behavior in quantity.
****************************************
Steps to reproduce

a) Click on an invoice.
b) Click on the quantity field in a line item.
c) Open your browser's debug console.
c) Using your browser's up/down number selection/input widget, increment the value of the field 3-4 times, observing the value.

Observed behavior: The value increases on the first click, but on the 2nd click it decreases. On the 3rd click it assumes the value it should have had after the 2nd click....

Note also in the console log that the data object returned by the row in gridDetails.onchange  becomes corrupted on the 3rd click. It only has a quantity field. IOW, all of the other fields are lost.

Expected behavior. The value should increase consistently.

Similarly, try selecting different values using the "ID" select dropdown widget. Pick a value, change it, and change it again. If you change it 3-4 times, you'll see that the data object only has a product ID field. Also, the behavior of the dropdown is strange.

****************************************
* Edits to product description aren't saved.
****************************************
Steps to Reproduce:

a) select an invoice.
b) Click on the description. E.G. Bacon.
c) Edit the description. For example, change the description to "Bacon, Applewood Smoked".
d) Set a break point around line 184 in InvoiceGrid.js right before the xhr request()
e) Click on the save button.
f) Examine the line items property of the tx variable. Note that the product_desc value is not modified. I'm not understanding why I'm not getting the right value here.

I suppose I must be doing something wrong, but I'm not seeing it. The quantity/cost changes work.

****************************************
* grid.select() doesn't fire.
****************************************

the last bit of code in InvoiceGrid.js attempts to fire off a grid.select() to populate the form. From a UI standpoint, the goal is to make it so the form fields and details grids are populated with the right values on form load.

the grid's registered onselect handler isn't getting called. I think this is because the data isn't loaded so the select fails. I've noticed that if I step through the code in a debugger, the call to grid.select() does work as expected.

The question here appears to be how do I schedule the call to grid.select() when the RequestMemory store is finished loading and bound to the grid?

****************************************

There are some other issues, but I thought I'd try and solve some of the simpler ones first.

I would really appreciate any help, and like I said, I'm happy to donate this whole working example to the demos folder once it's working (if you don't think it sucks).


--
George Sexton
MH Software, Inc.
Voice: 303 438 9585
http://www.mhsoftware.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 | 30 Jun 19:27 2015
Picon
Picon

Issue populating FilteringSelect based on the value of another FilteringSelect

I have a FilteringSelect that, when the value changes, I use request.post to get the data based on the selection for a second FilteringSelect, however, Firebug shows the error "TypeError: item[(intermediate value)] is undefined" in _AutoCompleteMixin.js on line 558.  What I'm doing is creating a memory store with the data I get back from request.post (which is valid as I have printed it using console.log) and setting the 2nd FilteringSelect's store property to this store.  I have tried to update the FilteringSelect control using .reset and .startup, but both give me the error above.

I tried to make a JSFiddle to illustrate the problem but that doesn't work either.  That fiddle, found here: http://jsfiddle.net/s0a4dgj0/1/, gives me Uncaught TypeError: Cannot read property 'get' of null in FilteringSelect.js.uncompressed.js on line 137.

So, 1) how do I fix the JSFiddle issue so I can figure out/illustrate the 1st problem, and 2) how do I update the 2nd FilteringSelect's store to allow it to show the new data I need?

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
cgi | 25 Jun 11:39 2015
Picon

Iterate through dgrid rows to copy values

Hi everyone.

I am using dgrid as a tabular editor. Eventually, the data entered (or
selected) by the user are posted and saved.

I have attached a context (or popup if you will) menu to my dgrid, to make
it easy for the user to copy values horizontally and vertically.

In order to achieve vertical copying, I needed a way to iterate through
rows. Iterating my store (a memory store) was not suitable because the store
doesn't reflect a possible sorting in the grid. Imagine that the user might
sort the grid, right click on a certain cell somewhere in the middle and
choose to copy this value to all cells below it.

So, my only option was to use the selectAll() and selection object of the
grid to iterate through all rows. The selection reflects a possible sorting
and I can copy the value below and when done I perform a save so that
everything is reflected to the store.

As you might imagine by now, this works perfectly with a small number of
rows, but when dealing with let's say 100 rows, the selection object does
not include all rows but only the ones that have been rendered by my
OnDemandGrid. Therefore, I cannot copy the value to all rows below.

I am only asking for one thing. Please suggest me the optimal way, based on
dgrid capabilities, to achieve copying values vertically.

Thank you.

--
View this message in context: http://dojo-toolkit.33424.n3.nabble.com/Iterate-through-dgrid-rows-to-copy-values-tp4006139.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

jwawrzyn | 24 Jun 20:43 2015
Picon

How to force multiple dojo bar charts to align when they have different label lengths?

I'm working on a creating some bar charts with Dojo charting.

We're splitting some data up into multiple bar charts and we need them to
align with the x & y axis, but have found that due to differing labels they
don't always align.

I've tried multiple ways to get them to align without cutting of the labels
to super short to ensure that the labels are always the same size.

Is there any way that I can force them to be the same?

Here's a jsfiddle example of what we're trying to do.

https://jsfiddle.net/fLzdoyw3/1/

The bottom chart has some long labels which pushes the axis over and no
longer aligned with the top one.

--
View this message in context: http://dojo-toolkit.33424.n3.nabble.com/How-to-force-multiple-dojo-bar-charts-to-align-when-they-have-different-label-lengths-tp4006138.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

dba | 24 Jun 17:16 2015

Dgrid Pagination and Sorting failing with Django Rest Framework

I am developing a web application using this stack: MySQL>Django2.7>Django
Rest Framework3.1.2>Dojo1.10> Dgrid0.4.

In the Dgrid, the sorting and pagination are not working properly. I have
gone through all documentation for Dojo and Django Rest Framework to set up
custom stores, custom pagination to suit Dojo/dgrid's needs.

I have posted questions on stackoverflow and that's what helped me get this
far, but I've hit a wall. I tried to ask good questions, but am currently
not permitted to ask any more questions on Stackoverflow for right now. So
I'm trying to get help other ways until I can get back on there. I'm am new
to dojo, django, pretty much all of it, except the MySQL. I'm sure my
inexperience is working against me. I have tried everything I know to do and
everything that has been suggested to me.

Most of the documentation I've read assumes quite a bit and doesn't always
connect the dots so to speak. ANY help would be greatly appreciated.

*Currently I have a grid (not OnDemandGrid) being used with the Pagination
extension. However it is STILL displaying and operating as an OnDemandGrid
with scrolling. Not sure why.

After implementing the custom pagination and other changes to get both of
these to work I keep getting this error: 
TypeError: transform(...) is null*
*return transform(value, key).toString();
instrum...tion.js (line 20)*

*Also in the headers - the Dojo is not sending a request for a range and the
django REST is not sending a content-range header. No matter what I've tried
so far.
*
NOTE: if there is an middleware API that would work a little better in this
stack, I'm open to that as well.

Thanks!

*Here is my code:*

*this is the custom pagination: I've tried both methods - neither work
properly.*

class CustomPagination(pagination.LimitOffsetPagination):
	def get_paginated_response(self, data):
		content_range = 0-9/[]
		headers = {'Content-Range': content_range}
		useRangeHeaders = true,
		return Response(OrderedDict([
			('total', self.count()),
			('next', self.get_next_link()),
			('previous', self.get_previous_link()),
			('item', data),

			]))

'''class ContentRangeHeaderPagination(pagination.PageNumberPagination):
	def get_paginated_response(self, data):
        	total_items = self.page.paginator.count # total no of items in
queryset
        	item_starting_index = self.page.start_index() - 1 # In a page,
indexing starts from 1
        	item_ending_index = self.page.end_index() - 1
        	headers = headers
        	content_range = 'items {0}-{1}/{2}'.format(item_starting_index,
item_ending_index, total_items)      

        	headers = {'Content-Range': content_range} 

        	return Response(data, headers=headers)'''

*The store:*

, function (declare, dom, on, Rest, Request, ColumnResizer, ColumnReorder,
ColumnHider, CellSelection, Pagination, Grid) {
		var store = new
Rest({target:'/api/reports_threadBreakReport/?format=json',
			sortParam: 'ordering', ascendingPrefix:'', descendingPrefix:'-',
            start: 'limit',
            total: 'offset',
            className: 'dgrid-autoheight',
        query: function(query, options) { 
        var results = this.inherited(arguments), 
            total = results.total; 
        var promise = new QueryResults(results.then(function(result) { 
            return result[dataProperty]; 
    })); 
    // Restore total property from original call to new results object 
    promise.total = total; 
    return promise; 
} 

*The Grid:*

		var grid = new (declare([Grid, Pagination, ColumnResizer, ColumnReorder,
CellSelection, ColumnHider])) ({
        collection: store,
        selectionMode: 'single',
        sort: 'id',
        pagingLinks: true,
        pagingTextBox: true,
        firstLastArrows: true,
        minRowsPerPage: 5,
        rowsPerPage: 5,
        sizeSwitch: true,
        pageStepper: true,
        gotoButton: true,
        maxPageStep: 4,
        pageSizeOptions: [5, 10, 15, 25, 50, 100],
    //    idProperty: 'id',

        columns: [
            {field: 'id', label:'ID', resizeable: false},
			{field: 'xxxxx_type', label:'xxxxx Type', resizeable: false,formatter:
xxxxxTypeFormatter},
			{field: 'xxxxx_at', label:'xxxxx Time', resizeable: false},
			{field:'xxxxx', label:'xxxxx', resizeable: false},
			{field:'xxxxx', label:'xxxxx', resizeable: false},
			{field:'xxxxx_info', label:'xxxxx Info', resizeable: false, formatter:
HeadInfoFormatter},
			{field:'hidden', label:'Hidden', resizeable: false},
			{field:'xxxxx_id', label:'xxxxx ID', resizeable: false},
			{field:'xxxxx', label:'xxxxx ID', resizeable: false}
        ]

    }, 'grid');

--
View this message in context: http://dojo-toolkit.33424.n3.nabble.com/Dgrid-Pagination-and-Sorting-failing-with-Django-Rest-Framework-tp4006135.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

KVR | 24 Jun 16:36 2015
Picon

dojox.grid.Datagrid Scrolling Issue

Iam using dojox.grid.Datagrid in Dojo version 1.10.3
I am having problem with Grid Scrolling,Scroll goes up when you try to go to
bottom, so it's so difficult sometimes not possible scroll to the bottom of
page.
Iam using Ie8.

--
View this message in context: http://dojo-toolkit.33424.n3.nabble.com/dojox-grid-Datagrid-Scrolling-Issue-tp4006134.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

eduzea | 22 Jun 23:53 2015
Picon

Gridx with server pagination - client sends GET requests for each {id} in {Table}

Hi, I'm using gridx with JsonRest store to get server side pagination. When I
instantiate the grid, it issues a first GET request like this: 

GET /entityData/MyThing

My server returns the first page of data in the response, with say, 10 rows.
Grid gets populated and shown. But then, apparently gridx starts generating
multiple requests, one for each row in the page:

GET /entityData/MyThing/1
GET /entityData/MyThing/2
GET /entityData/MyThing/3
...

If I change the page size, it makes again all the GET request for each row.
Is this the expected behavior? I would like to send data from the server to
the client in chunks of pageSize for each GET request. Can this be done with
gridx? For reference, here is part of my code:

var jsonRestStore = new JsonRest({
    	target: '/entityData/'+entity_class,
    	sortParam: "sortBy",
    	headers : { "Accept": "application/json" } 
	});

var grid = new Grid({
			cacheClass : asyncCache,
			store : jsonRestStore,
			structure : columns,
			pageSize: 10,
			modules : [..."gridx/modules/Pagination",
"gridx/modules/pagination/PaginationBar"...]
		}, 'gridNode');

Thanks! 

--
View this message in context: http://dojo-toolkit.33424.n3.nabble.com/Gridx-with-server-pagination-client-sends-GET-requests-for-each-id-in-Table-tp4006132.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

chiranjeevibmse | 18 Jun 18:16 2015
Picon

Need help to develop application with Spring and dojo

Hi
i need to develop web application where i need to use DOJO for the UI. with Spring Framework.

For adding any dojo component i need to use the JSF of JSTL so that it is easy to integrate Java code with HTML,

is any framework which i can use.

or suggest me a best approach to do this.

-Thanks
Chiranjeevi

View this message in context: Need help to develop application with Spring and dojo
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
John Daly | 18 Jun 16:09 2015
Picon

dijit/Tooltip


List,

How do I create newlines joining arrays of strings for use with Tooltip
content?

I've tried joining with "<br>"s but that doesn't get it done.

Thanks,

JD
--

-- 
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

dolot | 18 Jun 15:35 2015

Dijit TabContainer not displaying tab

I have a situation where I have a TabContainer with two ContentPanes.  Each
ContentPane has a title which displays on the TabContainer, but there's no
box drawn around the title - all you have is the text.  Now the text will
respond to a click event and switch tabs as expected, but it isn't visual
clear that you're dealing with a set of tabs.

I define the tab control and the tabs as such:

         <div data-dojo-type="dijit/layout/TabContainer" style="width:
auto;" tabstrip="true" class="TabHost" id="TabHost", data-dojo-id="TabHost">
             <div data-dojo-type="dijit/layout/ContentPane" title="Submittal
Form" class="submittalForm">
             </div>

             <div data-dojo-type="dijit/layout/ContentPane" title="Submittal
Drawing" selected="true" class="submittalDrawing">

              </div>
          </div>

and then use the following javascript to draw the tabs:

Does anybody have any ideas as to what I'm doing wrong?  Maybe leaving
something out?

Let me know if you have any questions.

--
View this message in context: http://dojo-toolkit.33424.n3.nabble.com/Dijit-TabContainer-not-displaying-tab-tp4006122.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


Gmane