-
1 Sep 2010 10:35 PM #1
regarding passing parameters
regarding passing parameters
hi.........
i'am doing search according to the alphabeticals..i placed all the letters on panel toolbar.now i want to send the button text value to the backend file... how can i send..
any one knows the solution help me
-
1 Sep 2010 10:57 PM #2Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- The Netherlands
- Posts
- 24,251
- Vote Rating
- 44
So you want something like:
Code:{ xtype: 'button' text: 'A', handler: function(){ store.load({params: {filter: 'A'}}); } }
-
1 Sep 2010 11:04 PM #3
regarding search
regarding search
i have written a factory function to print alphabets and added togglehandler to it: i want the store to load on click of the particular albhabet, i am not getting the scope of store, how to get it?: i written this function in different file
getLetter = function letters() {
var items = [];
for (var i = 65; i <= 90; i++) {
//
items.push({
text: String.fromCharCode(i),
enableToggle: true,
toggleGroup: 'AZsearch',
toggleHandler: buttonToggleHandler,
scope: this,
}, '', '-', '');
}
for (var i = 49; i <= 57; i++) {
items.push({
text: String.fromCharCode(i),
enableToggle: true,
//store:this.store,
toggleGroup: 'AZsearch',
toggleHandler: buttonToggleHandler,
}, '-', '');
}
return items;
}
buttonToggleHandler = function (button, state) {
if (state == true) {
var abc = button.text;
alert(getStore);
ds.load({
params: {
task: 'alpha_search'
}
});
}
}
I am using it like this: in main front end file
Code:
var alpha_letter=new getLetter();
tbar:{alpha_letter}
-
1 Sep 2010 11:37 PM #4Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- The Netherlands
- Posts
- 24,251
- Vote Rating
- 44
1. It's:
2. Why not simply include 'abc' in the params for the ds.load?Code:var alpha_letter = getLetter(); ... tbar: alpha_letter
-
2 Sep 2010 12:19 AM #5
regarding parameters
regarding parameters
I tried that but ds is not loading because that factory function is in different file
-
2 Sep 2010 12:39 AM #6Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- The Netherlands
- Posts
- 24,251
- Vote Rating
- 44
So the problem is that you don't have access to the store?
Is this the tbar for the grid itself? In that case you could use:
Code:var grid = button.findParentByType('grid'); var ds = grid.getStore();
-
2 Sep 2010 1:01 AM #7
regarding parameter passing
regarding parameter passing
i tried this but it is showing grid is null
-
2 Sep 2010 1:11 AM #8Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- The Netherlands
- Posts
- 24,251
- Vote Rating
- 44
You are currently setting the scope of the button handler to 'this', but you could also set it to a parameter that is passed to the getLetters method.
I assume you know the store when you call getLetters?
-
2 Sep 2010 3:38 AM #9
vg Steffen
--------------------------------------
Release Manager of TYPO3 4.5
energlobe.de - german online magazine
Similar Threads
-
Passing parameters in ArrayStore and C#
By ucoxk in forum Ext 3.x: Help & DiscussionReplies: 1Last Post: 9 Sep 2010, 9:30 PM -
Passing Parameters from One component to another
By sajan in forum Ext 3.x: Help & DiscussionReplies: 0Last Post: 6 Jul 2010, 2:50 AM -
Passing parameters..
By riets003 in forum Ext 3.x: Help & DiscussionReplies: 2Last Post: 13 Sep 2009, 11:24 PM -
passing parameters to a new class
By archmisha in forum Ext 2.x: Help & DiscussionReplies: 4Last Post: 19 Oct 2008, 5:01 PM -
Passing parameters from Ruby to JS.
By akalache in forum Ext 1.x: Help & DiscussionReplies: 5Last Post: 18 Jul 2007, 5:03 AM


Reply With Quote