[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Reloading ExtJS panel data

Posted on 2008-06-18
1
Medium Priority
?
28,314 Views
Last Modified: 2012-08-14
Hello

I have a simple page that has two input fields created in PHP/HTML and also an ExtJS Panel.  What I am trying to achieve is the data entered in the two input fields being shown in the ExtJS Panel area dynamically without the page being refreshed.

The input fields are simply "First Name" and "Second Name".  However, when the name fields are populated the data is not appearing in the ExtJS panel.

I believe its because the ExtJS panel has run and I need to find a way to make it reload or become active again so that it can refresh the data store and retrieve the information being sent over.

I have attached a code snippet of the relevant ExtJS panel and dataview window.  Can anyone suggest how to make this refresh once the fields have been populated please.

Thanks
// ExtJS code snippet
 
Ext.onReady(function(){
	
        myData = [
			[finame,sename]
		];
 
        store = new Ext.data.Store({
		        proxy: new Ext.data.MemoryProxy(myData),
		        reader: new Ext.data.ArrayReader({}, [
                       {name: 'firstname'},
                       {name: 'secondname',},
                  ])
        });	
	
		var tpl1 = new Ext.XTemplate(
   		'<tpl for=".">',
   			'<tpl>',
				'<table class="char_select_template" width="100%" cellpadding="0" cellspacing="0" border="0">',
    			'<tr>',
					'<td class="char_select_profile_title">',
						'Name: <br>',
						'Race: <br>',
					'</td>',
					'<td class="char_select_profile_stats">',
						'<b>{firstname} {secondname}</b><br>',
					'</td>',				
				'</tr>',
    			'</table>',
			'</tpl>',
   		'</tpl>', 
    	'<div class="x-clear"></div>'
	);	
	
	charView = new Ext.DataView({
       		id: 'details-panel',
	    	store: store,
        	tpl: tpl1,
        	autoHeight:true,
        	multiSelect: true,
        	overClass:'x-view-over',
	        itemSelector:'div.char_select_template',
    	})	
	
	var panel = new Ext.Panel({
		frame:true,
    	width:'100%',
    	autoHeight:true,
    	layout:'fit',
    	title:'Character Details:',
    	items: charView 
	});
	
	panel.render('character_wizard');
	
    store.load();       // Load the data
 
});

Open in new window

0
Comment
Question by:ParadyneDesigns
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 

Accepted Solution

by:
ParadyneDesigns earned 0 total points
ID: 21831555
I have solved this problem using an update function with a setstore to change the store data being passed to the dataview.  Please can this be closed.
0

Featured Post

Enroll in October's Free Course of the Month

Do you work with and analyze data? Enroll in October's Course of the Month for 7+ hours of SQL training, allowing you to quickly and efficiently store or retrieve data. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

OverviewThis article demonstrates a simple search form using AJAX. The purpose of the article is to demonstrate how to use the same code to render a page and javascript (JQuery) and AJAX to make subsequent calls to refine the results. The princip…
Many old projects have bad code, but the budget doesn't exist to rewrite the codebase. You can update this code to be safer by introducing contemporary input validation, sanitation, and safer database queries.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Suggested Courses

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question