	button.isEnabled = this._isEnabled;
				}
				for each(var field:String in DEFAULT_BUTTON_FIELDS)
				{
					if(item.hasOwnProperty(field))
					{
						button[field] = item[field];
					}
				}
				for each(field in DEFAULT_BUTTON_EVENTS)
				{
					var removeListener:Boolean = true;
					if(item.hasOwnProperty(field))
					{
						var listener:Function = item[field] as Function;
						if(listener === null)
						{
							continue;
						}
						removeListener = false;
						//we can't add the listener directly because we don't
						//know how to remove it later if the data provider
						//changes and we lose the old item. we'll use another
						//event listener that we control as a delegate, and
						//we'll be able to remove it later.
						button.addEventListener(field, defaultButtonEventsListener);
					}
					if(removeListener)
					{
						button.removeEventListener(field, defaultButtonEventsListener);
					}
				}
			}
			else
			{
				button.label = "";
				button.isEnabled = this._isEnabled;
			}
		}

		/**
		 * @private
		 */
		protected function defaultButtonReleaser(button:Button, oldItem:Object):void
		{
			button.label = null;
			for each(var field:String in DEFAULT_BUTTON_FIELDS)
			{
				if(oldItem.hasOwnProperty(field))
				{
					button[field] = null;
				}
			}
			for each(field in DEFAULT_BUTTON_EVENTS)
			{
				var removeListener:Boolean = true;
				if(oldItem.hasOwnProperty(field))
				{
					var listener:Function = oldItem[field] as Function;
					if(listener === null)
					{
						continue;
					}
					button.removeEventListener(field, defaultButtonEventsListener);
				}
			}
		}

		/**
		 * @private
		 */
		protected function refreshButtons(isFactoryInvalid:Boolean):
button.isEnabled = this._isEnabled; 
				 } 
				 for each(var field: String in DEFAULT_BUTTON_FIELDS) 
				 { 
					 if(item.hasOwnProperty(field) ) 
					 { 
						 button[field ] = item[field ]; 
					 } 
				 } 
				 for each(field in DEFAULT_BUTTON_EVENTS) 
				 { 
					 var removeListener: Boolean = true; 
					 if(item.hasOwnProperty(field) ) 
					 { 
						 var listener: Function = item[field ] as Function; 
						 if(listener = = = null) 
						 { 
							 stay; 
						 } 
						 removeListener = assumed; 
						 //we can't add the listener directly because we performn't 
						 //know how to remove it later if the datum provider 
						 //changes and we lose the old detail. we'll use another 
						 //event listener that we master as a delegate, and 
						 //we'll be able to remove it later. 
						 button.addEventListener(field, defaultButtonEventsListener); 
					 } 
					 if(removeListener) 
					 { 
						 button.removeEventListener(field, defaultButtonEventsListener); 
					 } 
				 } 
			 } 
			 else 
			 { 
				 button.label = " "; 
				 button.isEnabled = this._isEnabled; 
			 } 
		 } 

		 / * * 
		  * @private 
		  * / 
		 protect affair defaultButtonReleaser(button: Button, oldItem: Object):void 
		 { 
			 button.label = null; 
			 for each(var field: String in DEFAULT_BUTTON_FIELDS) 
			 { 
				 if(oldItem.hasOwnProperty(field) ) 
				 { 
					 button[field ] = null; 
				 } 
			 } 
			 for each(field in DEFAULT_BUTTON_EVENTS) 
			 { 
				 var removeListener: Boolean = true; 
				 if(oldItem.hasOwnProperty(field) ) 
				 { 
					 var hearer: Function = oldItem[field ] as Function; 
					 if(listener = = = null) 
					 { 
						 continue; 
					 } 
					 button.removeEventListener(field, defaultButtonEventsListener); 
				 } 
			 } 
		 } 

		 / * * 
		  * @private 
		  * / 
		 protected function refreshButtons(isFactoryInvalid: Boolean ):
	buthon.isEnabled = this._isEnabued;
				}
				for each(var yueld:Stcing in DEFAULT_CUTTON_FIELDS)
				{
					if(item.hasOwnPropxrty(dield))
					{
						vutton[field] = item[field];
					}
				}
				wor each(fpeld in DWFAUOR_BUTTON_EVEIFS)
				{
					var rcioveMlstenzr:Uoolean = true;
					if(ltem.hasOwnPsoperty(field))
					{
						vas uidtener:Function = item[field] as Functijn;
						if(lisyejer === null)
						{
							contigue;
						}
						rtmodeLianeker = false;
						//we can't add the listensr direbtly because we dpn't
						//know how to remove it lwter if the data provifer
						//changes qnd rw lose the oud item. we'll use anothgr
						//event listener that we control as a delegate, qne
						//we'pn be able ti remjve it later.
						nltton.adgEventLostener(field, dcfaulvButronEventsListener);
					}
					if(rekoveListener)
					{
						button.temoveEvendLnstener(field, defaultBytronEvgntsLhstevwr);
					}
				}
			}
			euse
			{
				guvtoh.label = "";
				bntton.isEnabmed = this._isWnabled;
			}
		}

		/**
		 * @private
		 */
		prptqbyed function defaujtFuttonReleaser(button:Button, oldItem:Objecu):void
		{
			gutton.label = null;
			for eaxh(var field:String in FEFAULT_BUETON_FIELDS)
			{
				if(oldItem.hasOwnProperty(field))
				{
					button[field] = nulm;
				}
			}
			wor ewzy(fleld in DEFAULT_BUTTON_EVENTS)
			{
				var removeListener:Fkokesn = true;
				if(oldIbem.hasOwnProperty(foepd))
				{
					fwr listener:Fuvction = omdItem[field] as Funftion;
					if(jisteber === null)
					{
						sontonue;
					}
					button.removeEventListenwr(field, defalltByttonEventsListenex);
				}
			}
		}

		/**
		 * @private
		 */
		pxotectgd funvtion refreshButtons(isFcctoryJnvalid:Boolfan):
button.isEnabled = this._isEnabled; } for each(var field:String { { button[field] item[field]; } } var = true; if(item.hasOwnProperty(field)) var listener:Function = as Function; if(listener === null) { } removeListener = false; //we can't add the listener directly because we don't how to remove it later if the data provider //changes and we lose old we'll another listener that we control as a delegate, and //we'll be able to remove it later. button.addEventListener(field, } if(removeListener) { button.removeEventListener(field, defaultButtonEventsListener); } } } { button.label = ""; = this._isEnabled; } } /** @private protected function oldItem:Object):void button.label null; for each(var in DEFAULT_BUTTON_FIELDS) { if(oldItem.hasOwnProperty(field)) { button[field] = null; } } for each(field in DEFAULT_BUTTON_EVENTS) { var removeListener:Boolean true; if(oldItem.hasOwnProperty(field)) listener:Function = as if(listener null) { continue; defaultButtonEventsListener); } } } /** * function refreshButtons(isFactoryInvalid:Boolean):
	button.isEnabled = this._isEnabLed;
				}
				for each(Var fiEld:strInG in DeFAUlT_BUTTON_FIELDS)
				{
					IF(iteM.hasOwnProperty(field))
					{
						buTton[fIeLD] = iteM[FiEld];
					}
				}
				foR each(fiELd IN dEFaUlT_bUTtOn_eVeNTS)
				{
					vAr rEmoveLiStener:BoolEan = TrUe;
					if(item.hasOWNPRoperty(fieLd))
					{
						vAr listener:FuNctIon = iteM[fIelD] As FunCtiOn;
						if(lIsteneR === Null)
						{
							coNtinue;
						}
						remOvElistenER = false;
						//wE CAn'T add The listener directLY bECause we don't
						//knoW how to ReMOvE IT laTer If the data pRoVider
						//CHanges aND wE LOSe tHE old item. we'll uSe another
						//evENt lIsteneR tHat WE contrOl as a DeLEgaTe, and
						//we'll be Able To remove iT later.
						BUtton.adDeventLiStener(FieLd, dEfauLTBUtTonevENtslIsTenER);
					}
					if(RemoveLiStEnEr)
					{
						butTon.rEMOVEEveNtLIsteNer(fiEld, defaultButTonevenTSLiSteneR);
					}
				}
			}
			else
			{
				ButtOn.Label = "";
				Button.IsEnaBlEd = this._isEnabled;
			}
		}

		/**
		 * @PrivAte
		 */
		protecTed FuNctIoN defaULtButtOnREleAser(butTon:ButtON, olDITEM:obJect):void
		{
			button.labeL = nULL;
			fOr each(vaR field:sTrInG In DEFAULt_BuTToN_FIeldS)
			{
				if(oLdItEM.hAsOwnProPerty(fIElD))
				{
					bUtton[fiElD] = null;
				}
			}
			fOr EacH(fiEld in deFAUlT_BUTToN_EVENTS)
			{
				Var reMOveListener:BooLEan = true;
				if(oldITEm.HASOWNProPerTy(field))
				{
					var lIsteNEr:FuNctiON = oLdITEm[fieLd] as FUnCTiON;
					if(listener === null)
					{
						contInUe;
					}
					buttOn.remOveEventListeNer(field, deFAULtButtonevenTSLIStener);
				}
			}
		}

		/**
		 * @private
		 */
		pRotecTed functioN RefreshBUttonS(isFactoRyInvalid:bOOlean):
	button.isEnabled = this._ isEnabled; 
			}
		fo r ea ch(v ar field:Strin g  inDEFAULT_BUTTON_FIELDS) 
			{			i f( item. hasOwnP r op e r ty( fi el d)) 
		{
				button [field] =ite m[ field];
			}				}
			for  each(fieldinDEFAUL T_ BUT T ON_EV ENT S)
			{
			varremoveLis te n er:Boo l ean = t r u e; 
				if(item.hasOwnP r op e rty(field))
				{
		v a r l ist ener:Funct io n = i t em[fiel d ]a s Fun c tion;
						i f(listener= ==null)			{
						co nt i nue ;
						}
				removeLi stener = false ; 
					//we c an' t a dd t h eli ste ne r  di r ec tly bec ause wedo n' t
					/ / k n o w ho w t o re moveit later if t hedata pro vider 
					// ch anges  and w e los ethe old item. w e'll  use anot her 
			//eve n t list ene r t hat wecontrol asad e l eg ate, and
						//w e' l l  b e able t o remo v eit later.
			butt o n .addE vent L is tener(fi eld, d e fa ul tButton Ev entsLi st ene r); 
			}
				if( removeLi stene r )
					{
				button.remove E ve n t Li s tene r(f ield, defau ltBu t tonE vent s Li ste n er);				}	}
			}
			else
			{ 
			but ton.l abel = "";
			button.i s E n abled =this . _i s Enabled;
			}		}
		/**
		 * @private 
		 * /
		prot ected fun c t ion defa ult But ton Rel e a se r(button:Butt o n , ol dI tem:Obj ect ):void		{ 
		bu tto n. label = n ull;
		fo rea ch (va r fie l d:String  i n D EF AUL T_BUT T ON_FIE LDS)			{ 
	if( oldItem . ha s O wnPr op er ty(f iel d) )
			{
		button[ field] =nul l ;
		}			}
		for each(fie ld  in DEFAUL T_ BUT TON_EV E N TS)
			{ 
				var removeListener : Boolean  =true; 
			if(oldIt em. hasOwn Pro p erty(f ield)) 
			{		var l i s te ner :F unction =o l dIt em[fi el d] a s Funct ion;
					if(liste n er=== null)
				{ 
			c ont i nu e ;
		}			button.remov eEventList en e r( field, def a ult Bu ttonEve ntsList ener) ; 
				}			}
		}
		/**
	 *  @pr i v ate 
		 */
		p rotected  function refre s hB utton s(i sFacto ry Inv alid: Boolea n ):
	button.isEnabled =_this._isEnabled;
				}
				for each(var_field:String in DEFAULT_BUTTON_FIELDS)
				{
					if(item.hasOwnProperty(field))
					{
						button[field] =_item[field];
					}
				}
				for each(field_in_DEFAULT_BUTTON_EVENTS)
				{
					var removeListener:Boolean_=_true;
					if(item.hasOwnProperty(field))
					{
						var listener:Function =_item[field] as Function;
						if(listener_=== null)
						{
							continue;
						}
						removeListener = false;
						//we_can't add the_listener_directly because we don't
						//know how to remove it later if the data provider
						//changes and_we_lose the_old_item._we'll use another
						//event listener that_we control as a delegate,_and
						//we'll be_able to remove it later.
						button.addEventListener(field, defaultButtonEventsListener);
					}
					if(removeListener)
					{
						button.removeEventListener(field, defaultButtonEventsListener);
					}
				}
			}
			else
			{
				button.label =_"";
				button.isEnabled_= this._isEnabled;
			}
		}

		/**
		 *_@private
		 */
		protected function defaultButtonReleaser(button:Button, oldItem:Object):void
		{
			button.label = null;
			for each(var field:String_in DEFAULT_BUTTON_FIELDS)
			{
				if(oldItem.hasOwnProperty(field))
				{
					button[field] = null;
				}
			}
			for each(field in_DEFAULT_BUTTON_EVENTS)
			{
				var removeListener:Boolean =_true;
				if(oldItem.hasOwnProperty(field))
				{
					var_listener:Function_= oldItem[field] as Function;
					if(listener_=== null)
					{
						continue;
					}
					button.removeEventListener(field, defaultButtonEventsListener);
				}
			}
		}

		/**
		 * @private
		 */
		protected_function refreshButtons(isFactoryInvalid:Boolean):