Opened 9 years ago

Closed 9 years ago

#16646 closed defect (invalid)

Problem with more choices/previous choices when using filtering select with QueryReadStore.

Reported by: Pavneet Singh Gill Owned by: Pavneet Singh Gill
Priority: undecided Milestone: tbd
Component: Dijit - Form Version: 1.8.3
Keywords: Cc:
Blocked By: Blocking:

Description (last modified by bill)

I have been having problems with displaying options in filtering select. I am using QueryReadStore? to fetch the values from the DB. The problem is that values don't appear in the filtering select when we click "more choices" more than 2 times.

The JSP code I am using is :

<td class="tableDetail" colspan="3">
	<div dojoType="" jsId="orderSetStore" url="OrderSets.ajax?action=loadList" requestMethod="get"></div>
	<input dojoType="dijit.form.FilteringSelect" id="orderSetList" name="orderSet" searchAttr="description" autocomplete="false" store="orderSetStore" pageSize="15" style="width: 300px"/>

On debugging the dojo code I have found that in file _SearchMixin.js

there is a condition on line 197:

	options.start += res.length;
	if(options.start >={
		options.count = 0;

This condition makes my options.count = 0 whenever the start variable gets greater than the pageSize specified. This results in values not coming in the list.

The first time the start parameter is 0, second time 15 but after that problem starts occurring.

I commented the part options.count = 0; and more choices starts working fine and I can see all the values.

But then I face another problem which is that when I reach the end of the list and then click previous choices, the number of values is not equal to the pageSize specified in the JSP.

Attachments (1)

MorChoices.jpg (26.3 KB) - added by Pavneet Singh Gill 9 years ago.
Filtering select when the More Choices is clicked third time.

Download all attachments as: .zip

Change History (5)

Changed 9 years ago by Pavneet Singh Gill

Attachment: MorChoices.jpg added

Filtering select when the More Choices is clicked third time.

comment:1 Changed 9 years ago by bill

In [30501]:

remove AMD-loader unfriendly direct <script> tags, and improper use of dojo.provide(), refs #16646 tangentially

comment:2 Changed 9 years ago by bill

Description: modified (diff)
Owner: changed from Douglas Hays to Pavneet Singh Gill
Status: newpending

It works for me, testing on dojox/data/tests/QueryReadStore.html. I remember fixing problems with QueryReadStore in the past. Is this really happening on 1.8.3, as you listed, or an earlier version?

Please attach a test case using the "attach file" button. It should be as small as possible to still reproduce the problem, almost always a single HTML file that we can load in the browser (i.e. not PHP, JSP, etc.)

Then, give exact instructions on how to reproduce the problem using your attached test file.

The test case is necessary both to confirm that there's a bug, and for us to be able to debug the problem.


comment:3 Changed 9 years ago by bill

Description: modified (diff)

comment:4 Changed 9 years ago by trac-o-bot

Resolution: invalid
Status: pendingclosed

Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!

Note: See TracTickets for help on using tickets.