Multiple Comboboxes with single instance of Array Collection

First off - thanks to everyone for their contributions.  This forum provides a lot of good information.
I'm stuck on a particular problem and I suspect I'm not thinking about the issue correctly.
I'm developing a dynamic module that instantiates components at runtime based on an XML scheme.  Many of these components are drop-downs that are chained togther (a selection in one drives the population of the next)
I loop through the initial XML document to create and layout the components.  I have been using a single Array Collection to populate the drop-down.  This worked fine with the chained comboboxes since I only load one combox initially.  However, when I add a couple of static combo boxes, the arraycollection seemed to be binding to the orginal combobox.  For example, if I create 3 combo boxes they have drop-down values that display all 3 lists appended together.  I was a bit surprised because I didn't think that I could bind an Array Collection.  I certainly haven't defined a Binable ArrayCollection.
I thought I could solve the issue by simply creating a unique Array Collection at runtime - one for each element.  However, I don't think this is possible or I can't figure out how to create a new Array Collection with a dynamic name - something like this:
I was hoping this would work -
var newDropDown_[numOfElement]:ArrayCollection = new ArrayCollection(); 
I've tried to use a Dictionary object to store each ArrayCollection.  I couldn't get that to work properly.
Essentially - my code loops on the number of components to add:
for (var i:int = 0; i < numFormElements; i++)
          for (var j:int = 0; j < numvalues; j++)
                                var valuefield:String = 'value_' + [j+1];
                                var obj:Object=new Object();
                                obj.label=instFields[i][valuefield].@label;
                                obj.data=instFields[i][valuefield].@data;
                                newDropDown.addItemAt(obj,j);
Then I add the components:
          var c:ComboBox = new ComboBox ();
            c.labelField='label';
            c.name=numberOfElement.toString();                                  
            c.dataProvider=    newDropDown;
            _h1.addChild(c);
            numComboDropDwns.push(c);
I need a way of looping, getting data and populating each component independently??
Any ideas?
Thanks,
John

I went a different route and solved the issue.  For someone looking at a similar problem - this what I ended up doing:
I just loaded one array collection with data for all of the drop-downs on the form.  I then populated each dataprovider with individual elements from the array.
for (var i:int = 0; i < numFormElements; i++)
for (var j:int = 0; j < numvalues; j++)
                                var valuefield:String = 'value_' + [j+1];
                                var obj:Object=new Object();
                                obj.label=instFields[i][valuefield].@label;
                                obj.data=instFields[i][valuefield].@data;
                                newDropDown.addItemAt(obj,elementCounter);
                                elementCounter = elementCounter + 1;
I keep track of the element #, number of values for each element and the overall index for the array.
Each data provider is then loaded with the subset from the array:
for (var z:int = (_counter - _numvalues) ; z < _counter; z++)
                            var _label:String=    newDropDown.getItemAt(z).label.toString();
                            var _data:String = newDropDown.getItemAt(z).data.toString();
                            c.dataProvider.addItem({label:[_label],data:[_data]});
This seems to work nicely - each component is created and loaded with only their data.  I spent 3 days searching for a way to create a dynamic arraycollection at runtime.  I don't think it's possible - but I'm not sure it was the best method anyway.

Similar Messages

  • Can we create multiple application with single MSI(or Same MSI) in biztalk admin console ?

    Can we create multiple application with single MSI(or Same MSI) in biztalk admin console ?
    My client requirement is process 100 files  from biztalk with in 5 min ,actually it is taking 20 min .
    So I decided to created same instance of the application with multiple time in BTS admin console ,as I understand biztalk admin console never allow to install same
    schema’s with multiple  time .
    Any help can be  appreciate ..

    BizTalk will automatically process multiple messages on separate threads so you may need to tune your system. The following link should get you started:
    http://social.technet.microsoft.com/wiki/contents/articles/7801.biztalk-server-performance-tuning-optimization.aspx
    Another possibility is to set the Batch Size property on your receive location if the adapter uses batch size to determine how messages are picked up.  As an example, it you want  the MSMQ adapter to immediately pick up messages and start
    to process them, set the batch size to 1.
    You may also need to distribute the processing across multiple BizTalk servers by installing BizTalk on additional servers and joining the existing BizTalk group.
    David Downing... If this answers your question, please Mark as the Answer. If this post is helpful, please vote as helpful.

  • Single report with multiple queries OR multiple reports with single query

    Hello Experts,
    I have a confusion regarding Live Office connection for many days. I asked many people but did not get a concrete answer. I am re-posting this question here and expecting an answer this time.
    The product versions that I am using are as follows:
    FrontEnd:
      BOE XI 3.1 SP4 FP 4.1
      Xcelsius Enterprise 2008 SP4
    Backend:
      SAP BW 7.0 EHP1
    I have created a dashboard which is getting data from a webi report using LO connections.
    The webi report has five report parts which are populated by five different queries.
    Now my question is, when the five LO connections are refreshed, is the webi report refreshed five times or just once?
    If the report is refreshed five times, then I guess it is better to have five different webi reports containing single report part, because in that way we can prevent same query being executed multiple times.
    SO what is the best practice- to have a single report having multiple queries - OR - to create multiple webi reports with single query?
    Thanks and Regards,
    PASG

    HI
    I think Best Practice is Multiple reports with single query
    Any way If LO connections refresh 5 time the query will refresh 5 timesRegards
    Venkat

  • When iam loading multiple datatargets with single datasource request failed

    when iam loading multiple datatargets with single datasource request failed
    i want to delete the  bad request at a time in all datatargets

    Hi Neeraj,
    The only thing you can do is go in to theMonitor screen of that IP and select the datatargets from the Monitor screen.In the next screen you can see all the targets included in the IP at the top.But the only bad thing is you have to manually delete the Bad request only from each target.
    Regards
    Sandeep

  • SharePoint Designer workflow executing same lines\steps multiple time in single instance

    I am working SharePoint 2010 workflow. I am facing an issue.
    Problem:
    1) I have few workflows running on different situation
    2) Out of all workflows one is set to execute on "Item Created"
    3) This workflow having some lines to execute and then create an item and then wait for a change in field value.
    4) Expectation: This should create one instance and execute the lines\steps only once and wait for field change.
    5) Actual Out-Come: The workflow is executing the lines\steps three times in a single instance.
    6) The workflow history is showing the three time execution of all lines\steps using log to history.
    7) It is a SPD workflow so there is no while loop. but it behaving like while loop.
    8) On create Item, we are creating task, so it is creating three tasks. It is sending three emails and also we are appending text in title so text is appended three times.
    I did a lot of research but not able to find the solution.
    Please help.
    - Khan Abubakar Disclaimer: The opinions expressed herein are my own personal opinions and do not represent any others view in anyway.

    Hi Khan,
    According to your description, my understanding is that your workflow executed some actions three times.
    What actions did you for the problematic actions?
    If they are "Start Approval Process" action, please check whether there are multiple approvers for tasks. If yes, the action will create one task for each approver.
    Please create a new list and a new workflow based on the problematic workflow, test again, compare the result.
    For reproducing your issue, I suggest you provide more information about your list and workflow (detailed actions or some screenshots). It will make others in the forum easy to find a solution for you.
    Best Regards,
    Wendy
    Wendy Li
    TechNet Community Support

  • Multiple rows with single date

    I am using a CDC control task to extract and load data from our OLTP source to our Data Warehouse.
    For our Date dimension, we have a DateKey which is a
    DATETIME stamp (created using SSAS dimension wizard). Time is always 00:00:00 as a DATETIME
    value is required for populating the dates.
    Our fact table destination uses this DateKey as a FK.
    Our fact table OLTP data source contains multiple records with a single DATE and TIME field. This fine as I can convert the DATE field to a DATETIME using a derived column.
    However, as our Date dimension has granularity of a day, all we require for our fact table is the most recent daily record from our OLTP data source.
    At present, the data flow task is attempting to write all records and failing on PK constraint.
    How would I go about traversing all records for each date and loading only the most recent for that day? Is there a better way to go about this?

    If you wish to get only one record for today, you can simply use in your source query:
    SELECT TOP 1 ... FROM OLTPdata ORDER BY DEATETIMEcolumn DESC
    if you need one record for each date, you may use ranking functions:
    WITH Q AS (
    SELECT
    ROW_NUMBER() OVER (PARTITION BY CAST(DateTimeColumn AS DATE) ORDER BY DateTimeColumn DESC, some tie breaker column) AS ROWNUM,
    FROM  OLTPData
    SELECT * FROM Q WHERE ROWNUM=1

  • Seeding multiple databases with single Entity Framework context

    I am developing a single-instance, multi-tenant web application, with a SQL database using Entity Framework 6 Code-First. 
    I want to have a separate database for each client, generated from the same EF models, with a single DbContext. The database to connect to will be determined by the subdomain that the client is using the web app from. 
    This seems to work fine and the correct database is connected to depending on the subdomain. However my issue is seeding the databases with data. This is the code I have:
    foreach (var connString in ConfigurationManager.ConnectionStrings.Cast<ConnectionStringSettings>()))
    Configuration.PerformDatabaseMigration(connString.Name);
    This then calls the PerformDatabaseMigration method: 
    public class Configuration : DbMigrationsConfiguration<DataContext>
    public Configuration()
    AutomaticMigrationsEnabled = false;
    AutomaticMigrationDataLossAllowed = false;
    public static void PerformDatabaseMigration(string connStringName)
    var databaseInitialiser = new Configuration { TargetDatabase = new DbConnectionInfo(connStringName) };
    var dbMigrator = new DbMigrator(databaseInitialiser);
    dbMigrator.Update();
    protected override void Seed(DataContext context)
    base.Seed(context);
    var superAdmin = new User { Id = 1, UserName = "SuperAdmin" };
    context.Users.AddOrUpdate(superAdmin);
    The issue is that when seeding this data for the second database, the context passed into the Seed method already has the admin user added to the `DbSet<User>` property of the context, even though the context is for the second databse connection, not
    the first. It appears that the context is not being cleared from seeding the first database, and so I receive a `DbUpdateException`, as my User.Username field is a unique index.
    Cannot insert duplicate key row in object 'dbo.Users' with unique index 'IX_UserName'. The duplicate key value is (SuperAdmin).\r\nThe statement has been terminated.
    public class User : ModelBase, IUserIdentity, IPrincipal, IIdentity 
        [Index(IsUnique = true)]     
      [Required]     
      [StringLength(40)]       
    public string UserName { get; set; }

    Hello Attune,
    >>This seems to work fine and the correct database is connected to depending on the subdomain. However my issue is seeding the databases with data.
    Is that you firstly create these databases and then call the PerformDatabaseMigration method to seed these database with data? Do you have a try to seed these database data when creating the database with AutomaticMigrationsEnabled = true; with your provided
    configuration class, I tested it and it could work as seeding same data to different database:
    internal sealed class Configuration : DbMigrationsConfiguration<CFs.CFContext>
    public Configuration()
    AutomaticMigrationsEnabled = true;
    public static void PerformDatabaseMigration(string connStringName)
    var databaseInitialiser = new Configuration { TargetDatabase = new DbConnectionInfo(connStringName) };
    var dbMigrator = new DbMigrator(databaseInitialiser);
    dbMigrator.Update();
    protected override void Seed(CFs.CFContext context)
    base.Seed(context);
    var superAdmin = new ApplicationUser() { ApplicationUserID = 1, FirstName = "", LastName = "" };
    context.ApplicationUsers.AddOrUpdate(superAdmin);
    Regards.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Apply multiple effects to multiple objects with single click box

    I would like to click on a click box and have one object appear and another object disappear. I guess what I'd like to do is apply effects to multiple objects with a single click box. Is that possible?
    Thank you.

    Welcome to our community
    Sure it can be done but you won't use effects to do it.
    When you insert an object in Captivate, you have an option to enable or disable Visibility. You also have an option to name the object. So you would give the object a meaningful name and clear the Visibility option to "hide" it until needed.
    Then you would create an Advanced Action that would hide some objects and show others.
    After that, you would assign the Advanced Action to a Click Box or a Button or some other event.
    Cheers... Rick
    Helpful and Handy Links
    Captivate Wish Form/Bug Reporting Form
    Adobe Certified Captivate Training
    SorcerStone Blog
    Captivate eBooks

  • Multiple Price with Single Item

    Dear All,
    I work for Logistics company and they have implemented AR,AP,GL,OM,Purchasing...running smoothly.
    Now,they want to create multiple prices for single item,pls find below scenario ,
    A)     Business Process:
    Generally, customer goods will be split and sent in different trains. Then, for same destination & quantity we will get different amount.
    Note: Calculation done by Railways based on variable factors (like penalty charges for over weight or under weight).
    So everyday, every bill have different amount for same quantity and destination will be computed and given by railways.
    B) Current Process in Oracle:
    End user will select item and enter manually.
    C) Client Requirement:
    Needs to create single item with multiple prices
    Note: Item code and price list should be constant due to business requirement.
    I just wondering,how financial company manage price fluactutations...
    Kindly help me out to sort this issue pls.
    Regards,
    Kumar

    Hi Anil/Amit,
    O.K. accept that VK11 is for sales. But when I enter multiple records in VK11 it is getting saved. But same thing is not happening for MEK1. Is there any configuration need to change for the MEk1?
    Please let me know is there any other way or tcode to save the condition with multiple values for single line items.
    Regards,
    Praveen,

  • Update multiple columns with single update statement..

    HI all,
    i am reading the columns value from different table but i want to update it with signle update statement..
    such as how to update multiple columns (50 columns) of table with single update statement .. is there any sql statement available i know it how to do with pl/sql..

    As I understood, may be this. Here i am updating ename,sal, comm columns all at once.
    SQL> select * from emp where empno=7369;
         EMPNO ENAME      JOB              MGR HIREDATE                   SAL       COMM     DEPTNO
          7369 SMITH      CLERK           7902 17/12/1980 12:00:00        800                    20
    SQL> UPDATE emp
      2     SET ename = lower (ename),
      3         sal = sal + 1000,
      4         comm = 100
      5   WHERE empno = 7369;
    1 row updated.
    SQL> select * from emp where empno=7369;
         EMPNO ENAME      JOB              MGR HIREDATE                   SAL       COMM     DEPTNO
          7369 smith      CLERK           7902 17/12/1980 12:00:00       1800        100         20
    SQL> UPDATE emp
      2     SET ename = (SELECT 'ABCD' FROM DUAL),
      3         sal = (SELECT 1000 FROM DUAL),
      4         comm = (SELECT 100 FROM DUAL)
      5   WHERE empno = 7369;
    1 row updated.

  • Inserting multiple rows with single insert statement ?

    Hi ,,
    Consider a PL/SQL procedure.
    I want to pass an array of values and insert in a table with a single statement.
    Moreover I want to call this procedure to insert multiple rows from OCI program.
    Can some body help ? :(
    Thanks
    Chandu

    Hi Vincent,
    Regular array insert which you have mentioned works in case of insert statement(This is to eliminate multiple calls to server)
    Will it work for passing array to Stored procedure, in this case procedure will be called only once with an array.
    It will be of great help if you give an example.
    Thanks
    Chandra

  • Connection pooling & multiple apps in single instance - many sessions

    Any feedback would be much appreciated from anyone with experience already with this situation and/or can provide some insight on this:
    Adhering to the trend of consolidating instances, we have a single consolidated instance with multiple apps. With connection pooling (we use apache & mod_perl), I suppose you have an option of creating some oracle db accounts that can be shared among multiple apps - that benefits you in reducing the numbers of total pooled db connections to the instance - but one very big drawback is that you have some apps, if sharing generic db userids, having access to tables they have no need to access.
    On another hand, you have the option (which is the approach we've taken thus far and, in my view, is definitely the way to go) of a distinct oracle account for each app - on the downside, that could produce many more total db sessions (& os processes) on the server as each new set of unique persistent pooled connections are created - but it benefits you in terms of security - which has a lot of weight - since each app account only has access to what it needs & nothing beyond that (the "least privilege" concept).
    We're not an "amazon.com" so we haven't had to deal with thousands of sessions within an instance so there's an element of the unknown here for us - some questions I have are: How can I accurately predict how many db sessions (& os processes) this particular solaris server can support? I realize kernel parameters need to be set high enough for this sort of environment but simply setting the parameters cannot be a true indication of what the server can support. How much memory is required for thousands of sessions? I'm trying to gauge how many sessions & processes we can currently support - and at what point we'll need additional memory, or an updated server, or at what point we need to start thinking about an additional server environment for new apps.
    I realize connection pooling is, by it nature, reducing the overall sessions required but as each unique db account is created, there will be set of persistent sessions out there and that will grow.
    Also if you have any insight on other things to think about when heading into the direction of lots of sessions (beyond kernel settings, other OS or db parameters that need to be reviewed, or some features to enable).
    I'm rambling so I'll stop right there; sorry about the length of the post. It's possible that the things to look at and consider are pretty straight-forward.
    Thanks in advance for any feedback on any of the above.
    -Rick Papaj
    [email protected]

    You better check the documentation available on OTN
    http://download-west.oracle.com/docs/cd/B25221_03/web.1013/b14432/threadpool.htm
    There are several options you can setup with pooling.
    hope this helps.

  • Use multiple iPhones with 1 instance of iTunes?

    Hi Guys,
    Be gentle with me as this is my first post and I'm not sure if this is correct discussion board, anyhow...
    I have been tasked by my bosses to do some research on the possibility of using iPhones as a business communication, email and document device to be used by the senior management of my firm.
    Basically, what we need is to be able to "sync" calenders, receive email, share documentation and contacts all using one instance of iTunes. This is to enable us to keep their data uptodate and identical etc.
    The users also have the option of using iTunes at home to do non business work i.e. upload music and videos.
    I am aware of the apple configuration tool to create multiple but identical "profiles" that can be applied to each and every phone.
    My questions are:
    1. Can we use one iTunes account (billed to the company using one credit card?) that can used by several staff at home? Or do we need to create accounts for every user?
    2. Is there any applications that can help us "sync" all phones either connected to our business version of iTunes or even "over the air"? Bearing in mind that if the user connects to iTunes at home it doesn't wipe important data!
    3. Can anyone recommend applications that we can preload onto the phones that will assist the user becoming familiar with the functionality of the iPhone? This would help us as we wouldn't have to show each and every user how the iPhone works!
    4. Lastly any advice on applications that would give us the ability to control and maintain all these instances of iPhones easily and without giving us a major headache?
    Thank you for any advice.
    MC

    You should check into MobileMe. It's an Apple service that allows you to sync mail, contacts, and calendars over the air to your iPhone.
    My wife and I both have iPhones and use MobileMe to keep them identical in terms of contacts and calendars.
    You could use one iTunes account with multiple iPhones, however, you're not going to get over the air syncing.
    Message was edited by: Benjamin Brossard

  • What is the best approach to handle multiple FK with single table.

    If two tables are joined with each other with more than one ways, for example
    MAIN table is (col1, col2,....coln, person_creator_id, person_modifier_id)
    PERSON table is (person_id, name, address,........ phone) etc
    At database level PERSON_CREATOR_FK and PERSON_MODIFIER_FK are defined.
    Objective is to create a report that shows
    col1, col2...coln, person creator name, person modifier name
    If above two objects are imported with FKs in a EUL and discoverer plus is used to create above report. On first inclusion of person name discoverer plus will ask you to pick the join (provided the checkbox to disable this feature is not checked). Once you pick 'person creator' join it will never allow you to pick person modifier name.
    One solution is two create a custom folder with query like
    select col1, col2,...coln,
    pc.name, pc.address,.... pc.phone
    pm.name, pm.address,.... pm.phone
    from main m,
    person pc,
    person pm
    where m.person_id_creator = pc.person_id
    and m.person_id_modifier = pm.person_id
    Second solution is to import the PERSON folder twice in EUL (optionally named one as perosn_creator and other as person_modifier) and manually define one join per table. i.e. join MAIN with PERSON_CREATOR on person_creator_fk and join MAIN with PERSON_MODIFIER table using person_modifier_fk.
    Now discoverer plus will let you drag Name from each person folder without needing to resolve multiple joins.
    Question is, what approach is better OR is there a better way?
    With solution 1 you will not be able to use functions on folder items.
    With solution 2 there is a EUL design overhead of including same object multiple times and then manually defining all join (or deleting unwanted joins), and this could be a problem when you have person_modifier and person_creator in nearly all tables. It could be more complicated if person table is further linked other tables and users want to see that information too. (for instance, if person address is stored in LOCATION table joined with location_id and user want to see both creator address and modifier address....now you will have to create multiple LOCATION folders).
    A third solution could be to register a function in discoverer that return person name when person_id is passed. This will work perfectly for above requirement but a down side is the report will run slower if they need filters on person names (then function will be used in where clause). Also, this solution is very specific to above scenario, it will not work if you want the report developer the freedom to pick any attribute from person table (lets say, person table contain 50 attributes then its not a good idea to register 50 functions).
    Any comments/suggestion will be appreciated.
    thanks

    Hi
    In a roundabout way you have really answered your own question :-)
    In my opinion, the best approach, although by all means not the only approach - see below) would be to have the object loaded as two folders with one join going to the first folder and the second join to the other folder. You would of course name the folders appropriately.
    Here's a workflow that I use all of the time and one that I teach when I'm giving Discoverer Administrator training. It might help you:
    1. Bring in the PERSON folder to begin with
    2. Make all necessary adjustments to bring it up to deployment standard. These adjustments would be: folder name (E.g PERSON_CREATOR), item names, item placement, default positions, default aggregation and so on.
    3. Create or assign the required lists of values
    4. Create any required calculations
    5. Create any required conditions
    6. Create the first join from this folder to MAIN.
    7. Click on the heading for the folder and press CTRL-C.
    8. Click on the heading for the business area and press CTRL-V. A second copy of the folder, complete with all of the adjustments you made earlier will be inserted into the business area.
    Note: joins are not copied, everything else is.
    9. Rename this folder to say PERSON_MODIFIED
    10. Rename the items as appropriate
    11. Add a join from this folder to MAIN - you're done
    Other ideas that I have used and work well would be to use a database view or create a complex folder. Either will work, In both cases you would need to join on some other column other than the ones you referred earlier.
    I hope this helps
    Best wishes
    Michael

  • Printing multiple PDF with single event at client side

    Hello,
    I have a requirement where I must print multiple different pre-populated Adobe forms (e.g. populated with a name/address) from ABAP WD. These need to be printed at a client side printer, and they don't want to see them first (that would be easy). Just print multiple forms from a single button click.
    Has anyone had this requirement? My main question is not how to pre-populate the pdfSource, but how to have the user prompted for a printer 1x and then have the forms sent straight to the local printer without displaying.
    Thanks!

    Sorry to 'hijack' this thread but i was trying to do the same thing but failed EVERYTIME!!!
    When i tried to merge just 2 multiple-paged(abt 20+ pages each) pdfs into one, it simply crashed Preview at the end of the process! Tried 'Save', 'Save all' & 'Print as PDF' but all doesn't work!
    I tried Combine PDF.app & Automator.app and the same thing happened. The combining process CRASHED the app i used...
    Help needed!

Maybe you are looking for

  • Printer Queue Not Quitting

    I'm not sure if it's my system that causes this to happen or if this is just the way Mac OS X 10.5.6 and 10.5.7 are supposed to work. But every time I send a print job to any printer (we have three of them - one on ethernet and two USB connected prin

  • Problem to connect Developer Suite forms 9 with Oracle 9i Database

    Hi, I have a problem to connect Developer Suite Release 2 forms 9 with Oracle 9i database release 1. I have done net8 easy configuration but no success. Can any one help me to solve this problem. Thanks in Advance Nasir Ali Mughal

  • Reuse message flow

    I have a proxy A (listening on Queue A) that has a message flow with a number of actions (Message Flow C) and a business service X. I need to create a second proxy B (listening on Queue B) that has an identical message flow as 'C' and business servic

  • Account assignment order-related intercompany billing (SD-EDI-OM-IV)

    Hello! Intercompany billing is being generated and posted and intercompany accounts payable (IC AP) document is parked through IDOC and when trying to post this IC AP in the receiving company code is giving an error: "Account 30069520 requires an ass

  • Can I password protect access to Time Machine??

    Hey guys .. Ive just switched over from PC to mac. So far Im loving it and doubt Ill ever use a PC again. I do have a question about Time Machine though. Is there a way to password protect access to the Time Machine interface ? Cheers Darren