data bind problem in txtbox?
hai friends,
below code
in resdata2 inclde data
dname->document name,
dnum->document number
xmlns:fx="http://ns.adobe.com/mxml/2009"
library://ns.adobe.com/flex/spark"
library://ns.adobe.com/flex/mx" minwidth="955" minheight="600">
<fx:script>
import mx.collections.arraycollection;
import mx.containers.formitem;
import mx.controls.alert;
import mx.controls.text;
import spark.components.combobox;
public function txtchange():void
var a:string=txtarea.text;
public function search_click()
//var date:date = new date();
//alert.show("date: "+date.tolocalestring());
//logon.fnatt("view","4563","0");
//logon.viewf("1","4436","","file_view","open");
//logon.fneditatt("edit","4080");
//logon.editattr("do_edit","b59baa32cd9c28e5825fc281109e6228","4563"," new text document_20100323003136805.txt", " ","{ts '2010-07-27 00:41:20'}","new text document","new text document","txt","testing file","testing file","this test file.. asa dhan");
//logon.editattrfirst("edit","4387");
"edit","3986");
private function handlelogonresult(event):void
if(event.result)
var resdata:arraycollection=event.result.res2;
var profileid:int;
var i:int;
if(resdata[0].storage_profile_id==null)
/* for(i=0;i<resdata.length;i++) alert.show(
"single","alert");
else
var resdata2:arraycollection=event.result.res2;
var resdata1:arraycollection=event.result.res1;
for(i=0;i<resdata1.length;i++)
/* var tmplbl:label = new label();
/* var k:int = 30;
for(i=0;i<resdata1.length;i++)
/* var newlabel:label=new label();
false;
//var lbl : label = new label();
var lbl:formitem=new formitem();
/* lbl.width = 130;
"horizontal";
//lblcontainer.addchild(lbl);
var lblform:label=new label();
if(resdata1[i].hasoptionslist==null)
var newtxtbox:textinput=new textinput();
"txt_"+ resdata1[i].keyvariablename;
newtxtbox.text=resdata2 // first txtbox need document name.second txtbo need documentnumber
if(resdata1[i].hasoptionslist!==null)
var newcb:combobox=new combobox();
/* newcb.height=27; */
//var bindata:arraycollection=resdata1[i].rulename;
/* var n:int; */
/* for(n=0;n<resdata1[i].rulename.length;n++)
/* tem=resdata1[i].rulename.spko_value.concat(); */
var tempdata:arraycollection=resdata1[i].rulename;
//newcb.dataprovider=bindata;
"spko_value";
true;
true;
/* var m:int=40;
//alert.show("double","alert");
//pn.visible=true;
private function handlelogonfault(event):void
//alert.show("incorrect","alert");
</fx:script>
<s:button id="btn_search" x="220" y="20" label="search" click="search_click();"/>
<s:textarea id="txtarea" change="txtchange()" />
<!--<s:vgroup id="lblcontainer" width="180" height="150" verticalalign="middle" verticalscrollposition="2" />-->
<s:panel title="form container example" id="pn1"
0" verticalcenter="0" visible="false">
<!--<s:vgroup left="10" right="10" top="10" bottom="10">-->
<mx:hbox>
<mx:form
lblcontainer" verticalgap="2" indicatorgap="14" paddingbottom="10"
16"
/>
</mx:hbox>
<!--</s:vgroup>-->
</s:panel>
<!--<mx:vbox id="lblcontainer" width="180" height="150" verticalgap="2" visible="false"/>-->
<s:panel id="pn" width="100%" visible="false">
<s:label id="newlabel" x="200" y="300"/>
<s:textinput id="newtxtbox" />
</s:panel>
<fx:declarations>
<s:remoteobject destination="coldfusion" id="logon" source="ist_business_applications.ist_docstor.file_access.editattrfirst" >
<s:method name="fneditatt" fault="handlelogonfault(event)" result="handlelogonresult(event)" />
</s:remoteobject>
<!-- place non-visual elements (e.g., services, value objects) here -->
</fx:declarations>
</s:application>
paddingtop="
id="
horizontalcenter="
}
]]>
{
alert.show(event.fault.message);
}
}
}
pn1.title=resdata1[0].profilename;
}
for(i=0;i<resdata1.length;i++)
{
if(resdata1[i].hasoptionslist==null)
{
var newtxtbox:textinput=new textinput();
newtxtbox.text="1";
pn.addelement(newtxtbox);
k=250;
m+=30;
if (counter >=resdata1.length)
{ counter = 0; k=10; m+=30;}
newtxtbox.x= k ;
newtxtbox.y = m;
counter++;
}
}
*/
lblcontainer.visible=
lbl.addelement(newcb);
}
lblcontainer.addelement(lbl);
}
pn1.visible=
newcb.dataprovider=tempdata;
newcb.labelfield=
{
tem[n]=resdata1[i].rulename[n].spko_value.concat();
} */
newcb.width=300;
{
//i used take length of resdata.but shows 1
lbl.addelement(newtxtbox);
}
newtxtbox.width=300;
newtxtbox.id=
{
lblform.text=resdata1[i].spk_name;
lblform.width=100;
lbl.addelement(lblform);
lbl.direction=
lbl.height = 27;
lbl.label = resdata1[i].spk_name; */
pn.visible=
newlabel.text=resdata1[i].spk_name;
//pn.addchild(newlabel);
pn.addelement(newlabel);
k =125;
j+=20;
if (counter >=resdata1.length)
{ counter = 0; k=10; j+=30;}
newlabel.x= k ;
newlabel.y = j;
counter++; */
{
var j: int = 40;
var counter:int = 0; */
tmplbl.x = 10;
tmplbl.y = 5;
tmplbl.text = "label text"; */
{
{
}
{
alert.show("welcome","alert");
} */
{
{
{
}
logon.fneditatt(
{
}
{
<![cdata[
xmlns:mx="
xmlns:s="
<s:application
<?xml version="1.0" encoding="utf-8"?>
More discussions in Flex (Read Only)
adobe
Comments
Post a Comment