Sitemap

Amicuk Programming Answers

Passing VO's into custom MXML components

-0001-11-30   Views:0

Advertisement

Hi there. I have a repeater that's dataProvider is an ArrayCollection. I want to pass the currentItem of the repeater( a VO ) into the custom component. Any thoughts on the best way to do this? Repeater      <mx:VBox y="44" height="80%&q

Hi there. I have a repeater that's dataProvider is an ArrayCollection. I want to pass the currentItem of the repeater( a VO ) into the custom component. Any thoughts on the best way to do this?
Repeater
     <mx:VBox y="44" height="80%" width="80%">     
          <mx:Repeater id="listContainer" dataProvider="{queue}">
               <views:QueueItemView   />
          </mx:Repeater>
     </mx:VBox>
Custom Component
<?xml version="1.0" encoding="utf-8"?>
<mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" width="600" height="60">
     <mx:Script>
          <![CDATA[
               import com.ryancanulla.dashboard.content.vo.QueueItemVO;
               [Bindable] public var item:QueueItemVO = new QueueItemVO();
          ]]>
     </mx:Script>
     <mx:Text x="10" y="10" text="This is the Article Title" fontWeight="bold" fontSize="12" width="545"/>
     <mx:Text x="10" y="30" text="item date  |  category  |  source"/>
     <mx:HRule width="100%" />
</mx:Canvas>

The replay answer
Advertisement
<mx:VBox y="44" height="80%" width="80%">    
     <mx:Repeater id="listContainer" dataProvider="{queue}">
          <views:QueueItemView
               item="{ QueueItemVO( listContainer.currentItem ) }" />
     </mx:Repeater>
</mx:VBox>

Go to See the other 2 answers

Passing VO's into custom MXML components

Category:DefaultRelease time:-0001-11-30Views:130

Hi there. I have a repeater that's dataProvider is an ArrayCollection. I want to pass the currentItem of the repeater( a VO ) into the custom component. Any thoughts on the best way to do this? Repeater      <mx:VBox y="44" height="80%&q[More]

Dynamically add custom MXML components in Actionscript

Category:DefaultRelease time:-0001-11-30Views:130

As there's no constructor for custom MXML components, how to dynamically add it as a child using ActionScript? I'm looking for some alternative to avoid the need to rewrite the entire existent component in ActionScript just to add it this feature (a[More]

Resource Module Help for localization in custom mxml components

Category:DefaultRelease time:-0001-11-30Views:130

HI again, Ok I have my resource set up to load at run time, working great. But I have mxml components should they not use the same loaded bundle, or should I make smaller component bundles and load them as well. Best Practice etc... Thanks in advance[More]

Custom MXML components

Category:DefaultRelease time:-0001-11-30Views:130

Hi, I have a mxml custom component I will need to edit often. I don't want to send an update every little change. Can I reference the component from a server and if so how?If you want to keep the custom component up-to-date for other users then you h[More]

Calling custom mxml components

Category:DefaultRelease time:-0001-11-30Views:130

How to I call an mxml component from an mxml application where the first called mxml component calls another mxml component.Far as I know, your main mxml application needs to call the component that contains your other component. In the <application>[More]

Initializing Custom MXML component

Category:DefaultRelease time:-0001-11-30Views:130

Hello, I am new to flex and the one thing I can't seem to get a handle on is using custom mxml components. The whole not being able to use a constructor to pass data through was a tough thing to adjust to so for the most part I've been writing my own[More]

Architecting an Application With MXML Components

Category:DefaultRelease time:-0001-11-30Views:130

I have an application that has gotten lengthy and I want to simplify it by architecting the Main Application with custom MXML Components. The application as it is currently architected works perfectly. Currently, the application consists of "Canvas&q[More]

Passing VARs between MXML Application and MXML components!

Category:DefaultRelease time:-0001-11-30Views:130

Hi, I'm trying to pass a variable between the MXML Application and the MXML Component with ValueObjects. But when i call the variable on the MXML Component it is null! ValueObject Class Code: package valueObjects     [Bindable]        public class My[More]

Gate pass & Customer trial components clarification

Category:DefaultRelease time:-0001-11-30Views:130

Hi MM Gurus, 1)Pls tell me about the Scenario with procedure of Customer Trial Component under i) with Modvat  ii) Without Modvat iii) scrapping of Customer trial components with Modvat reversal 2)    Can any of u pls let me know what is the differen[More]

How to pass a value from 1 mxml componet to the another mxml componet

Category:DefaultRelease time:2015-10-11Views:130

I have created 3 mxml components. I am using 1st component as a container component for other 2 components mean[ inside 1st component i have placed 2 other components]. now i want to pass selectedvalue from 1 component to another component. say 1st c[More]

How to create custom MXML component accepting other MXML componenents as children

Category:DefaultRelease time:2015-10-11Views:130

How can I create an MXML component that when I use it in the "main" MXML, accepts other MXML components... For example: <s:WindowedApplication>      <myComponent>           <otherMXMLcomponent></otherMXMLcomponent>       [More]

Hot
I can't install I-Tunes 10.6.1.7 on my Windows Vista laptop. Tried it several times. First message: Policy 8.0 Microsoft VC80.CRT..type='win32-policy, etc. Please helpI can't install I-Tunes 10.6.1.7 on my Windows Vista laptop. Tried it several times [More]
I am writing a report generator that has the ability to generate Excel files. The user clicks on a link (exporter.jsp), the page's content-type has been set to "application/vnd.ms-excel" which naturally prompts the user to either save to a file [More]
Hi, I've run a report on the report server and generated it as a pdf, now I want to open the PDF using web.show_document. As it starts to open I get an error message saying that the security settings of IE are preventing the opening of the file. I've [More]
Hello, I had to resintall OSX Lion 10.7.4 and since then safari version 5.1.7 crashes when I open the app so I am unable to use it anymore. I did a software upadte and everything seems ok. I tried to restore Safari from a backup but it stays the same [More]
So I have four monitors hooked up via an active VGA splitter, only problem is that while my MBP recognizes the VGA adapter (screen fades blue for a second) it refuses to actually output any image to the VGA port.I am having the same problem. It seems [More]
Trying to save space on My HD, can't figure out how to save an album to a discafter having used iPhoto 08 for a long time the link between the program and the source files broke. i have a hard time restoring the library. how can i import ALL images o [More]
I Used to have all my photos in my iPad and iPhone long time ago and then I bought a new iPad last year but I never get my previous photos again what can I do please help mePhoto stream photos only remain in iCloud for 30 days and your iCloud back on [More]
Hi Team, I want to join two dynamic sql with a UNION in between EXEC(@STRSQLNOArchive+' UNION' + @STRSQLArchive)  But here it is throwing an error .How this can be done SET @STRSQLNOArchive= 'Select columnname1 from table 1' SET @STRSQLArchive= 'Sele [More]
I cannot sync my IPad.  I get an error saying that I'm over capacity on my ITunes library.  How do I increase it?Apps: Delete any apps that you don't use very often. Videos: Delete videos that you don't watch Music: Either convert them to AAC 128kbps [More]
do you have online number for canada?.... if not when you going to start?Currently no. If you click the "Online Number" link under features on the bottom of this page, there is a link on that page that lists the current countries where Online Nu [More]