• If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Announcement

Collapse
No announcement yet.

Typeahead example

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Typeahead example

    The example seemed pretty straightforward.
    I made a copy of the HTML and the RPG and customized these so it would work on my own data. This works, but to my astonishment only with the search argument "cname".
    Although i replaced cname with my own search field and cname doesn't exist anymore in the HTML my own field (KLNAM#) is blank in the RPG program.
    Even the firebug post shows cname instead of KLNAM#.

    Can someone please explain what i'm missing here.
    I'm really running blank on this one.

    Code:
    Ext.onReady(function() {
    
    	// type-ahead data store
    	var dsKLNAM# = new Ext.data.JsonStore({
    		autoLoad: false,
    		url: 'vvcall.pgm',
    		root: 'KL001',
    		fields: ['KLNAM#'],
    		listeners:{
    			beforeload:{
    				fn:function(){
    					dsKLNAM#.baseParams={
    						pgm:'excmbtat',
    						action:'getSuggestion',
    						klnam#: Ext.get('KLNAM#').getValue()
    					}
    				}
    			}
    		}
    	});
    	
    	var formMain = new Ext.FormPanel({
    		title: 'Type Ahead Example',
    		labelWidth: 100,
    		frame: true,
    		items: [{
    			xtype: 'combo',
    			fieldLabel: 'Customer Name',
    			id: 'KLNAM#',
    			width: 165,
    			store: dsKLNAM#,
    			displayField: 'KLNAM#',
    			minChars: 0,
    			loadingText: 'Loading...'
    		}]
    	});
    	
    	formMain.render('formMain');
    	
    });
    Attached Files

  • #2
    Solved

    Ok, i feel pretty stupid right now.
    I saw my changes to the HTML were not saved to the iSeries.

    Comment


    • #3
      No problem, happens to the best of us! Happy New Year!

      Comment

      Working...
      X