I want to create a popUp and pass parameters to it so that it can
dynamically display information. Is it possible?
Here are some parts of my code:
------------------------------------------PopUp.mxml-------------------------------------------------------
<?xml version="1.0" encoding="utf-8"?>
<mx:TitleWindow
xmlns:mx="http://www.macromedia.com/2003/mxml"
title="Les détails de la sélection"
x="268" y="86"
closeButton="true"
click="this.deletePopUp();"
width="380" height="300">
<mx:Script>
<![CDATA[
var nomPhoto:String;
function changerCommentaire()
{
remplirListeHttpSrv.send();
}
]]>
</mx:Script>
<mx:HTTPService
id="remplirListeHttpSrv"
concurrency="multiple"
method="GET"
url="" href="http://localhost:8084/FlexXMLServer/RemplirListeServlet">http://localhost:8084/FlexXMLServer/RemplirListeServlet"
showBusyCursor="true"
resultFormat="object"
fault=""
/>
<mx:TabNavigator borderStyle="solid" width="100%" height="100%">
<mx:Canvas label="La photo" width="100%" height="100%"
backgroundColor="#FFFFCC">
<mx:Image
source="http://localhost:8084/FlexXMLServer/Photos/Mercedes/Mercedes ML
back.jpg"/>
</mx:Canvas>
<mx:Canvas label="Les propriétés" width="100%" height="100%"
backgroundColor="#FFFFCC">
<mx:Grid>
<mx:GridRow marginLeft="15">
<mx:GridItem colSpan="2"></mx:GridItem>
</mx:GridRow>
<mx:GridRow marginLeft="15" horizontalGap="5">
<mx:GridItem>
<mx:Label text="Nom photo : " id="nomPhotoLbl"
width="120"/>
</mx:GridItem>
<mx:GridItem width="200">
<mx:TextInput editable="false" id="nomPhotoTxt"
text="{nomPhoto}" width="200"/>
</mx:GridItem>
</mx:GridRow>
-----------------------------------------------------
<mx:GridRow marginLeft="15" horizontalAlign="right">
<mx:GridItem colSpan="2">
<mx:Button label="Changer le commentaire"
click="changerCommentaire()" width="50%"/>
</mx:GridItem>
</mx:GridRow>
</mx:Grid>
</mx:Canvas>
</mx:TabNavigator>
<mx:Button label="Fermer la fenêtre" width="100%"
click="this.deletePopUp();"/>
</mx:TitleWindow>
----------------------------------------------TitleWindowApp.mxml-----------------------------------
<?xml version="1.0" encoding="utf-8"?>
<!-- Simple application to demonstrate TitleWindow layout -->
<mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml" xmlns="*"
backgroundColor="#FFFFFF">
<mx:Script>
<![CDATA[
function showWindow()
{
var popUp:PopUp = new PopUp();
popUp.nomPhoto = "vsdvdsvsdvsdv";
var login = mx.managers.PopUpManager.createPopUp(this,
PopUp, false);
}
]]>
</mx:Script>
<mx:XML></mx:XML>
<mx:Panel title="Simple Panel">
<mx:Button label="Click to view title window" click="showWindow();"/>
<mx:MenuBar>
</mx:MenuBar>
</mx:Panel>
</mx:Application>
So what I want to is to dynamically display the "nomPhotoTxt" InputField
into the PopUp.mxml. A solution was to instantiate a PopUp and parameter
it before displaying it, but apparently the
mx.managers.PopUpManager.createPopUp(...) doesn't allow it.
Are there any other ways?
Thanks,
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
SPONSORED LINKS
| Web site design development | Computer software development | Software design and development |
| Macromedia flex | Software development best practice |
YAHOO! GROUPS LINKS
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

