editing an item in the collection specific arraycollection

What is the best way to update a specific item in the collection ArrayCollection. The only way I've been able to do is using the table-style syntax, but it will not ship the events needed to synchronize a DataGrid and I must 'refresh()' ArrayCollection collection. Y at - it somehting miss me in the ArrayCollection collection API?

Thaks for the help!

Carlos

Try to use getItemAt() instead of using the syntax of support.

Tracy

Tags: Flex

Similar Questions

  • Too many items in the collection? / "content not found".

    I'm creating an application and I have 52 pages of editorial content that charge very well, then I started to add in our ads and to get the screen to keep "content not found" on my Preview app. I removed these ads and started adding small amounts of back in, I discovered that I can only add in 48 ads in addition to my 52 editorial pages until I get the same answer "content not found" on my iPad. Is there a file size limit or other moderation I don't know for the preview of the app on your iPad? Is there a work around?

    Thank you

    Shayna

    After still messing around, I think I discovered a ceiling of 100 article by collection, is that correct?

    There is no limit on the number of items in a collection. I suggest calling the technical support service with this, you can find the coordinates the DPS looking into the rail on the left and selecting the support portal.

    Neil

  • MenuBar: How to add items to the collection through actionscript arrayCollection?

    I want to use a menu to my application menu bar.  I have a list of menu items I want to implement for the menu bar, but I need to configure them using actionscript so I can use conditional statements for menu items to be added depending on the access level of the user.

    Here is the generic view of what I want

    < script >

    mBarAC.addItem ({label: "1", data: "Label1"});

    mBarAC.addItem({label:"Label2",data:"Label2"});)

    If (userObj.access == 'admin') {}

    mBarAC.addItem ({label: "3", data: "Label3"});

    }

    < / script

    < mx:MenuBar id = "mBar" dataProvider = "{mBarAC}" labelField="@label"/ >

    But this translates [object Object] for each menu item.  So, how can I fix this so that it displays the labels I want?

    I think that the wording field should simply be 'label' rather than '@label '. The @ symbol is only required during parsing of an attribute in an XML node.

  • Get the number of items in a collection

    I have an associative array that is indexed by VARCHAR2. I want to know the number of items in the collection that have value of index like '% IMSI_ '. Is there a direct way to achieve this, or I have to loop through the collection and get the number in a variable. I use 11g.

    The Count() method gives the total number of elements in the array (including null values).

    If you want to count how many names or values correspond to a filter predicate, you must do it manually.

  • How to find the Index of the item in the XMLListCollection

    Hello

    I have a burning question here, and I wonder if anyone has tried to do.
    I have a XML file which is read in xml, and for each collection names that appear in the file (previously stated elsewhere), I tried to remove the item.

    However, it gives me either-1, if I trace (slc.getItemIndex (xml.@name) m:System.NET.SocketAddress.ToString ()); where they exist, or tell me #3594, as shown in the below error:

    Here is the code:

    private void checkBox_change(event:Event):void {}
    XLC = new XMLListCollection (searchResult... book);
    SearchResult = Len... Publisher.length ();
    for (idx = 0; idx < len; idx ++) {}
    If (checkbox [idx] .selected == false) {}
    for each {(name input_name2)
    for each {(xml in xlc)
    If ((xml.@name == checkBox[idx].label) & & (xml.@pub == name)) {}
    trace (XML. GetItemIndex (XML.@Name). ToString());
    I get an error that says: 3594: getItemIndex is not a method of the dynamic class XML.

    }
    }
    }
    }
    }
    }

    Could someone please give me some advice on how to remove the item you want? I don't know how to use the splice.

    Thanks for your help.

    Alice

    getItemIndex() requires that you pass in a reference to an item in the collection, not a string.

    And it is a method of XMLListCollection (and collection arrayCollection), not a method of XML.

    As Michael says, using an e4x expression directly with delete is the best way to go.  Note to use delete, you must use a direct expression.  You can not put the node you want to remove in a variable and then delete that.

  • Help with master / multiple details from the collections

    Hello

    I am trying to create multiple details for my master report using collections by the method of Blarman on https://community.oracle.com/thread/1091458. This is my first shot of dagger to collections and I seem to be missing something, but for the life of me, I don't know what. I managed to get the display of collection for the captain, but when this inserts / updates, only the first collection seq_id is already updated or inserted the user entry. I suspect that I'm doing something stupid on BCM_POPULATE_TICKET_REF_COL to avoid updates to all items in the collection, but after much research and trying, I do not know what. Any suggestions would be much appreciated.

    Thank you!
    Michelle

    1. structure of the table

    CREATE THE TABLE DBSCH1. BCM_FINDINGS
    (
    NUMBER OF FINDINGS_ID
    VARCHAR2 (200 BYTE) WORKING GROUP,
    VARCHAR2 (200 BYTE) TEAM.
    DIVISION VARCHAR2 (200 BYTE),
    RAISED_BY VARCHAR2 (200 BYTE),
    ...
    )

    CREATE THE TABLE DBSCH1. BCM_COMMENTS
    (
    NUMBER OF COMMENTS_ID
    COMMENTS VARCHAR2 (4000 BYTE),
    FINDINGS_ID NUMBER NOT NULL
    )

    CREATE THE TABLE DBSCH1. BCM_TICKET_REF
    (
    NUMBER OF TICKET_REF_ID
    TOOL VARCHAR2 (4000 BYTE),
    TICKET_REF VARCHAR2 (4000 BYTE),
    LINK VARCHAR2 (4000 BYTE),
    FINDINGS_ID NUMBER NOT NULL
    )


    2 created master / detail report on BCM_FINDINGS & BCM_COMMENTS.

    3. create the BCM_TICKET_REF collection:

    CREATE or REPLACE PROCEDURE BCM_CREATE_TICKET_REF_COL (full bcm_findings_id)
    as
    I have pls_integer;
    CNTR pls_integer: = 5;
    Start
    apex_collection.create_or_truncate_collection ('POPULATE_TICKET_REF_COL');
    for Rec in)
    Select the tool, ticket_ref, link, ticket_ref_id, findings_id
    of bcm_ticket_ref
    where FINDINGS_ID = bcm_findings_id

    )
    loop
    () apex_collection.add_member
    p_collection_name = > 'POPULATE_TICKET_REF_COL ',.
    p_c030 = > Rec.ticket_ref_id,--primary key
    p_c031 = > Rec.tool, - placeholder text
    p_c032 = > Rec.ticket_ref, - placeholder text
    p_c033 = > Rec.link, - placeholder text
    p_c034 = > Rec.findings_id fk - space
    );
    end loop;
    because me in 1.cntr
    loop
    () apex_collection.add_member
    p_collection_name = > 'POPULATE_TICKET_REF_COL ',.
    p_c030 = > 0, - designates this as a new registration
    p_c031 = > NULL,-placeholder text
    p_c032 = > NULL,-placeholder text
    p_c033 = > NULL,-placeholder text
    p_c034 = > bcm_findings_id - number placeholder
    );
    end loop;
    end BCM_CREATE_TICKET_REF_COL;

    Support - before the header:

    BEGIN
    BCM_CREATE_TICKET_REF_COL (bcm_findings_id = >: P2_FINDINGS_ID);
    END;


    4. definition of standard report for BCM_TICKET_REF region:
    SELECT rownum,
    apex_item. Hidden (30, c030), - ticket_ref_id
    apex_item. Text (31, c031, 20, 20) tool.
    apex_item. Text (32, c032, 15, 15) ticket_ref,.
    apex_item. Text (33, c033, 15, 15) link.
    apex_item. Hidden (34, c034) findings_id
    OF APEX_COLLECTIONS
    WHERE COLLECTION_NAME = "POPULATE_TICKET_REF_COL."

    5. get user input for the update of the collection BCM_TICKET_REF
    CREATE OR REPLACE PROCEDURE BCM_POPULATE_TICKET_REF_COL
    AS
    j pls_integer: = 0;
    Start
    for j1 in)
    Select seq_id apex_collections
    where collection_name = "POPULATE_TICKET_REF_COL."
    the order of seq_id loop)
    j: = j + 1;
    -(number) ticket_ref_id
    apex_collection.update_member_attribute (p_collection_name = > 'POPULATE_TICKET_REF_COL',)
    p_seq = > j1.seq_id, p_attr_number = 30, p_attr_value = > wwv_flow.g_f30 (j));
    -tool (text)
    apex_collection.update_member_attribute (p_collection_name = > 'POPULATE_TICKET_REF_COL',)
    p_seq = > j1.seq_id p_attr_number = > 31, p_attr_value = > wwv_flow.g_f31 (j));
    -ticket_ref (text)
    apex_collection.update_member_attribute (p_collection_name = > 'POPULATE_TICKET_REF_COL',)
    p_seq = > j1.seq_id p_attr_number = > 32, p_attr_value = > wwv_flow.g_f32 (j));
    -link (text)
    apex_collection.update_member_attribute (p_collection_name = > 'POPULATE_TICKET_REF_COL',)
    p_seq = > j1.seq_id p_attr_number = > 33, p_attr_value = > wwv_flow.g_f33 (j));
    -(number) findings_id
    apex_collection.update_member_attribute (p_collection_name = > 'POPULATE_TICKET_REF_COL',)
    p_seq = > j1.seq_id p_attr_number = > 34, p_attr_value = > wwv_flow.g_f34 (j));
    apex_application.g_print_success_message: = "loop COUNTER" | j;
    end loop;
    end;

    On present - before the calculations and validations

    BEGIN
    BCM_POPULATE_TICKET_REF_COL;
    END;


    6 update DB with the data in the collection BCM_TICKET_REF
    CREATE OR REPLACE PROCEDURE DBSCH1. BCM_UPDATE_TICKET_REF
    AS
    j pls_integer: = 0;
    Start
    -Obtaining records from Collection
    for y in (select TO_NUMBER (c030) ticket_ref_id,
    C031 tool,
    C032 ticket_ref,
    C033 link,
    TO_NUMBER (c034) findings_id
    OF APEX_COLLECTIONS
    WHERE collection_name = "POPULATE_TICKET_REF_COL") loop
    j: = j + 1;
    If y.ticket_ref_id = 0 then - new record
    insert into BCM_TICKET_REF (ticket_ref_id, tool, ticket_ref, link, findings_id)
    values (BCM_TICKET_REF_SEQ.nextval, y.tool, y.ticket_ref, y.link, y.findings_id);
    APEX_DEBUG. MESSAGE (p_message = > 'INSERT the LOOP COUNTER': j);
    "exit";
    elsif y.ticket_ref_id > 0 then - existing record
    Update BCM_TICKET_REF
    adjustment tool = y.tool,
    ticket_ref = y.ticket_ref,
    link = y.link,
    findings_id = y.findings_id
    where ticket_ref_id = y.ticket_ref_id;
    APEX_DEBUG. MESSAGE (p_message = > 'UPDATE the LOOP COUNTER': j);
    "exit";
    on the other
    APEX_DEBUG. MESSAGE (p_message = > "NUTHIN'");
    "exit";
    end if;
    end loop;
    end;

    Present on - after calculations and validations

    BEGIN
    BCM_UPDATE_TICKET_REF;
    END;

    HA! Well it took me several tries, but I finally saw him, you have a 'out' right after insertion (and updated).  That could leave the loop and record #2 would never happen.

    Just remove it. In your case you are inserting/updating all your lines.

    -Jorge

  • remove items from a collection

    Hi all

    I have a record type, and I want to delete items, if second and third attribute of the current record is the same as an attribute of second and third the previous record. Here is an example:

    declare
      type t_serv is record (
        a varchar2(10),
        b varchar2(10),
        c number(5),
        d number(5)
      );
      
      type t_serv_tab is table of t_serv;
      x t_serv_tab;
    begin
      x := new t_serv_tab();
      x.extend;
      
      x(x.last).a := 'DSL';
      x(x.last).b := 'ADSL';
      x(x.last).c := 100;
      x(x.last).d := 20;
      
      x.extend;
      x(x.last).a := 'DSL';
      x(x.last).b := 'ADSL';
      x(x.last).c := null;
      x(x.last).d := 20;
      
      x.extend;
      x(x.last).a := 'IPTV';
      x(x.last).b := 'N/A';
      x(x.last).c := null;
      x(x.last).d := null;
      
      x.extend;
      x(x.last).a := 'CABLE';
      x(x.last).b := 'CATV_FTTH';
      x(x.last).c := 50;
      x(x.last).d := null;
      
      x.extend;
      x(x.last).a := 'DSL';
      x(x.last).b := 'VDSL';
      x(x.last).c := 100;
      x(x.last).d := 20;
      
      x.extend;
      x(x.last).a := 'DSL';
      x(x.last).b := 'VDSL';
      x(x.last).c := 100;
      x(x.last).d := null;
      
    -- in this case, elements from 2nd and 6th position are deleted, as they have similar "a" and "b" attributes as the previous record's "a" and "b"
      for i in x.first..x.last loop
        if i>1 then -- if I don't put this, I got an Subscript outside limit error
          if x(i).a = x(i-1).a and x(i).b = x(i-1).b then
            x.delete(i);
          end if;
        end if;
      end loop;
      
      -- print the final collection (should have 4 elements)
      for j in x.first..x.last loop
        dbms_output.put_line(x(j).a||', '||x(j).b||', '||x(j).c||', '||x(j).d);
      end loop;
    end;
    

    The problem is that I'm me ORA - 01403 No. data found error. And I understand why, because the last loop, loops within all the elements, but the 2nd and 6th items from the collection are deleted before.

    How can I solve this problem and to print the 4 remaining items?

    Thank you!

    The collections are rare objects, so unless you know collection has no deficiencies you should not use the LOOP for first time (before deletion) you know collection has no gaps, so you can use the FOR LOOP. However, since you remove elements, previous element of SEO via i - 1 is false, because I have element - 1 can be deleted. You must save the last element not removed. Now your impression share must assume at least an element has been removed and the collection is sparse (present gaps). Therefore, you must use LOOP, no LOOPS and use methods NEXT and LAST to iterate over the collection:

    declare

    type t_serv is (record

    a varchar2 (10),

    b varchar2 (10),

    c number (5),

    d number (5)

    );

    type t_serv_tab is table of the t_serv;

    x t_serv_tab;

    number of prev_i;

    Start

    x: = new t_serv_tab();

    x.extend;

    x (x.last) .to: = "READ";

    x (x.last) .b: = "ADSL"

    x (x.last) .c: = 100;

    x (x.last) .d: = 20;

    x.extend;

    x (x.last) .to: = "READ";

    x (x.last) .b: = "ADSL"

    x (x.last) .c: = null;

    x (x.last) .d: = 20;

    x.extend;

    x (x.last) .to: = 'IPTV ';

    x (x.last) .b: = "n/a";

    x (x.last) .c: = null;

    x (x.last) .d: = null;

    x.extend;

    x (x.last) .to: = "CABLE."

    x (x.last) .b: = "CATV_FTTH";

    x (x.last) .c: = 50;

    x (x.last) .d: = null;

    x.extend;

    x (x.last) .to: = "READ";

    x (x.last) .b: = 'VDSL.

    x (x.last) .c: = 100;

    x (x.last) .d: = 20;

    x.extend;

    x (x.last) .to: = "READ";

    x (x.last) .b: = 'VDSL.

    x (x.last) .c: = 100;

    x (x.last) .d: = null;

    prev_i: = 1;

    I'm looping 2.x.last

    If x (i) (prev_i) .to .to = x and x (i) .b = x (prev_i) .b

    then

    x.Delete (i);

    on the other

    prev_i: = i;

    end if;

    end loop;

    -print the final collection (must have 4 elements)

    prev_i: = x.first;

    loop

    dbms_output.put_line (x (prev_i) .to | ',' | x (prev_i) .b | ',' | x (prev_i) .c | ',' | x (prev_i) .d);

    When the output prev_i = x.last;

    prev_i: = x.next (prev_i);

    end loop;

    end;

    /

    Scott@pdb1orcl12 > /.
    DSL, ADSL, 100, 20
    IPTV, N/A,
    CABLE, CATV_FTTH, 50.
    ADSL, VDSL, 100, 20

    PL/SQL procedure successfully completed.

    Scott@pdb1orcl12 >

    SY.

  • Anyone has an idea how to manually remove items that do not appear in the Collection, but take place on the device. Specifically, an audio book downloaded via Overdrive?

    Anyone has an idea how to manually remove items that do not appear in the Collection, but take place on the device.  Specifically, an audio book downloaded via Overdrive?

    Hello

    1. what type of files are in the audio book? Could you provide me with the file extensions?
     
    If you delete the information or files audio books could not show some information. I wouldn't recommend allows you to delete the files. If you want to remove them, you can contact overdrive support.

    Hope this information helps.

    Thank you, and in what concerns:
    Shekhar S - Microsoft technical support.

    Visit our Microsoft answers feedback Forum and let us know what you think.
    If this post can help solve your problem, please click the 'Mark as answer' or 'Useful' at the top of this message. Marking a post as answer, or relatively useful, you help others find the answer more quickly.

  • Remove item in the ArrayCollection collection

    Hello!

    Fact: myAC [3] = null actually remove the item from the AC?

    And by this I mean to remove completely the element with key 3.

    For example, if the captain had 5 items: 0,1,2,3,4, myAC [3] = null not what happens at HQ?

    (A) 0,1,2,4

    -or-

    (B) 0,1,2,3, where 3 is the former 4?

    Thank you!

    No it's not.

    This will just set the third element to null. If neither A or B will occur.

    The result will be 0,1,2,3,4, with myAC [3] is nothing.

    Removing an element from a collection ArrayCollection should be done using the removeItemAt method.

  • What is the best way to Exchange items in the arraycollection collection

    What's the more simple to swap items in a collection arraycollection? , I want to do this becaue I write my own sort bubble.

    public function swapItemsAt(fromIndex:Number, toIndex:Number, collection:ListCollectionView):void{               var fromItem:Object = collection.getItemAt(fromIndex);               var toItem:Object = collection.getItemAt(toIndex);
    
                   collection.setItemAt(fromItem, toIndex)               collection.setItemAt(toItem, fromIndex);
    
              }
    
  • Different "views" of the same collection of ArrayCollection

    Hello

    How would be the best way to do this?

    I'm going to simpify the problem, so it's quite fictitious...

    Let's say I have a class, student:

    public class student

    {

    public var name: String;

    public var isActive:Boolean;

    public var averageGrade:int; 0 = 1 A = 2 B = C, 3 = D (or other)

    public var likesCabbage:Boolean;

    }

    I have a collection of all students in my school, called allStudents ArrayCollection.

    Now, I want to display on a single screen, several views of this collection ArrayCollection:

    1. all students (IE not filtered)

    2. students where isActive = true;

    3. students with an average grade of B or above

    4. students who like cabbage.

    Obviously, if I simply apply a filter to the collection ArrayCollection, it will have an impact on all of these points of view. So I need basically a filter that is limited to each component.

    I could copy the ArrayCollection collection four times (a loop in the original and using addItem() to add each item to the new collections, so that they are not related) and apply a filter to each new collection, but this seems messy - and among other problems, the ArrayCollections news will not be linked to the original, so if this changes, others will not automatically be updated.

    Is there a best practice for this situation?

    Thank you!

    ListCollectionView is your friend!

    var unfiltered: ListCollectionView = new ListCollectionView (mySourceAC.list);

    var active: ListCollectionView = new ListCollectionView (mySourceAC.list);

    active. FilterFunction = activeFilterFunction;

    class var: ListCollectionView = new ListCollectionView (mySourceAC.list);

    graded.filterFunction = gradedFilterfunction;

    Points of view all the wrap the same source so you only have to update that.

    You may have to monkey with refresh() sometimes, but that's a small price to pay!

  • The collection ArrayCollection binding

    I have an ArrayCollection collection I am binding to a DataGrid control and everything seems to work except for a column that is an object in the collection ArrayCollection. Basically, it looks like this in XML

    < foo >
    < CAT / >
    < dog / >
    < fruit >
    < apple / >
    < orange / >
    < / product >
    < / foo >
    < foo >
    < CAT / >
    < dog / >
    < fruit >
    < apple / >
    < orange / >
    < / product >
    < / foo >

    I can access the animals in the DataGrid, but I can't understand how to access the fruits. I tried this in the data area DataGridColumn: dataField = "fruit.apple" but that did not work. How do you access the top node children in the DataGrid?

    I think you have to use a labelFunction:

    public void getFruits(item:Object,_column:DataGridColumn):String
    {
    Where item contains the DataGrid item object,
    }

    I don't know what are you trying to display in this column, but as you can see in the getFrutis function you can access to your article (in this case foo), then part of there and show the value you want. Don't forget the function signature must be like this and you should return a string

  • Definition of specific CSS on some items in the list of suggested items.

    Hi all

    IM using Jdev 12.1.3 and skin of alta

    I have a text entry field with bound to a method getSuggestItems in pageFlowScope.quickSearchBean AutoSuggestBehavior.

    The method returns a list of items. I want to add a select element at the end of the list and then style it

    Is it still set some specific css for some items in the playlist

    Thanks in advance

    DAT

    Hello

    You can do something like this:

    UL [id ^ = 'it1'] li [_afrlabel ='MySelectItemLabel ']}

    style

    }

    It1 the ID of your InputText and MySelectItemLabel is the label of the element you want to style.

    You can also use _afrvalue instead of _afrlabel.

    It will be useful.

    Kind regards

    Ruben.

  • Auto Add to the Collection of a specific library (Android)?

    All the:

    I'm looking for a method to automatiquementala images in Lightroom Mobile on my phone in a Collection.

    I see how to activate the automatiquementala function in the collection, but he wants to add the Gallery of the camera, which is not what I want to do. I want to be able to move an image in a specific Gallery on my phone and have then Lightroom Mobile automatically add to the collection. Is this possible?

    Thank you

    Roger

    Hey RogerToliver,

    This is what I understand you may have concerning: a way to Auto Add a feature for a specific collection to add photos from a specific album / Gallery from your phone every time you add a photo in this album/Gallery of phone.

    If I'm wrong in summarizing your characteristic question, the answer would be no. Mobile of Lightroom doesn't have a way to do it right now. But if this is a feature you want, I would suggest showing the site of Lightroom comments so that other mobile users you can comment and/or upvote for engineers to consider.

    Photoshop Lightroom | Community customer Photoshop family

    Let us know if that answered your question. Thank you.

    Melissa

  • Interactive report editable without using the Collection

    Hi Experts,

    I use Oracle Apex 4.2.5

    Is it possible to create an interactive report that can be changed in the same page? If the user edit a field, it must get updated in this table.

    Let me know if this is possible without assistance from the Collections of the Apex

    BR,

    Patrick

    Paul Broughton says:

    Hi Patrick,

    I also agree there is no out of the box solution, I need this for an application and I used elements of the APEX of the APEX_ITEM API

    Here is a very basic example that I have not tested, but you have a question, something like:

    [code]

    Select

    APEX_ITEM. DISPLAY_AND_SAVE (1, empno) as patient_id,

    APEX_ITEM. TEXT (2, ename) as ename

    Of

    EMP;

    [/ code]

    Make sure you use columns of standard report as your column types.

    When you click on submit you'd have a process similar to the following:

    [code]

    Start

    BECAUSE me in 1... APEX_APPLICATION. G_F01. COUNTING LOOP

    Update emp

    set ename = apex_application.g_f02 (i)

    where empno = apex_application.g_f01 (i);

    end loop;

    end;

    [/ code]

    That's assuming you don't need inline editing.  If you do this will require an even more customized solution, but the way above requires no collections.

    Thank you

    Paul

    Hi Paul,.

    I think that IR out-of-box features do not work correctly when you use the APEX_ITEM functions in the query.

    Here's another one you could use APEX 4.2

    Yet another way to create & quot; editable interactive report & quot;

    Kind regards

    Jari

Maybe you are looking for

  • not on Microsoft Search service

    After troubleshooting in safe mode, I got the big red x on the message above. How do I turn it on? I rebooted in safe mode because the prior start-up wouldn't do anything.

  • DV7-1245

    Hello Recently, I upgraded my hp Pavilion dv7-1245dx from windows vista to windows 7 home premium. Now after the upgrade, I get a message that some of my drivers are missing. More precisely. my base system device. He said those who miss are: Bus PCI

  • Administrator password: where can I find my password?

    Where can I find my password?

  • I get the error Windows Defender without McAfee 0x800106ba. Now what should I do? I went to uninstall programs

    I tried as admin and that no longer works.  I searched the computer for a split any McAfee or Norton who might be hanging around the computer and found nothing.  I don't know what else to do!  Any suggestions?Linda

  • Cannot rate of posts today

    Hi all It seems that I can not note all messages today. I tried to evaluate while logged in to CSC in IP telephony, wireless, Cisco social and I'm not offered the option of 5 star hotel bottom left of each answer. I tried to use Firefox and IE. I als