sorry this it's correct mxml file .
[EMAIL PROTECTED] ha scritto:
>Thank's Mika, but i'm stop.
>My problem it's that the number of dataGrind column i will know only at
>runtime, then i have this problem.
>
>I have a array, (simple array not array of object).
>Then i must display in my dataGrid column the value of this array, after
>with "Repeater" i must create TextInput how many the elements of an
>array are,
>then the row of this dataGrid will be the value of TextInput.
>If you can look my code and to help me how to do, please i'm disperate
>with this problem.
>Devis
>
>
>
>
>
>Yahoo! Groups Links
>
>
>
>
>
>
>------------------------------------------------------------------------
>
><?xml version="1.0" encoding="utf-8"?>
><mx:Canvas xmlns:mx="http://www.macromedia.com/2003/mxml" height="100%"
>width="100%" visible="true"
>xmlns="*"
>
>
>
>
>
> <PdmService id="service"/>
> <mx:Script source="../as/WFSchedaModello.as"/>
> <mx:Script source="../as/StringEx.as"/>
> <mx:Script source="../as/WFTabelle.as"/>
> <mx:Script source="../delegate/PfDelegate.as"/>
>
>
><!--Imposto i campi obbligatori -->
><mx:StringValidator field="PfVO(vopf[0]).pfvopk.stagpf" minLength="1"
>maxLength="50" requiredFieldError="Campo obbligatorio" tooLongError="Max 5
>caratteri" listener="lstag" />
><mx:StringValidator field="PfVO(vopf[0]).pfvopk.modepf" minLength="5"
>maxLength="10" requiredFieldError="Campo obbligatorio" tooLongError="Max 10
>caratteri" listener="lmodello" />
><mx:StringValidator field="PfVO(vopf[0]).pfvopk.matepf" minLength="5"
>maxLength="5" requiredFieldError="Campo obbligatorio" tooLongError="Max 5
>caratteri" listener="ltessuto" />
><mx:StringValidator field="PfVO(vopf[0]).de50pf" minLength="4"
>maxLength="50" requiredFieldError="Campo obbligatorio" tooLongError="Max 50
>caratteri" listener="ldescr" />
><mx:StringValidator field="PfVO(vopf[0]).modevo.tgbamo" minLength="1"
>maxLength="5" requiredFieldError="Campo obbligatorio" tooLongError="Max 2
>caratteri" listener="tag_base" />
><mx:StringValidator field="PfVO(vopf[0]).modevo.cmpfmo.dsc_cmpf" minLength="1"
>maxLength="50" requiredFieldError="Campo obbligatorio" tooLongError="Max 2
>caratteri" listener="lcat_merc" />
>
>
>
>
>
><!--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" />
><mx:Binding source="{ltrim(PfVO(vopf[0]).stagione.cdc_stag)==undefined
>?'':ltrim(PfVO(vopf[0]).stagione.cdc_stag)}"
>destination="PfVO(vopf[0]).cpfultvo.cpfultvopk.stagpf" />
>
>
><!--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" />
><mx:Binding source="{ltrim(PfVO(vopf[0]).pfvopk.modepf)==undefined
>?'':ltrim(PfVO(vopf[0]).pfvopk.modepf)}"
>destination="PfVO(vopf[0]).cpfultvo.cpfultvopk.modepf" />
>
><!--Tessuto -->
><mx:Binding source="{PfVO(vopf[0]).pfvopk.matepf==undefined
>?'':PfVO(vopf[0]).pfvopk.matepf}" destination="ltessuto.text" />
><mx:Binding source="{ltrim(PfVO(vopf[0]).pfvopk.matepf)==undefined
>?'':ltrim(PfVO(vopf[0]).pfvopk.matepf)}"
>destination="PfVO(vopf[0]).cpfultvo.cpfultvopk.matepf" />
>
>
><!--Codice Taglia + Taglia Base -->
><mx:Binding source="{PfVO(vopf[0]).modevo.tgbamo==undefined
>?'':PfVO(vopf[0]).modevo.tgbamo}" destination="tag_base.text" />
>
>
>
>
><!--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" />
>
>
>
>
>
>
><mx:Panel>
><mx:Label text="{PfVO(vopf[0]).strepf=='A'?'ANNULLATO':''}" styleName="Text"
>/>
>
><mx:Form >
>
>
> <mx:HBox>
> <mx:FormItem label="Stagione" required="true" >
> <mx:Label id="lstag" />
> </mx:FormItem>
>
> <mx:FormItem label="Tipo prodotto" required="true" >
> <mx:RadioButton groupName="tpo" id="option1" label="Prodotto"
> selected="{PfVO(vopf[0]).modevo.tpmomo=='0'}"
> click="PfVO(vopf[0]).modevo.tpmomo='0'"/>
> <mx:RadioButton groupName="tpo" id="option2" label="Acquistato"
> selected="{PfVO(vopf[0]).modevo.tpmomo=='1'}"
> click="PfVO(vopf[0]).modevo.tpmomo='1'"/>
> </mx:FormItem>
>
> </mx:HBox>
>
> <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 (F2)" required="true">
> <mx:TextInput id="lmodello"
> valueCommitted="vopf[0].pfvopk.modepf=event.target.text;" keyDown="if
> (Key.isDown(113)) callPopUP(Prodotti)"/>
> </mx:FormItem>
>
> <mx:FormItem label="Tessuto (F2)" required="true" >
> <mx:TextInput id="ltessuto"
> valueCommitted="vopf[0].pfvopk.matepf=event.target.text;" keyDown="if
> (Key.isDown(113)) callPopUP(Tessuti)"/>
> </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:ControlBar width="100%">
> <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')"
> click="Delete_Product()"
>
> visible="{PfVO(vopf[0]).strepf==''}"/>
>
>
> <mx:Button label="Riattiva"
> icon="@Embed('/images/icons/note_delete.png')"
> click="Riattiva_Product()"
>
> visible="{PfVO(vopf[0]).strepf=='A'}"/>
>
>
> <mx:Button
> icon="@Embed('/images/icons/note_view.png')" label="Stampa"
> click="Print_Pdf()"
>
> visible="{PfVO(vopf[0]).strepf==''}"/>
> <mx:Spacer width="100%"/>
>
> </mx:ControlBar>
></mx:Panel>
>
>
>
></mx:Canvas>
>
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
<?xml version="1.0" encoding="utf-8"?>
<mx:Canvas xmlns:mx="http://www.macromedia.com/2003/mxml" height="100%" width="800" visible="true" xmlns="*">
<mx:Script source="../as/labelFunction.as"/>
<mx:Script source="../delegate/PfDelegate.as"/>
<mx:Script source="../delegate/TabelleDelegate.as"/>
<PdmService id="service"/>
<mx:Script>
<![CDATA[
var voa:vo.as400.PfVO;
var taglia :Array;
var arr:Array;
var key=0;
var t:String;
function initTaglie(){
if(PfVO(vopf[0]).modevo.ctg1mo!=undefined)
service.CTabelle.getTaglie(PfVO(vopf[0]).modevo.ctg1mo);
arr = [];
t=PfVO(vopf[0]).modevo.tgbamo;
arr.push('S');
arr.push('M');
arr.push('L');
arr.push('XL');
arr.push('XXL');
voa=new vo.as400.PfVO();
taglia = new Array();
taglia=arr;
}
function createColumns(dataProvider):Array
{
return null;
}
function SetValue()
{
for (var i = 0; i < cdc.length ; ++i)
{
mx.controls.Alert.show(cdc[i].text);
}
}
function Value(event): Boolean
{
if(event=="S")
return false;
else
return true;
}
]]>
</mx:Script>
<!--
<mx:Button click="SetValue()" label="aaa"/>
-->
<mx:Panel id="panel6" width="100%"
panelBorderStyle="roundCorners"
headerColors="[#7D8FA8,#FFFFFF]">
<mx:Button click="initTaglie()" label="{PfVO(vopf[0]).modevo.ctg1mo}"/>
<mx:DataGrid width="100%" id="dg" cellPress="key=dg.selectedIndex" visible="true"
columns="{createColumns(taglia)}" />
<mx:Form >
<mx:FormItem label="Rif" required="true" >
<mx:TextInput id="t_rig" width="100%" />
</mx:FormItem>
<mx:FormItem label="Descrizione" required="true">
<mx:TextInput id="tdsc_col" width="100%" />
</mx:FormItem>
<mx:FormItem label="Tol+" required="true" direction="horizontal">
<mx:TextInput id="ttol_p" width="50" />
</mx:FormItem>
<mx:FormItem label="Tol-" required="true" direction="horizontal">
<mx:TextInput id="ttol_m" text="{voa.fl20pf}" width="50" />
</mx:FormItem>
<mx:HBox>
<mx:Repeater id="r" dataProvider="{dg.dataProvider}" recycleChildren="true">
<mx:FormItem label="{r.currentItem.label} : " required="{r.currentItem.label!=t}">
<mx:TextInput id="cdc" width="50" enabled="{r.currentItem.label!=t}" text="{r.currentItem.label!=t?'':'0'}"/>
</mx:FormItem>
</mx:Repeater>
</mx:HBox>
</mx:Form>
<mx:ControlBar width="100%">
<mx:Button icon="@Embed('/images/icons/note_add.png')"
label="Nuovo" click=""/>
<mx:Button icon="@Embed('/images/icons/note_edit.png')"
label="Salva" click=""/>
<mx:Button label="Elimina" icon="@Embed('/images/icons/note_delete.png')"/>
<mx:Button label="Riattiva" icon="@Embed('/images/icons/note_delete.png')"/>
<mx:Spacer width="100%"/>
</mx:ControlBar>
</mx:Panel>
</mx:Canvas>