Sorry, but i don't know ActionScript, i'm using amf.

In my mxml file i'm using an array "vopf:Array", but if my array is initialized from onResult work in all project. (see my binding please)

but if create a new array don't work, for example i wish in my function New_Product() create a function like this

function New_Product()
{
vopf=new Array();
PfVO vo = new PfVO();
vopf.push(vopf);
}

but from this moment , after call above function, all my binding don't work.
Can you help me please
Devis
class vo.as400.PfVO {



public var aacupf : Number;
public var blrepf : String;
public var cartpf : String;
public var cdogpf : String;
public var ceaqpf : Number;
public var ceulpf : Number;
public var cfpfpf : vo.as400.CCategoriFiscaleVO;
public var civapf : String;
public var cma1pf : String;
public var cma2pf : String;
public var cma3pf : String;
public var cma4pf : String;
public var cma5pf : String;
public var cmp1pf : String;
public var cmp2pf : String;
public var cmp3pf : String;
public var cnaqpf : String;
public var cnvepf : String;
public var coaqpf : Number;
public var coulpf : Number;
public var de50pf : String;
public var dtumpf : Number;
public var fl10pf : String;
public var fl20pf : String;
public var fl30pf : String;
public var fl31pf : String;
public var fl32pf : String;
public var fl33pf : String;
public var fl34pf : String;
public var fl35pf : String;
public var fl36pf : String;
public var fl37pf : String;
public var fl38pf : String;
public var fl39pf : String;
public var fl40pf : String;
public var fl41pf : String;
public var fl42pf : String;
public var fl43pf : String;
public var fl44pf : String;
public var fl45pf : String;
public var fl46pf : String;
public var fl47pf : String;
public var fl48pf : String;
public var fl49pf : String;
public var fla1pf : String;
public var fla2pf : String;
public var fla3pf : String;
public var fla4pf : String;
public var fla5pf : String;
public var fla6pf : String;
public var fla7pf : String;
public var fla8pf : String;
public var flicpf : String;
public var fptgpf : String;
public var ftcopf : String;
public var ggcupf : Number;
public var linepf : String;
public var ltripf : Number;
public var marcpf : String;
public var mmcupf : Number;
public var modevo : vo.as400.ModeVO;
public var nrazpf : Number;
public var orumpf : Number;
public var peunpf : Number;
public var pfvopk : vo.pk.PfVOPK;
public var qmxbpf : Number;
public var ricopf : String;
public var scmnpf : Number;
public var slinpf : String;
public var socupf : Number;
public var stagione : vo.as400.CStagione;
public var strepf : String;
public var volupf : Number;





public static var registered:Boolean = Object.registerClass( "vo.as400.PfVO", 
vo.as400.PfVO );



}
<mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml";
backgroundColor="#FFFFFF"
initialize="initApp();initPF();"
themeColor="haloSilver"
xmlns="*"
>




<!--WorkFlow Scheda Modello -->
<mx:RemoteObject id="CSchedaModello" named="FSchedaModelloRO"
fault="errorCall(event.fault.description)" showBusyCursor="true">
<mx:method name="getAllSeasonsPF" result="vopf=onResult(event.result)"/>
<mx:method name="New_Prodcut" result="vopf=onResult(event.result)"/>
</mx:RemoteObject>



<mx:RemoteObject id="CTabelle" named="FTabelleRO"
fault="errorCall(event.fault.description)" showBusyCursor="true">
<mx:method name="getAllSeasons" result="stagione=onResult(event.result)"/>
<mx:method name="getAllMarchio" result="marchio=onResult(event.result)"/>
<mx:method name="getCategorie" result="categorie=onResult(event.result)"/>
<mx:method name="getLinee" result="linee=onResult(event.result)"/>
<mx:method name="getTaglie" result="taglie=onResult(event.result)"/>

</mx:RemoteObject>

<!--Stagione -->

<mx:Binding source="{PfVO(vopf[0]).stagione.dsc_stag==undefined 
?'':PfVO(vopf[0]).stagione.dsc_stag}" destination="lstag.text" /> 
<mx:Binding source="{ltrim(PfVO(vopf[0]).stagione.cdc_stag)==undefined 
?'':ltrim(PfVO(vopf[0]).stagione.cdc_stag)}" 
destination="PfVO(vopf[0]).pfvopk.stagpf" /> 
<mx:Binding source="{ltrim(PfVO(vopf[0]).stagione.cdc_stag)==undefined 
?'':ltrim(PfVO(vopf[0]).stagione.cdc_stag)}" 
destination="PfVO(vopf[0]).modevo.modevopk.stagmo" /> 

<!--Modello -->
<mx:Binding source="{PfVO(vopf[0]).pfvopk.modepf==undefined 
?'':PfVO(vopf[0]).pfvopk.modepf}" destination="lmodello.text" /> 
<mx:Binding source="{ltrim(PfVO(vopf[0]).pfvopk.modepf)==undefined 
?'':ltrim(PfVO(vopf[0]).pfvopk.modepf)}" 
destination="PfVO(vopf[0]).modevo.modevopk.modemo" /> 


<!--Tessuto -->
<mx:Binding source="{PfVO(vopf[0]).pfvopk.matepf==undefined 
?'':PfVO(vopf[0]).pfvopk.matepf}" destination="ltessuto.text" /> 




<!--Codice Taglia + Taglia Base -->
<mx:Binding source="{PfVO(vopf[0]).modevo.tgbamo==undefined 
?'':PfVO(vopf[0]).modevo.tgbamo}" destination="tag_base.text" /> 
<mx:Binding source="tg_base.text==undefined ?'':tg_base.text" 
destination="PfVO(vopf[0]).modevo.ctg1mo" /> 



<!--Categoria Merceologia prodotto finito -->
<mx:Binding source="{PfVO(vopf[0]).modevo.cmpfmo.dsc_cmpf==undefined 
?'':PfVO(vopf[0]).modevo.cmpfmo.dsc_cmpf}" destination="lcat_merc.text" /> 
<mx:Binding source="{ltrim(PfVO(vopf[0]).modevo.cmpfmo.cdc_cmpf)==undefined 
?'':ltrim(PfVO(vopf[0]).modevo.cmpfmo.cdc_cmpf)}" 
destination="PfVO(vopf[0]).modevo.cmpf" /> 




<!--Vari -->
<mx:Binding source="{PfVO(vopf[0]).de50pf==undefined ?'':PfVO(vopf[0]).de50pf}" 
destination="ldescr.text" /> 



<!--Articoli annullati -->
<mx:Label text="{PfVO(vopf[0]).strepf=='A'?'ANNULLATO':''}" styleName="Text"/>













<mx:Style>
.myHeader {

textAlign: "left";

}


Text {
color: #FF0000;
font-family: Times New Roman;
font-size: 20;
}

</mx:Style>


<mx:Script source="../as/WFTabelle.as"/>
<mx:Script source="../as/WFSchedaModello.as"/>
<mx:Script source="../as/labelFunction.as"/>
<mx:Script source="../as/StringEx.as"/>






<mx:HBox width="100%">

<Pod id="tabe" title="Tabelle" width="20%" horizontalAlign="left" 
verticalAlign="top" creationPolicy="queued" creationIndex="1"
panelBorderStyle="roundCorners"
headerColors="[#FF6600,#FFFFFF]">
<mx:VBox>
<mx:Label text="Stagione:"/>

<mx:ComboBox dataProvider="{stagione}" width="100%" labelField="dsc_stag" 
change="PfVO(vopf[0]).stagione=event.target.selectedItem;CBmarchio.selectedIndex=-1;"
 id="cb"/>




<mx:Label text="Marchio:"/>
<mx:ComboBox id="CBmarchio" dataProvider="{marchio}" width="100%" 
labelField="dsc_linee" 
change="Prendi_Linea(selectedMarchio=event.target.selectedItem);"/>




<mx:Label text="Linea:"/>
<mx:ComboBox dataProvider="{linee}" width="100%" labelField="dsc_linee" 
change="selectedLinee=event.target.selectedItem;"/>

<mx:Label text="Categoria:"/>
<mx:ComboBox dataProvider="{categorie}" width="100%" labelField="dsc_cmpf" 
change="PfVO(vopf[0]).modevo.cmpfmo=event.target.selectedItem"/>

<mx:Label text="Taglia:"/>
<mx:TextInput id="tg_base" width="50" 
focusOut="CTabelle.getTaglie(tg_base.text);"/>
<mx:ComboBox id="cb_tg" dataProvider="{taglie}" width="100%" 
change="vopf[0].modevo.tgbamo=event.target.selectedItem;"/>




</mx:VBox>

</Pod>







<mx:Panel id="main" title="Gestione ciclo prodotto finito" width="100%" 
height="100%" horizontalAlign="center"
panelBorderStyle="roundCorners"
headerColors="[#FF6600,#FFFFFF]"
verticalAlign="middle" creationPolicy="queued" creationIndex="2">

<mx:ControlBar >
<mx:Button label="Indietro" icon="@Embed('/images/icons/navigate_left.png')" 
click="Prior()"/>
<mx:Button label="Avanti" icon="@Embed('/images/icons/navigate_right.png')" 
click="Next()"/>

<mx:Button icon="@Embed('/images/icons/note_add.png')"
label="Nuovo" click="Create_Product()"/>

<mx:Button icon="@Embed('/images/icons/note_edit.png')"
label="Salva" click="Add_Product()"
visible="{PfVO(vopf[0]).strepf==''}"/>



<mx:Button label="Elimina" icon="@Embed('/images/icons/note_delete.png')"
visible="{PfVO(vopf[0]).strepf==''}"/>


<mx:Button icon="@Embed('/images/icons/note_view.png')" label="Stampa"
visible="{PfVO(vopf[0]).strepf==''}"/>
<mx:Spacer width="100%"/>

</mx:ControlBar>




<mx:LinkBar dataProvider="myViewStack"/>
<mx:ViewStack width="100%" height="100%" id="myViewStack" >
<mx:HBox label="Scheda Modello">
<mx:Form>



<mx:FormItem label="Stagione" required="true" >
<mx:Label id="lstag" />
</mx:FormItem>

<mx:FormItem label="Marchio" required="true" >
<mx:Label text="{selectedMarchio.dsc_linee}" id="marchios"/>
</mx:FormItem>

<mx:FormItem label="Linea" required="true" >
<mx:Label text="{selectedLinee.dsc_linee}" id="linea"/>
</mx:FormItem>

<mx:FormItem label="Categoria Merceologica" required="true">
<mx:Label id="lcat_merc"/>
</mx:FormItem>

<mx:FormItem label="Modello" required="true">
<mx:TextInput id="lmodello" 
valueCommitted="vopf[0].pfvopk.modepf=event.target.text;"/>
</mx:FormItem>

<mx:FormItem label="Tessuto" required="true" >
<mx:TextInput id="ltessuto" enabled="false" 
valueCommitted="vopf[0].pfvopk.matepf=event.target.text;" keyDown="if 
(Key.isDown(113)) alert('F2 pressed');"/>
</mx:FormItem>





<mx:FormItem label="Taglia Base" required="true">
<mx:Label id="tag_base"/>
</mx:FormItem>


<mx:FormItem label="Descrizione" required="true">
<mx:TextInput id="ldescr" width="100%" 
valueCommitted="vopf[0].de50pf=event.target.text;"/>
</mx:FormItem>

<mx:FormItem label="Commento" required="true">
<mx:TextInput id="ssn" width="200"/>
</mx:FormItem>
</mx:Form>

</mx:HBox>



<mx:HBox label="Di.Ba"/>
<mx:HBox label="Model"/>
<mx:HBox label="Scheda Sviluppo"/>
<mx:HBox label="Tabella Misure"/>
</mx:ViewStack>




</mx:Panel>


<mx:VBox>





<mx:Panel id="panel3" title="Davanti" width="100%" height="100%" 
horizontalAlign="center" verticalAlign="middle" creationPolicy="queued" 
creationIndex="3"
panelBorderStyle="roundCorners"
headerColors="[#FF6600,#FFFFFF]">

</mx:Panel>

<mx:Panel id="panel4" title="Dietro" width="100%" height="100%" 
horizontalAlign="center" verticalAlign="middle" creationPolicy="queued" 
creationIndex="4"
panelBorderStyle="roundCorners"
headerColors="[#FF6600,#FFFFFF]">

</mx:Panel>
</mx:VBox>
</mx:HBox>

</mx:Application>


Reply via email to