| 
									
										
										
										
											2011-01-25 11:57:47 -08:00
										 |  |  | /** | 
					
						
							|  |  |  |  * @provides javelin-behavior-differential-populate | 
					
						
							| 
									
										
										
										
											2011-01-25 15:19:06 -08:00
										 |  |  |  * @requires javelin-lib-dev | 
					
						
							| 
									
										
										
										
											2011-01-25 11:57:47 -08:00
										 |  |  |  */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | JX.behavior('differential-populate', function(config) { | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   function onresponse(target, response) { | 
					
						
							|  |  |  |     JX.DOM.replace(JX.$(target), JX.HTML(response)); | 
					
						
							|  |  |  |   } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   for (var k in config.registry) { | 
					
						
							| 
									
										
										
										
											2011-01-31 20:38:13 -08:00
										 |  |  |     new JX.Request(config.uri, JX.bind(null, onresponse, k)) | 
					
						
							| 
									
										
										
										
											2011-01-25 11:57:47 -08:00
										 |  |  |       .setData({ | 
					
						
							| 
									
										
										
										
											2011-01-31 20:38:13 -08:00
										 |  |  |         id: config.registry[k][0], | 
					
						
							| 
									
										
										
										
											2011-02-03 15:41:58 -08:00
										 |  |  |         vs: config.registry[k][1], | 
					
						
							| 
									
										
										
										
											2011-01-25 11:57:47 -08:00
										 |  |  |         whitespace: config.whitespace | 
					
						
							|  |  |  |       }) | 
					
						
							|  |  |  |       .send(); | 
					
						
							|  |  |  |   } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | }); |