Ask a Question related to Macromedia Flex General Discussion, Design and Development.
-
Capho #1
Use Repeater to generate Formitem problem
1. I have use a mxml program receive a xml to generate the Form . I need to use
"repeat " function in <mx:Repeater> as i need to check what control it need to
created. But i find that the program usually fail when run at the first time.
Can someone tell me why?
The code:
function generate_form(field_item,position){
first_time_run = 0;
if (field_item.currentItem.fieldtype == "ch"){
function_form.createChild(mx.containers.FormItem,
undefined,{id:"function_form_item",label:field_ite m.currentItem.fieldlabel,style
:"moveeffect"}).createChild(mx.controls.TextInp ut,
undefined,{id:field_item.currentItem.fieldname+"_d atainputtype_ch",styleName:"mo
veeffect"});
}
if (field_item.currentItem.fieldtype == "da"){
function_form.createChild(mx.containers.FormItem,
undefined,{id:"function_form_item",label:field_ite m.currentItem.fieldlabel,style
:"moveeffect"}).createChild(mx.controls.DateFie ld,
undefined,{id:field_item.currentItem.fieldname+"_d atainputtype_da",styleName:"mo
veeffect"});
}
if (field_item.currentItem.fieldtype == "lo"){
function_form.createChild(mx.containers.FormItem,
undefined,{id:"function_form_item",label:field_ite m.currentItem.fieldlabel,style
:"moveeffect"}).createChild(mx.controls.CheckBox,u ndefined,{id:field_item.curren
tItem.fieldname+"_datainputtype_lo",label:field_it em.currentItem.fielddefault,st
yleName:"moveeffect"});
}
}
<mx:Form id = "function_form">
<mx:Repeater id="function_form_field_repeater"
dataProvider="{httpservice_function_form.result.ar ray.item}"
repeat="generate_form(event.target);" recycleChildren="true"/>
</mx:Form>
2. i have use datagrid to generate a "table -like" container. I have use a xml
as the DataProvider. But the order of the column is reverse as the schema in
xml. Can someone tell me why?
Capho Guest
-
formItem label
i have been trying to line up a formItem label with my custom fields and have discovered that with comboBoxes or textInput fields, you can move the... -
How to make the FormItem label above the TextInput
CODE: <mx:FormItem label="username" required="true" width="71%" direction="horizontal"> <mx:TextInput maxChars="20" textAlign="left" width="90%" ... -
Problem with Repeater Control
This might sound dum but i am having a problem with a Repeater Control in ASP.Net 2.0. My Website is consuming a webservice which returns an Array... -
FormItem label style
If you add each of the control types to your .css file, then those would overwrite any style that you have set on the FormItem. Maybe not the... -
Repeater paging problem
Hi, I'm trying to do the following but I can't understand what's wrong. Could you help me here! I do paging with a Repeater like this: ...



Reply With Quote

