Adobe Dreamweaver Forums



Last 10 THreads :         DIV in Table not working. (Last Post : Jay Jay - Replies : 12 - Views : 13 )           »          Library is missing names from splitter bar (Last Post : Mad Dog - Replies : 11 - Views : 12 )           »          pop up blocker jacking my login (Last Post : Jay Jay - Replies : 5 - Views : 6 )           »          Can Anyone Help With Sub Menus (Last Post : drafted - Replies : 7 - Views : 8 )           »          Why is this not working!!! (Last Post : Boxing Boom - Replies : 11 - Views : 12 )           »          CF8 Enterprise gives 500 errors (Last Post : BJFranz - Replies : 0 - Views : 1 )           »          cfimage error (Last Post : masoud_amen - Replies : 0 - Views : 1 )           »          Flash Controls Not Displaying in Embedded File (Last Post : QADesign - Replies : 4 - Views : 5 )           »          Scollbar theme (Last Post : vcorey - Replies : 0 - Views : 1 )           »          Scollbar theme (Last Post : vcorey - Replies : 0 - Views : 1 )           »         


Home Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
User Info Statistics
Go Back   Adobe Dreamweaver Forums > Other Macromedia/Adobe Products > Flex
 
Tags:



Reply
  #1 (permalink)  
Old 11-20-2008, 04:23 PM
AlexAAM
 
Posts: n/a
Diggs:
Default titleWindow nightmare

:brokenheart; Hello to all, i want to make a question that is drive me crazy. i
am relatively new to flex. and i have a program that shows a titleWindow based
component, using popupManager. In the titleWindow's creationComplete event i
call a function named init, that makes a netconnection call to the server. the
server is responding with the data and returns an ArrayCollection that is
binded to a combo box in the client. this data are received in a result handler
event of the titleWindow. The problem is:
if i run the program and if i enter to the this screen a first time it load
the data ok (i watch this with the flex builder debugger), and the data are
loading ok inside the ArrayCollection binded to the combo box, but the combo
don't show the data (it don?t refresh itself).
If i enter a second time to the screen then the data are loaded againg from
the server and now it appears on the screen.
evidently this is a problem of refresh the screen. and i have a week looking
for a solution. i try using creationPolicy='all', change the
creationComplete='init();' for another event on the titleWindow, and many
other things but nothing seems work.

Thanks in advance



Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 11-20-2008, 05:25 PM
Amy Blankenship
 
Posts: n/a
Diggs:
Default Re: titleWindow nightmare


"AlexAAM" <webforumsuser@macromedia.com> wrote in message
news:gg42b9$k17$1@forums.macromedia.com...
> :brokenheart; Hello to all, i want to make a question that is drive me
> crazy. i
> am relatively new to flex. and i have a program that shows a titleWindow
> based
> component, using popupManager. In the titleWindow's creationComplete event
> i
> call a function named init, that makes a netconnection call to the
> server. the
> server is responding with the data and returns an ArrayCollection that is
> binded to a combo box in the client. this data are received in a result
> handler
> event of the titleWindow. The problem is:
> if i run the program and if i enter to the this screen a first time it
> load
> the data ok (i watch this with the flex builder debugger), and the data
> are
> loading ok inside the ArrayCollection binded to the combo box, but the
> combo
> don't show the data (it don?t refresh itself).
> If i enter a second time to the screen then the data are loaded againg
> from
> the server and now it appears on the screen.
> evidently this is a problem of refresh the screen. and i have a week
> looking
> for a solution. i try using creationPolicy='all', change the
> creationComplete='init();' for another event on the titleWindow, and many
> other things but nothing seems work.


It looks like the formatting got hosed when you posted this. I have a
really hard time parsing long blocks of solid text. Maybe if you tried
again and added extra space in between your paragraphs, I'd have an easier
time being able to help you.


Reply With Quote
  #3 (permalink)  
Old 11-21-2008, 01:03 AM
AlexAAM
 
Posts: n/a
Diggs:
Default Re: titleWindow nightmare

Hello to all, i want to make a question that is drive me crazy:

i am relatively new to flex. and i have a program that shows a titleWindow
based component, using popupManager. In the titleWindow's creationComplete
event i call a function named init, that makes a netconnection call to the
server. the server is responding with the data and returns an ArrayCollection
that is binded to a combo box in the popup window (the titleWindow). this data
are received in a result handler event of the titleWindow. The problem is:


if i run the program and when i enter to the screen a first time it load the
data ok (i watch this with the flex builder debugger), and the data are loading
ok inside the ArrayCollection binded to the combo box, but the combo box don't
show the data (it don?t refresh itself).


If i enter a second time to the popup window, then the data are loaded again
from the server and now it appears on the combo.


evidently this is a problem of screen refresh , and i have a week looking for
a solution. i try using creationPolicy='all', i try changing the
creationComplete='init();' for another event on the titleWindow, and many other
things but nothing seems work.

Thanks in advance

Reply With Quote


  #4 (permalink)  
Old 11-21-2008, 04:05 AM
Mitek17
 
Posts: n/a
Diggs:
Default Re: titleWindow nightmare

Hi Alex,

Welcome to the World of Nightmares with COMBOBOX!

Have a read in blog about ComboBox problems and how to overcome it:
http://mitek.id.au/blog/2008/10/28/c...ess-continues/
http://mitek.id.au/blog/2008/08/18/c...ditem-problem/
http://mitek.id.au/blog/2008/06/09/u...t-in-combobox/

PS I am still wondering how come in the event-driven environment FlexSDK is so
certain about handling the events in particular order.

Cheers,
Dmitri.


Reply With Quote
  #5 (permalink)  
Old 11-21-2008, 08:26 AM
SujitG
 
Posts: n/a
Diggs:
Default Re: titleWindow nightmare

Hi,

Is your ArrayCollection marked as Bindable? Can you please share the code.

Hope this helps.
Reply With Quote
  #6 (permalink)  
Old 11-21-2008, 07:13 PM
AlexAAM
 
Posts: n/a
Diggs:
Default Re: titleWindow nightmare

Hello, my arrayCollection is marked Bindable: this is the code:

<?xml version="1.0" encoding="utf-8"?>
<mx:TitleWindow xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"
width="448"
height="498" showCloseButton="true" title="Imagen" borderThicknessBottom="3"
borderThicknessLeft="3" borderThicknessRight="3" borderThicknessTop="-5"
close="cerrar_ventana();" xmlns:ns1="*" creationComplete="init();"
visible="true" >
<mx:Label x="43" y="133" text="Imagen" width="79"/>
<mx:ComboBox id="cimagen" x="105" y="130" width="248" height="20"
rowCount="15"
change="procesar_imagen(cprev.selected)" dataProvider="{cimagen_data}" />

<mx:Script>
<![CDATA[
import mx.events.CollectionEventKind;
import mx.binding.utils.BindingUtils;
import mx.utils.ObjectUtil;
import mx.utils.UIDUtil;
import mx.collections.ArrayCollection;
import mx.core.*;
import mx.controls.Alert;
import mx.managers.PopUpManager;

[Bindable]
public var cimagen_data:ArrayCollection=new ArrayCollection();

private function init():void
{

// preparamos la ventana
//cimagen_data.push({label:'[none]',data:''});
cimagen_data.addItem({label:'[none]',data:''});
cimagen.selectedIndex=0;

var n:NetConnection=Application.application.netConnect ;
if (n!=null)
n.call("WebServPortalFlex.servicios.obtenerRecurso sUsuario",new
Responder(result_obtenerImagenesUsuario,null),Appl ication.application.modulo_pag
eDesigner.gUsernameOwner,1);

}


private function result_obtenerImagenesUsuario(res:Object):void
{

var result:Object=res.Table.serverInfo;
if (result.initialData[0][0]!="0" && result.initialData[0][0]!="1") //
primera fila, primera columna (cod)
{
Alert.show(result.initialData[0][1]); // primera fila, segunda columna
(men)
return;
}
// cargamos el combo imagenes con los datos (label y data)
if (result.initialData[0][0]=="0")
{
// este usuario tiene recursos (imagenes)
for (var i:Number = 0;i < result.initialData.length;i++)
{
var new_item:Object = new Object();
new_item.label=result.initialData[i][3]; // nombreArchivo
new_item.data=result.initialData[i][5]; // rutaFlex
cimagen_data.addItem(new_item);

//cimagen_data.push(new_item);
//cimagen_data.sortOn("label",Array.CASEINSENSITIV E); // ordenamos el
array por el campo label
}
//cimagen.dataProvider=cimagen_data;
//cimagen.invalidateDisplayList();

}

//this.visible=true;
cimagen_data.addItem({label:'the end',data:''});


}

</mx:TitleWindow>

well, some important points:
- the program show this component like a popup window, using the follow
methods in the Application file:
var vp:VisualPicture=null;
vp= VisualPicture(PopUpManager.createPopUp(this,Visual Picture,true));
PopUpManager.centerPopUp(vp);

- the server send to flex a .net DataSet object, so the function
result_obtenerImagenesUsuario get this data and transform it into
arrayCollection. this work fine because i watch it with the flex builder
debugger.
- it seems this is a databinding problem, because i try binding the
cimagen_data arrayCollection to a list, and i get the same problem.
- like you could watch i add a last item to the combo labeled 'the end' (after
all the data from the server are in the arrayCollection). this item appears in
the combo.so for a strange reason the databinding dont work with the data from
the server.? could be the way i am creating the object that i add to the
arrayCollection ?

any help will be very much appreciated.



Reply With Quote


  #7 (permalink)  
Old 11-24-2008, 08:05 AM
SujitG
 
Posts: n/a
Diggs:
Default Re: titleWindow nightmare

Hi,

I couldn't replicate the server call, but i tried out adding random data to
the ArrayCollection. I could see the data being modified in the
ArrayCollection. Can you please check if the execution is entering the for loop.

Hope this helps.

Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



© Camley Interactive (camley.info) 2008 - all logos and images are copywrite their respective owners.
Proud member of the Camley Interactive Network
All times are GMT. The time now is 11:01 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
Cheap Car Insurance - Compare Motor Insurance
Endsleigh Car Insurance Natwest Car Insurance
More Than Car Insurance Norwich Union Car Insurance
Prudential Car Insurance Zurich Car Insurance
Inactive Reminders By Mished.co.uk