Ticket #6690 (closed defect: worksforme)
QueryReadStore + ComboBox / FilteringSelect + paging
| Reported by: | guest | Owned by: | haysmark |
|---|---|---|---|
| Priority: | normal | Milestone: | 1.2 |
| Component: | Dijit | Version: | 1.1.0 |
| Severity: | normal | Keywords: | |
| Cc: |
Description
Using the exemple provided at http://archive.dojotoolkit.org/nightly/checkout/dojox/data/tests/QueryReadStore.html
1) Set the page to 10 2) ChangeQueryReadStore?.php to send only 10 results
$allItems = array(
array('name'=>"Alabama", 'label'=>"<img src='images/Alabama.jpg'/>Alabama", 'abbreviation'=>"AL"),
array('name'=>"Alaska", 'label'=>"Alaska", 'abbreviation'=>"AK"),
array('name'=>"American Samoa", 'label'=>"American Samoa", 'abbreviation'=>"AS"),
array('name'=>"Arizona", 'label'=>"Arizona", 'abbreviation'=>"AZ"),
array('name'=>"Arkansas", 'label'=>"Arkansas", 'abbreviation'=>"AR"),
array('name'=>"Armed Forces Europe", 'label'=>"Armed Forces Europe", 'abbreviation'=>"AE"),
array('name'=>"Armed Forces Pacific", 'label'=>"Armed Forces Pacific", 'abbreviation'=>"AP"),
array('name'=>"Armed Forces the Americas", 'label'=>"Armed Forces the Americas", 'abbreviation'=>"AA"),
array('name'=>"California", 'label'=>"California", 'abbreviation'=>"CA"),
array('name'=>"Colorado", 'label'=>"Colorado", 'abbreviation'=>"CO")
);
The comboBox widget and FilteringSelect? widget will display 10 results : Alabama -> Colorado + "More choice" item
But there is no more choices as there is only 10 results !
The problem come from dijit.form._ComboBoxMenu
createOptions:function this.nextButton.style.display=dataObject.count==results.length?"":"none";
This line indicates that "Next" button must be displayed if "retrieved results count" == "pageSize".
But this is not the right test to know if there more elements to display. Only the server-side can determine this.
Ektor.
Attachments
Change History
Note: See
TracTickets for help on using
tickets.