Best practices for deferred loading collection once but ensuring there?

I'm confused on best practices for managing the "setup" of the form, where I need a remote call to occur once only once for the form, but I also need to make use of this collection for a combobox that will change when different lines in the DataGrid or clicked. Easier if I just explain...

  1. You click on a row in a datagrid control to modify an object (for this example we will say it is an "employee")
  2. The form you go must have a collection of objects 'Department' charged by a remote call. This collection of departments should only occur once, since it is not common for them to change. The departments collection is used to fill a combobox in form.
  3. You need to understand what Department of the comboBox control is the property selectedIndex by iterating over the departments and find one that fits the employee.department.id

Individually, I know how I can do all of the above, but because of the asynchronous nature of Flex, I'm having hard time setting up things. Here are a few questions...

My first thought was just put the loading of the departments in an init() method on the employeeForm who would load as an event on the form creationComplete(). On the component page grid when the event handler by clicking a line of fire, I then calls the setup() method on my employeeForm which stands at which selectedIndex to set to the combobox control looking at the departments.

The problem is the resultHandler for the load of the departments could not returned (so departments could not be there when "setUp" is called), but I can't put my business logic to determine the correct combobox in the departmentResultHandler because it would mean that I would always have whenever I don't want the fire of the call to the remote server object.

I have to miss a single best practice? Suggestions welcome.

Hi there rickcr

It is pretty rough and you need to make a few storage upward, but take a look below.


http://www.Adobe.com/2006/mxml"layout ="absolute">
   
        Import mx.controls.Alert;
Import mx.collections.ArrayCollection;
           
private var comboData:ArrayCollection;
           
private void Setup (): void {}
If {(comboData)
Alert.Show ("data are present")
populateForm()
} else {}
Alert.Show ("data not '")
getData();
}
}
           
private void getData (): void {}
comboData = new ArrayCollection();
The result of this call, the installer again
}
           
private function populateForm (): void {}
fill out your form
}
]]>
   

   
   
       
       

       
       

   

I think this example type of watch you want.  When you first click on tab 2 there is no data.  When you click on tab 2 once again, there is. The data for your combo will be stored in comboData.  When the component gets created first the comboData is not instansiated, just romance.  This allows you to say

If (comboData)

This means that if the variable contains your data, you can fill out the form.  Initially it is not so now the else condition, you can call your data and return the result of your data then you can say

comboData = new ArrayCollection(), put the data in it and remember the installation again.  This time comboData is populayed and is so it will run the method populate the form and you can decide which selected item to affect.

If it is on a large scale you want to look into the creation of a suitable handler class to handle this, but this simple demo shows you can test to see if the data is different.

Hope it helps and gives you some ideas.

Andrew

Tags: Flex

Similar Questions

  • best practices for loading the swf file

    Greetings,

    Using CS5 AS2

    I am creating a website in flash (all files are in a directory/folder on SharePoint) and want to make sure that what seems to work well is recommended.

    I have an index.swf with many buttons that will take the user to landing pages/content/other SWFs. On these various buttons, I have the script...

    (release) {loadMovieNum ("name.swf", 0) ;}}                I could also just do {loadMovie ("name.swf", 0) ;} ?}

    Transitions film nicely name.swf and on this page, I have a button that returns the user to the index.swf...

    (release) {loadMovieNum ("index.swf", 0) ;}}   Things back to index.swf nicely and the user can chose to go to a different landing page.

    It seems that I am on the right track, BC., nothing's wrong? but want to check out. I'm following best practices for moving from one swf to another within a Web site?

    Thanks for the help or confirmation!

    You are welcome.

  • I would like to know the "best practices" for unplugging my computer permanently to the internet and other updates.

    Thank you for taking the time to read this. I would like to know the "best practices" for unplugging my computer permanently to the internet and other updates. I thought I would do a clean install of Windows XP, install my Microsoft Works again and nothing else. I would like to effectively transforming my computer into a word processor. He continues more and more slow. I get blue screen errors, once again. I received excellent Microsoft Support when it happened before, but since my computer is around 13 years, I think it is not worth the headache to try to remedy. I ran the Windows 7 Upgrade Advisor, and my computer would not be able to upgrade. Please, can someone tell me how to make it only a word processor without updates or internet connection? (I already have a new computer with Microsoft Windows 7 Home Premium, it's the computer that I use. The old computer is just sitting there and once a week or so I updates.) I appreciate your time, thank you!

    original title: old computer unstable

    http://Windows.Microsoft.com/en-us/Windows-XP/help/Setup/install-Windows-XP

    http://www.WindowsXPHome.WindowsReinstall.com/sp2installxpcdoldhdd/indexfullpage.htm

    http://aumha.NET/viewtopic.php?f=62&t=44636

    Clean install XP sites
    You can choose which site to reinstall XP.

    Once it is installed, then you do not have to connect what anyone, however, some updates may be required to perform the work, test this by installing work and see if you get an error msg. Except that you should be fine.

  • Best practices for the integration of the Master Data Management (MDM)

    I work on the integration of MDM with Eloqua and are looking for the best approach to sync data lead/Contact changes of Eloqua in our internal MDM Hub (output only). Ideally, we would like that integration practically in real time but my findings to date suggest that there is no option. Any integration will result in a kind of calendar.

    Here are the options that we had:

    1. "Exotic" CRM integration: using internal events to capture and queue in the queue changes internal (QIP) and allows access to the queue from outside Eloqua SOAP/REST API
    2. Data export: set up a Data Export that is "expected" to run on request and exteernally annex survey via the API SOAP/REST/in bulk
    3. API in bulk: changes in voting that has happened since the previous survey through the API in bulk from Eloqua outside (not sure how this is different from the previous option)

    Two other options which may not work at all and who are potentially antimodel:

    • Cloud connector: create a campaign questioning changes to schedule and configure a connector of cloud (if possible at all) to notify MDM endpoint to query contact/lead "record" of Eloqua.
    • "Native" integration CRM (crazy): fake of a native CRM endpoint (for example, Salesforce) and use internal events and external calls to Eloqua push data into our MDM

    Issues related to the:

    1. What is the best practice for this integration?
    2. Give us an option that would give us the close integration in real-time (technically asynchronous but always / event-based reminder)? (something like the outgoing in Salesforce e-mail)
    3. What limits should consider these options? (for example API daily call, size response SOAP/REST)

    If you can, I would try to talk to Informatica...

    To imitate the integrations of native type, you use the QIP and control what activities it validated by internal events as you would with a native integration.

    You will also use the cloud api connector to allow you to set up an integration CRM (or MDM) program.

    You have fields of identification is added objects contact and account in Eloqua for their respective IDs in the MDM system and keep track of the last update of MDM with a date field.

    A task scheduled outside of Eloqua would go to a certain interval and extract the QAP changes send to MDM and pull the contacts waiting to be sent in place of the cloud connector.

    It isn't really much of anything as outgoing unfortunately use Messaging.  You can send form data shall immediately submit data to Server (it would be a bit like from collections of rule of integration running of the steps in processing of forms).

    See you soon,.

    Ben

  • Best practices for storing the Logs of the system for all newly improved ESXi hosts?

    Hi people,

    What are the options and best practices for the Logs of the system for all newly improved 5.1u1 ESXi hosts?

    Do I need to have the Syslog server or it can be safely ignored?

    Thank you

    Evening,

    Syslog is preferred, but VMware has provided a collector of syslog on the vcenter installation disc can be installed on any windows host or your vcenter. I can't count the number of times where I had guests CMTF or newspapers lost... Fortunately for the syslog which collects up to the accident.  It is not necessary, but it's really a good idea without any real cost since you can use your vcenter host.

    Here is an article on how to install it:

    Set up Syslog ESXi collector | VMware vSphere Blog - VMware Blogs

    Thank you

  • vSpere 5 Networking of best practices for the use of 4 to 1 GB NIC?

    Hello

    I'm looking for a networking of best practices for the use of 4-1 GB NIC with vSphere 5. I know there are a lot of good practice using 10 GB, but our current config does support only 1 GB. I need to include the management, vMotion, Virtual Machine (VM) and iSCSi. If there are others you would recommend, please let me know.

    I found a diagram that resembles what I need, but it's for 10 GB. I think it works...

    vSphere 5 - 10GbE SegmentedNetworks Ent Design v0_4.jpg(I had this pattern HERE - rights go to Paul Kelly)

    My next question is how much of a traffic load is each object take through the network, percentage wise?

    For example, 'Management' is very small and the only time where it is in use is during the installation of the agent. Then it uses 70%.

    I need the percentage of bandwidth, if possible.

    If anyone out there can help me, that would be so awesome.

    Thank you!

    -Erich

    Without knowing your environment, it would be impossible to give you an idea of the uses of bandwidth.

    That said if you had about 10-15 virtual machines per host with this configuration, you should be fine.

    Sent from my iPhone

  • best practices for the storage of the vm and vhd

    no doubt this question has been answered not once... Sorry

    I would like to know the best practice for the storage of the vm and its virtual hard disk to a SAN.

    Any show advantage does make sense to keep them on separate LUNS?

    Thank you.

    It will really depend on the application of the virtual machine - but for most of the applications no problem by storing everything on the same data store

  • best practices for placing the master image

    Im doing some performances / analysis of load tests for the view and im curious about some best practices for the implementation of the image master VM. the question is asked specifically regarding disk i/o and throughput.

    My understanding is that each linked clone still reads master image. So if that is correct, then it seems that you would like the main image to reside in a data store that is located on the same table as the rest of the warehouses of data than the House related clones (and not some lower performing table). The reason why I ask this question, it is that my performance tests is based on some future SSD products. Obviously, the amount of available space on the SSD is limited, but provides immense quantities of e/s (100 k + and higher). But I want to assure you that if, by putting the master image on a data store that is not on the SSD, I am therefore invalidate the IO performance I want high-end SSD.

    This leads to another question, if all the linked clones read from the master image, which is general practices for the number of clones related to deploy by main image before you start to have problems of IO contention against this single master image?

    Thank you!

    -


    Omar Torres, VCP

    This isn't really neccissary. Linked clones are not directly related to the image of the mother. When a desktop pool is created and used one or more data stores Parent is copied in each data store, called a replica. From there, each linked clone is attached to the replica of the parent in its local data store. It is a replica of unmanged and offers the best performance because there is a copy in every store of data including linked gradient.

    WP

  • AF best practices for video

    I'm using an EOS 7 d for 1080 p HD video shooting. New to SLR camera and digital video. I have watched several tutorials but do not yet have a good understanding of what the best practices for the development.

    If I put the camera in AI Servo it will auto focus if the subject is moving away or toward me with depress me back AF-ON or the shutter button? Or should I press one of these buttons to make the camera continues to focus?

    You know tutorials or video lessons that cross using update with the video?

    Thanks in advance!

    I don't know any tutorials, but more serious videographers say it is best to use only the manual focus.

    Trial and error is a good teacher, when it comes to video DSLR. You'll quickly learn that video Auto Focus is really bad with the 7 d and most of the people do not use it all together.

    The method that works for me is to use AF before the filming of the video and then adjust manually if you want to you to shoot the video. With the help of f/8 or f/11 to keep everything in short without having to keep the setting.

    More recent Canon DSLR's like the T4i, T5i, 70 d and SL1 have a "hybrid AF" that does a much better job of AF during video, but it is not yet as good as a camcorder

  • HP stream 11-d008tu: best practices for migrating to Windows 10?

    Hey there, I have a HP flow 11-d0008tu and received the notification I can upgrade to Windows 10. I want to do a clean install with a downloaded ISO but knowledge first of all, it is better to upgrade so that you get the activation done.

    Can someone give me some ideas on best practices for the upgrade? The stream has only 30GB HD so I have no recovery disk, I'll just do a recovery later on USB or SD card. When I do the upgrade can deselect recovery option or delete?

    Also, any other suggestions appreciated, especially which helps make effective for small HD

    See you soon

    Hi, I posted an installation procedure for Windows 10 fresh for the Tablet HP Stream here.  Also, I have a laptop 11 flow but do not have that yet. I think it must be the same because they both the same drive of mem 32 GB Hynix. A change would you probably want to use the 64-bit instead of 32-bit Windows 10 ISO file, the Tablet has only 1 GB of RAM.

  • Just improved m tips on best practices for sharing files on a Server 2008 std.

    The field contains about 15 machines with two domain controllers, one's data is the app files / print etc...  I just upgraded from 2003 to 2008 and want to get advice on best practices for the establishment of a group of file sharing. Basically I want each user to have their their own records, but also a staff; folder. Since I am usually accustomed to using windows Explorer, I would like to know if these actions can be done in the best conditions. Also I noticed on 2008 there is a feature of contacts. How can it be used? I would like to message or send an email to users their file locations. Also, I want to implement an admin at a lower level to handle the actions without making them far in on the server, not sure.

    I read a certain bbut I don't like test direct more because it can cause problems. So basically a way short and neat to manage shares using the MMC, as well as the way that I approach their mail from the server of their actions. Maybe what kind of access cintrol or permissions are suitable also for documents. Also how can I have them use office templates without changing the format of the model.

    THX

    g

    Hello 996vtwin,

    Thank you for visiting the Microsoft Answers site. The question you have posted is related to Windows Server and would be better suited to the Windows Server TechNet community. Please visit the link below to find a community that will support what ask you:

    http://social.technet.Microsoft.com/forums/en-us/category/WindowsServer

    Hope this helps J

    Adam
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think

  • Best practices for color use in Adobe CC?

    Hi all

    Is there an article that describes the best practices for use of color in Adobe CC?

    I produce a mixture of viewing online (PDF, for the most part) and real world print projects - often with the obligation for both. I recently updated my PANTONE + bridge books for the first time in ages and I am suddenly confused by the use of Lab colors in the Adobe Suite (Illustrator and InDesign).

    Everything I found online, looks like Lab color mode preferred to use because it is device independent. And perceptual (on screen), it looks much closer to the color, it is trying to represent. But when I mark a Spot color Illustrator rectangle using laboratory coordinates, to the sides of a rectangle using PANTONE + bridge CP and then export it to PDF, the version of CP to mix CMYK color corresponds exactly to my Pantone book - while the version of laboratory (after converted to CMYK using the ink Manager) is far away.

    I have this fantasy to manage only a single Illustrator or InDesign file for both worlds (PDF) printed and online. Is not possible in practice?

    Any info describing the basic definitions of the color modes - or even a book tracing more than use them in the real world - would be much appreciated!

    Thank you

    Bob

    Here are a few best practices you can already do.

    1 make sure that your color settings are synchronized on all applications.

    2. use a CMYK profile appropriate for your print output. Lab spot colors convert to CMYK values based on the CMYK icc profile.

    3. include icc profiles when save or export pdf files

    In theory, your imagination is possible today. It requires color management and the use of icc profiles. You can place RGB images in InDesign and use Pantone colors in your objects. The problem lies in the printers. If a printer uses a RIP with built in Pantone library, the colors will match when printing. Unfortunately, this kind of CUT is more expensive and not enough printers use them. Most of them is always manually approximate CMYK values composition given Pantone colors.

  • What are the best practices for a new employee to learn inside the instance of their business of Eloqua as efficiently as possible?

    We have companies everything changed at some point in our lives. And we all go through the process in the first weeks, where you feel new and are just trying to figure out how not to get lost on your way in the mornings.

    On top of that, trying to familiarize yourself with your new company Eloqua instance can be a daunting task, especially if it's a large organization.

    What are the best practices for new employees to learn as efficiently and effectively as possible?

    I am in this situation right now. Moved to a much larger organization. It is a huge task trying to understand all the ins and outs not only society, but also of the eloqua instance, especially when she is complex with many points of integration. I find that most of the learning happens when I really go do the work. I spent a ton of time going through the programs, documentation, integrations, etc., but after awhile, it's all just words on a page and not absorbed.

    The biggest thing that I recommend is to learn how and why things are made the way they are currently, ask lots of questions, don't assume not that things work the same as they did with your previous employer.

    Download some base in place level benchmarks to demonstrate additional improvement.

    Make a list of tasks in the long term. As a new pair of eyes, make a list of things you'd like to improve.

  • Best practices for building an infrastructure of APEX for 12 c

    Hi all

    Have we not the docs on best practices for building an infrastructure of APEX?

    Which means, for the production, it is acceptable to use Embedded PL as the listener, or we stick with the Listenr tested on Weblogic?

    Thank you

    Hi JCGO,.

    JCGO wrote:

    Hi all

    Have we not the docs on best practices for building an infrastructure of APEX?

    Which means, for the production, it is acceptable to use Embedded PL as the listener, or we stick with the Listenr tested on Weblogic?

    Thank you

    I agree with Scott's response '' it depends. '' It starts with the appropriate choice of a web listening port.

    You should discourage use EPG facility based in Production environments in accordance with the recommendation of the Oracle.

    Reference: See security considerations when you use the Embedded PL/SQL Gateway section.

    ADR (APEX Listener) + Oracle Weblogic Server sounds good, if you already have tried and have appropriate expertise to manage it.

    Also, you might consider what other facilities ADR based ADR + Apache Tomcat with Apache HTTP Server reverse proxy as described here:

    Dimitri Gielis Blog (Oracle Application Express - APEX): Prepare the architecture for the APEX 5.0 upgrade

    But it depends on Apache skills, you have within your organization.

    I hope this helps!

    Kind regards

    Kiran

  • Best-practice for hardware virtualization?

    Hardware virtualization is disabled by default when I create new virtual machines in my VMware clusters. But what are the best practices for this what settings are recommended? Are there reasons NOT to activate the hardware virtualization?

    IMO there is no advantage in allowing virtualization of hardware if you have no need for the virtual machine (for example, a virtual host of the ESXi).

    André

Maybe you are looking for