PDA

View Full Version : Page number field in paging toolbar for grid missing value in the markup



panshr
19 Feb 2014, 4:46 PM
While inspecting page number field for paging toolbar in grid i found that generated mark up is missing value which gets displayed under that field.
I am attaching screen shot where in page number field value is 1 but not able to find same in markup.47979

scottmartin
19 Feb 2014, 5:41 PM
I am unable to see anything on your screenshot.

Perhaps you can explain that the problem is in more detail. Is this will the default setup, or you trying to do something special?
Do you have some code?

panshr
19 Feb 2014, 9:27 PM
I am trying to get value of page field from paging toolbar from generated markup but not able to see whatever value is there in that field.

i.e. suppose if in paging toolbar we put 2 for page number then in generated markup for that input field the value is always 0 not 2.

scottmartin
20 Feb 2014, 5:50 AM
Why not query the component instead:



var grid = Ext.create('Ext.grid.Panel', {

..

dockedItems: [{
xtype: 'pagingtoolbar',
store: store,
dock: 'bottom',
displayInfo: true
}]
});

Ext.create('Ext.Button', {
text: 'Click me',
renderTo: Ext.getBody(),
handler: function() {
var tbar = grid.query('pagingtoolbar')[0], // or grid.getPlugin() if setup as plugin
pval = tbar.query('#inputItem')[0]; // itemId of textbox in items array

console.log(pval.value);
}
});

panshr
20 Feb 2014, 8:00 AM
Thanks for your suggestion but the issue is not for me to unable to get value of input number field but it's with testing team .

Selenium testing team is trying to get value of that field from markup but unable to do so.

panshr
20 Feb 2014, 11:02 AM
is it a bug in library that doesn't generate value of input number field in markup or is there a way to get the value ?