the collection of table support

Hi, I'm trying to create a slideshow with the RSS feeds from flickr. I use a component datagrid to store the images (because of the effects of transition when I add or remove an item from the dataProvider.) I can go through the images very efficiently by simply removing the first element in the collection of table, but then I get to the end and of course the slideshow is none because I deleted everything. is there an easy way for me to just take the first object in the collection of table and move it to the end? I tried photoFeed.setItemAt (object, int); but I don't know how to call on the first object in the collection of table. also, for the int variable I try to use photoFeed.length because I want it move to the end of the array whose length should be the correct number from the beginning of indexation of array to 0.

Although I can't understand the requirement of moving an item at the end of a slide show, you can use

var point: Object = photoFeed.removeItemAt (0);
photoFeed.addItem (item);

to achieve what you want.

If you just want to browse the pictures one by one until the end, you just need to use the createCursor API and get a cursor. By calling moveNext on the slider, you move through the collection until moveNext returns false.

Tags: Flex

Similar Questions

  • date of sorting in the collection of table field

    How can I sort on a date field in a collection of table?
    for reference, this is the date format: "Fri 01 Dec 09:47:43 GMT - 07:00 2006.
    Any idea?

    Thanks for the idea,
    It worked!

    Once again thank you! Babo_Ya for your constant help & support!

  • The Collection Plan tables

    Hello

    Please let me know the tables which are filled during the Collection plan run. According to the functional behavior, the collection plan executes sub activities

    (i) all operations planning in ADS (Application Data Bank) are moved to the intermediate taking during program planning data table.
    (II) for the ODS load planning the entire transaction in the staging tables are moved to the ODS (operational data store).

    I need to know the activities of moving data in the tables during the planning data pull and program load planning ODS.

    Hope you understand.

    With respect,
    M.Raamjee

    During the collection process, Oracle first refreshes the snapshot on the EBS instance.
    Planning data pull then refreshes the CAWC st (staging) tables.  The tables are too many to list, but their names were inside st.
    for example, msc_st_system_items, msc_st_boms
    You can find them by

    SELECT * from all_tables owner WHERE = 'MSC' AND AS 'MSC_ST_ %' table_name order 2

    Load planning ODS treats st tables and load the tables of the CPSA.  In general, the name of the destination table is similar to table st (except _Pl)
    for example, msc_st_system_items-online msc_system_items
    msc_st_boms-online msc_boms
    etc.

    All the data collected in these destination tables a plan_id =-1 where the plan of real data had plan_id > 0

    Sandeep Gandhi

  • Parameter include in the layout, false if the value of an element in a collection of table is empty

    For the moment, I have a collection of table which is filled by an http request to a remote xml file. One of the fields he gets from this xml file is "productoptiona", which, in the application fills the text field of a radio button. What I want is this radio button does not appear in the application, IF the productoptiona field is not any text inside in the collection/xml table that is the product of the selected file is not an option a. Name of my collection of table from the file xml is 'productsAC' and 'choicesTilelist' is the tilelist filled by this collection of table which users will use to select products from.

    I applied the following code to the property inludeInLayout of the option button and I can't for the life of understand me why he is not doing anything.

    includeInLayout = {} «»

    choicesTilelist.selectedItem.productoptiona! == ''}"

    This code I can say should mean that the selected product productoptiona is NOT empty, then it should be included in the app, but if it is empty, but when I run the app this option button is included in the application, whether or not the productoptiona field is empty, it should be excluded.

    Even if you do includeInLayout = false, the component will always be visible

    on the stage. You must make the visible = false also.

    Let me know if this helped you

  • Select the column values in the collection

    Greetings,

    I want to select column values from the collection (plsql tables or table), as the following code, would it be possible
    Here tt is any collection



    Select emp_no, name, date of birth, sal tt (1), tt (2), tt (3), tt (4) emp; -single line query

    Select name, Department of justice, strength and dep_no in tt (5), tt (6), tt (7), tt (8) EMP; -single line query


    Version
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
    PL/SQL Release 10.2.0.4.0 - Production

    Thanks in advance

    Not sure about your business needs. But technically you can do.

    declare
       type tbl is table of number;
       lemp tbl := tbl();
    begin
       lemp.extend;
       lemp.extend;
       lemp.extend;
    
       select empno
            , mgr
            , sal
         into lemp(1)
            , lemp(2)
            , lemp(3)
         from emp
        where empno = 7369;
    
       for i in 1..lemp.count
       loop
         dbms_output.put_line(to_char(lemp(i)));
      end loop;
    end;   
    
  • Searching for an object in a Collection of table

    So I have a Collection of table with an object in, the following trace output

    (mx.collections::ArrayCollection)#0
      filterFunction = (null)
      length = 1
      list = (mx.collections::ArrayList)#1
        length = 1
        source = (Array)#2
          [0] (Object)#3
            fileName = "belt_002"
            filePath = "/mens/belts/"
        uid = "2EA13990-EEBA-BDD7-8E55-532927494C53"
      sort = (null)
      source = (Array)#2
    

    When you add items to the collection of table I want to check that there is no such thing as an object with the same properties.

    So, how can I check that the object above is not already in the table, basically that there is no corresponding file name and filePath?

    Thanks for your help

    Hello

    Try this:

    protected function componentsCheckList_changeHandler(event:IndexChangeEvent):void
                {
                    if (_secdataProvider.length==0){
                        _secdataProvider.addItem(event.currentTarget.selectedItem);
                        _secdataProvider.refresh();
                    }
    
                    var myTemp:String = event.currentTarget.selectedItem.file;
                    var arrayLength:Number = _secdataProvider.length;
                    var flag:Boolean = false;
                    for(var i:int = 0; i < arrayLength; i++)
                    {
                        if(_secdataProvider[i].file == myTemp)
                            flag = true;
                    }
                    if (flag == true){
                        Alert.show("already selected");
                    }else{
                        Alert.show("this can be added");
                        _secdataProvider.addItem(event.currentTarget.selectedItem);
                        _secdataProvider.refresh();
                    }
                }
    

    Rgds

    Johnny

  • Cannot sync picture added to the collection on Lightroom Mobile iOS 2.4 (with the last RAW support)

    Hello

    I have the following timing problem:

    1. I created the new collection of event using Lightroom Office and added some photos to my DSL
    2. And then synchronize this collection with my last Lightroom 2.4 Mobile iOS (last with RAW support)
    3. Using LR Mobile has added some photos to the additional event captured by my iPhone to the same previously synchronized collection
    4. It seemed that everything worked ok... the new picture has been added to the collection on LR Mobile, it is also visible in LR Web... but
    5. ... when I run Desktop LR he tries to synchronize this 1 photo indefinitely... it never stops and my LR Office is the synchronization...... synchronization synchronization... showing 'Sync 1 photo.

    When I create new collection of my Mobile LR (and the first step in office), then add picture... then everything works well... but it isn't I wish I had. The ideal situation is when I normally treat most of the photos of the event, coming for example from my DSLR and then could be added to the collection even some additional shots of the iPhone directly in LR Mobile so it could appear in LR Desktop collection with photos DSLR.

    Any help will be much appreciated.

    Kind regards

    Alex

    Have you double checked the status of clouds within the application Mobile of Lr. are still pending downloads listed. If so, the County gets down when you have Lr Mobile running for a few minutes in the foreground? -Guido

  • Compare the Collection with the help of the Table less

    Hey there!

    my plan is to transfer an excel file and record in an apex_collection, compare the results with those that already exist in a specific table and write it in another temporary table.

    Import excel, in the collection works perfectly, but I fight with the comparation. I select the form of entries collection and using UNMIS to compare lines with those of another SELECTION that gets the lines of the existing table.

    DECLARE

    BEGIN

    INSERT INTO UPLOADED_DID_LIST_COMP (BAC_CODE, UPSC)

    (

    SELECT BAC_CODE c001

    c002 published

    From apex_collections ca

    WHERE collection_name = "UPLOADED_EXCEL."

    LESS

    SELECT

    BAC_CODE

    EDITED

    OF UPLOADED_DID_LIST upld, apex_collections c WHERE

    collection_name = "UPLOADED_EXCEL."

    AND the upld. BAC_CODE = c.C001

    AND the upld. LʼUPSC = c.C002

    );

    End;

    This does not work because of this error:

    ORA-00933: SQL command not properly ended ORA-06550

    PLS-00103: encountered the symbol "end-of-file" when awaits one of the following numbers: (begin case declare exit end exception for goto rise back loop mod null pragma select update while < ID > < a quot double)

    If it's a copy/paste of your exact code then you just need to fix it, spaces here and there. And remove the superfluous where clause. Maybe:

    BEGIN

    INSERT

    IN UPLOADED_DID_LIST_COMP

    (

    BAC_CODE, SCHOOLING

    )

    (

    C001 SELECT BAC_CODE, EDITED C002

    FROM APEX_COLLECTIONS CA

    WHERE COLLECTION_NAME = "UPLOADED_EXCEL."

    LESS

    SELECT BAC_CODE, SCHOOLING

    OF UPLOADED_DID_LIST UPLD

    );

    END;

    Good luck.

  • help on the use of dynamic action to update the items in a table (more precisely, the radio button) based on the collection

    Hi everyone, I posted this question in the past and made huge strides with the help of Denes Kubicek: https://apex.oracle.com/pls/apex/f?p=31517:294:115851992029365: based on my previous question posted: https://forums.oracle.com/forums/thread.jspa?threadID=2537494

    I'm fighting with a single element in my tabular presentation.  There is a radio button.  The choices all seem correctly, but the value is not saved in the collection (and therefore not recorded in the table).  All the other elements in the form of tables to record properly.

    Here's what I have for the query.   This is element c024 (which maps to;) ("F03'), which is defined as a radio based on an existing LOV LOV.

    Currently I have:

    2 items on the page:

    P110_ID

    P110_VALUE

    Dynamic action called COLUMN of CHANGE:

    event: CHANGE

    selection type: jQUERY Selector

    jQuery:

    Select jQuery = input [name = "f03"], select [name "f08"], select [name = "f09"], input [name = 'f10'], input [name = 'f11'], input [name = 'f12'], select [name = "f40"], input [name = "f21"], input [name = 'f22'], input [name = "f23"], input [name = 'f50']

    scope of the event: Dynamics

    real action #1: set the P110_ID javascript expression this.triggeringElement.id

    real action #2: set the P110_VALUE javascript expression this.triggeringElement.value

    action 3: run pl/sql code

    declare
      v_member number;
      v_seq number;
    begin 
      v_member := TO_NUMBER (SUBSTR (:p110_id, 2, 2));
      select ltrim(substr(:p110_ID,5,4),'0') into v_seq from dual;
      safis_collections.update_column(v_seq,
                                    v_member,
                                    :p110_value);
    
    
    

    refreshment area true creation #4: LANDINGS_COLLECTION

    the tabular presentation is based on the query:

    SELECT
    apex_item.text(1,seq_id,'','','id="f01_'||seq_id,'','') "DeleteRow",
    seq_id,
    seq_id display_seq_id,
    apex_item.text_from_LOV(c004,'SPECIES')||'-'||apex_item.text_from_LOV(c005,'GRADE')||'-'||apex_item.text_from_LOV(c006,'MARKETCODE')||'-'||apex_item.text_from_LOV_query(c007,'select unit_of_measure d, unit_of_measure r from species_qc') unit,
    apex_item.select_list_from_LOV(8,c008,'DISPOSITIONS','onchange="getAllDisposition('||seq_id||')"','YES','0','  -- Select Favorite --  ','f08_'||seq_id,'') Disposition,
    apex_item.select_list_from_LOV(9,c009,'GEARS','style="background-color:#FBEC5D; "onFocus="checkGearPreviousFocus('||seq_id||');"onchange="getAllGears('||seq_id||')"','YES','3333','-- Select Favorite --','f09_'||seq_id,'') Gear,
    apex_item.text(10,TO_NUMBER(c010),5,null, 'onchange="setTotal('||seq_id||')"','f10_'||seq_id,'') Quantity,
    apex_item.text(11,TO_NUMBER(c011),5,null,'onchange="getPriceBoundaries('||seq_id||')"','f11_'||seq_id,'') Price,
    
    apex_item.text(12, TO_NUMBER(c012),5,null, 'onchange="changePrice
    ('||seq_id||')" onKeyDown="selectDollarsFocus('||seq_id||',event);"','f12_'||seq_id,'') Dollars,
    decode(c013,'Y',apex_item.text(14, c014,30,null,'style="background-color:#FBEC5D;" onClick="onFocusAreaFished('||seq_id||');"','f14_'||seq_id,''),'N','N/A') Area_Fished,
    decode(c017,'Y',apex_item.text(18, c018,4,null,'style="background-color:#FBEC5D; "onBlur="setUnitQuantity('||seq_id||')"','f18_'||seq_id,''),'N','N/A') UNIT_QUANTITY,
    decode(c017,'Y',apex_item.text(19,'CN',3,null,'readOnly=readOnly;','f19_'||seq_id,''),'N','N/A') UNIT_COUNT,
    c024 hms_flag,
    decode(c050,'Y',apex_item.checkbox(21,'Y','id="f21_'||seq_id||'" style="background-color:#FBEC5D; " onClick="alterYes('||seq_id||');" onKeyPress="alterYes('||seq_id||');"',c021),'N','N/A') FinsAttached,
    decode(c050,'Y',apex_item.checkbox(22,'N','id="f22_'||seq_id||'" style="background-color:#FBEC5D;" onClick="alterNo('||seq_id||');" onKeyPress="alterNo('||seq_id||');"',c022),'N','N/A') FinsNotAttached,
    decode(c050,'Y',apex_item.checkbox(23,'U','id="f23_'||seq_id||'" style="background-color:#FBEC5D;" onClick="alterUnk('||seq_id||');" onKeyPress="alterUnk('||seq_id||');"',c023),'N','N/A') FinsUnknown,
    decode(c050,'Y',apex_item.textarea(28,c028,3,null,null,'f28_'||seq_id,''),'N','N/A') Explanation,
    decode(c024,'N',apex_item.select_list_from_LOV(29,c029,'HMSNATURE','onchange="saveNature('||seq_id||')"','YES','A','-- Select Nature of Sale --','f29_'||seq_id,''),'U',apex_item.select_list_from_LOV(29,c029,'HMSNATURE','onchange="saveNature('||seq_id||')"','YES','A','-- Select Nature of Sale --','f29_'||seq_id,''),'Y','N/A') Nature_Of_Sale,
    decode(c020,'Y',
    apex_item.select_list_from_LOV(40,c040,'HMS_AREA_CODE','style="background-color:#FBEC5D;"',null,null,null,'f40_'||seq_id,''),
    'N','N/A') HMS_AREA_CODE,
    c020,c050,
    decode(c020,'Y',
    apex_item.text(41,TO_NUMBER(c041),5,null,null,'f41_'||seq_id,''),
    'N','N/A') Sale_Price
    from apex_collections
     where collection_name = 'SPECIES_COLLECTION' order by seq_id
    
    
    
    
    
    

    I noticed the following:

    When I change the column C011 (price) the following values are defined in dynamic action:

    P110_ID = f11_1

    P110_VALUE is everything that I change the price.

    When I change the column C024 (hms_flag), the following values are defined:

    P110_ID = f03_0001

    P110_VALUE = change everything what I hms_flag to.

    the region is updated in my dynamic action, and change of hms_flag does not take.  I tested the SQL query that generates the value of v_SEQ in the dynamic action.   Both a change of price and HMS_FLAG, it seems valid

    Select ltrim (substr(:p110_ID,5,4),'0 ') in the double v_seq;

    If f11_1, v_seq: = 1

    If f03_0001, v_seq: = 1

    Thank you!

    solved.  sort of.

    domain c024 references f03.

    dynamic ACtion, step 4 calculated v_member as a substring of P110_ID... and in all other areas, the column and the field (fxx) displayed the same value... otherwise c024.

    I'm not exactly sure how solve it, but see the problem.

  • help to try to simplify the form table, based on the collection using dynamic measurements

    Hi everyone, I have tried cleaning and simplify an application designed in 2008 apex 3.2.  We have improved in 4.1.2 and want to take advantage of our understanding of the apex and the dynamic measures to simplify a large part of our code, get rid of the redundancies and make it easier for the programmer to debug and improve next.

    The application is for traders and commercial fishermen and currently has around 4100 users.

    The part that I'm trying to simplify is a tabular report, based on a collection.  Almost all areas in this tabular form has a logic linked to it... and in most cases, it is superfluous in that it executes a UPDATE_MEMBER on the collection.  I would like to remove as much of javascript and additional processes as possible.   I'm also still very new to jQuery and javascript, and faced with the two... but competent in pl/sql.

    tabular query is:

    {code}

    SELECT
    seq_id,

    apex_item. Text (1, seq_id, "," "id ="f01_"| seq_id,",")"DeleteRow. "

    apex_item.text_from_LOV (C004, 'SPECIES'). » -'|| apex_item.text_from_LOV (C005, 'RANK') | » -'|| apex_item.text_from_LOV (C006, 'MARKETCODE') | » -'|| Unit apex_item.text_from_LOV_query (c007, 'select unit_of_measure d, unit_of_measure r species_qc'),

    apex_item.select_list_from_LOV (6, c008, "STOP," onchange = "getAllDisposition('||) seq_id. "" ")" ',' YES, '0', "- Select favorite -", ' f06_ ' | seq_id, cm) available.

    apex_item.select_list_from_LOV (7, c009, style of ' GEAR, "=" background-color: #FBEC5D;) "onFocus ="checkGearPreviousFocus('||). " seq_id |') ; "OnChange ="getAllGears('|| seq_id ||). " "" ")" ',' YES, 'f07_', "- Select favorite -", "3333" | seq_id, cm) Gear,.

    apex_item. Text (8, TO_NUMBER (c010), 5, null, "onchange ="setTotal('||)) seq_id. ")" «, » f08_'|| seq_id, cm) quantity.

    apex_item. Text (9, TO_NUMBER (c011), 5, null, "onchange ="getPriceBoundaries('||)) seq_id. ")" «, » f09_'|| seq_id, cm) price.

    apex_item. Text (10, TO_NUMBER (c012), 5, null, "onchange ="changePrice)
    ('| seq_id |') "onKeyDown = selectDollarsFocus('||) "(seq_id |', event);" ',' f10_'| "" seq_id, cm) $,.

    Decode (c013, 'Y', apex_item.text (11, c014, 30, null, "style =" background-color: #FBEC5D;)) ' onClick = 'onFocusAreaFished('|| seq_id||'); "',' f11_'. seq_id, cm), "n","N/A") Area_Fished, "

    Decode (c017, 'Y', apex_item.text (12, c018, 4, null, "style =" background-color: #FBEC5D;)) "onBlur ="setUnitQuantity('||). " seq_id. ")" «, » f12_'|| seq_id, cm), "n","N/A") UNIT_QUANTITY, "

    Decode (c017, 'Y', apex_item.text (13, 'CN', 3, null, "readOnly = readOnly; ',' f13_'|")) seq_id, cm), "n","N/A") UNIT_COUNT, "

    Decode (c050, 'Y', apex_item.checkbox (14, 'Y','id = "f14_" | seq_id |')) "style =" background-color: #FBEC5D; " onClick = "alterYes('|| seq_id||');" "onKeyPress = alterYes('||) (("(seq_id |');" ', c021), "n", "S/o") FinsAttached,.

    decode (c050, 'Y', apex_item.checkbox (15, ', "id ="f15_"|")) seq_id |' "style =" "background-color: #FBEC5D;" onClick = "alterNo('||)" seq_id |') ; "onKeyPress = alterNo('||) (("(seq_id |');" ', c022), "n", "S/o") FinsNotAttached,.

    Decode (c050, 'Y', apex_item.checkbox (16, 'U','id = "f16_" | seq_id |')) "style =" "background-color: #FBEC5D;" onClick = "alterUnk('||)" seq_id |') ; "onKeyPress = alterUnk('||) (("(seq_id |');" ', c023), "n", "S/o") FinsUnknown,.

    Decode (c050, 'Y', apex_item.textarea (17, c028, 3, null, "onchange ="setExplanation('||))) seq_id. ")" «, » f17_'|| seq_id, cm), "n","N/A") explanation, "

    Decode (c024,' no, apex_item.select_list_from_LOV (18, c029, 'HMSNATURE','onchange = 'saveNature('||))) seq_id. ")" ',' YES, ' one ', "- Select Nature of sales -", "f18_" | seq_id, cm), 'U', apex_item.select_list_from_LOV (18, c029, 'HMSNATURE','onchange = "saveNature('||)) seq_id. ")" ',' YES, ' one ', "- Select Nature of sales -", "f18_" | seq_id, cm), 'Y', 'N/a') Nature_Of_Sale,.

    decode (c020, 'Y',
    apex_item.select_list_from_LOV (40, c040, 'HMS_AREA_CODE',
    "style =" background-color: #FBEC5D;
    "onchange ="saveHMSAREA('||). " seq_id |', this.value) "',' f40_'|" seq_id, cm),
    (' N N/A ',' ') HMS_AREA_CODE;

    C020, c050,

    decode (c020, 'Y',
    apex_item. Text (41, TO_NUMBER (c041), 5, null, "onchange ="setSalePrice('||)) seq_id |', this.value) "',' f41_'|" seq_id, cm),
    (' N n/a ',' ') Sale_Price

    of apex_collections
    where collection_name = 'SPECIES_COLLECTION' order by desc seq_id

    {code}

    I am slow at first and just try to replace the ONCHANGE for apex_item 41 (retail price).   I hope that finally replace all the onblur/onchange to use the same dynamic action.

    The ONCHANGE for apex_item 41 is currently:

    {code}

    function setSalePrice (pRow, savePrice)

    {

    get var = new htmldb_Get (null, & APP_ID., 'APPLICATION_PROCESS is saveSalePrice', 0);

    Get.Add ('SETVALUE3', savePrice);

    Get.Add('ATTRNBR3','41');

    Get.Add ('SEQUENCEID', Prow);

    gResult = get.get ();

    }

    {code}

    the saveSalePrice application process is:

    {code}

    Start

    apex_collection.update_member_attribute (p_collection_name = > 'SPECIES_COLLECTION',)

    p_seq = >: SEQUENCEID.

    p_attr_number = >: ATTRNBR3,.

    p_attr_value = >: SETVALUE3);

    end;

    {code}

    I created two new hidden fields: P110_ID and P110_VALUE.

    I created a dynamic action: CHANGE COLUMN

    event: change

    selection type: jQuery Selector

    jQuery Selector: input [name = "f41"]

    real action 1 - records P110_ID with javascript expression: this.triggeringElement.id

    real action 2 - P110_VALUE value with javascript expression: this.triggeringElement.value

    true action 3 - run pl/sql code

    {code}

    declare

    number of v_member;
    number of v_seq;

    Start
    v_member: = TO_NUMBER (SUBSTR (: p110_id, 2, 2));
    Select ltrim (substr(:p110_ID,5,4),'0 ') in the double v_seq;

    safis_collections.update_column (v_seq,
    v_member,
    (: p110_value);
    end;

    {code}, where safis_collections.update_column is a package of db

    {code}

    Procedure update_column ()v_seq in varchar2

                            v_attr in number ,

                            v_value in VARCHAR2 )

    is

    Start

    apex_collection . update_member_attribute()p_collection_name=> 'SPECIES_COLLECTION'

                         p_seq = > v_seq ,

    p_attr_number = > v_attr ,

    p_attr_value = > v_value );

    apex_debug . message ()'put a day of column.seq ='| v_seq || 'attribute =' || v_attr || "with" || v_value );

    end ;

    {code}

    real action 4 - refreshment area

    I modified the query in a table to reference apex_item 41 to be

    Decode(C020,'Y',apex_item.) Text (41, TO_NUMBER (c041), 5, null), 'No,' N/a ') Sale_Price in the hope that it would fire the dynamic action.   I get the below error.  The value of P110_ID is null, the value of P110_VALUE seems to be correctly set.

    call returned Ajax Server ora error-sequence of 20103:member does not work
    There are in the collection 'SPECIES_COLLECTIO' application to run PL/SQL code

    I appreciate all thoughts/help on this.

    Thank you, Karen

    AHHA.  change the query to

    Decode (c050, 'Y', apex_item.textarea (28, c028, 3, null, null,,'f28_'| seq_id, cm), ' n ',' n/d "") explanation,.

    and that did the trick.  On the next item.

  • In a table by using the Collection update of nulls

    I use collections to create a form in a table. However, I can't get the code to work. Could you please look at my logic and let me know what I am doing wrong?
    Apex version: 4.1
    1 process name: load Collection
    a. process Point: On Load - before the header
    Condition (b) process:
    i. the condition Type: PL/SQL expression
    + ii.     Expression:
     not apex_collection.collection_exists(p_collection_name => 'STAKEHOLDERS_COL')
    +
    c. code:
    if apex_collection.collection_exists('STAKEHOLDERS_COL') = TRUE then
       apex_collection.delete_collection(
             p_collection_name =>'STAKEHOLDERS_COL');
    end if;
    apex_collection.create_collection_from_query(
        p_collection_name => 'STAKEHOLDERS_COL',
        p_query => 'select id
                   , stakeholder_name
                   , stakeholder_role_id
                   , primary_contact_yn
                   , receive_notification_yn
                   , ''O'' original_flag
                   , wwv_flow_item.md5(stakeholder_name, stakeholder_role_id, 
                     primary_contact_yn, receive_notification_yn) 
                   from eba_prjv_proj_stakeholders,
       p_generate_md5 => 'YES'
    );
    * 2.     Report on the collection:
    a. query:
    select 
    apex_item.hidden(1,c001) id,
    apex_item.popupkey_from_query(2,c002,'select user_name d, user_name r from eba_prjv_app_users order by 1', 10) name,
    apex_item.select_list_from_query(4,c003,'select role_description d, id r from eba_prjv_stkhlder_roles order by role_code', 10) role,
    apex_ITEM.SELECT_LIST(5,c004,'N','Yes;Y,No;N') primary_contact_yn,
    apex_ITEM.SELECT_LIST(6,c005,'N','Yes;Y,No;N') receive_notifications_yn,
    apex_item.hidden(7, c006) status,
    apex_item.checkbox(8, seq_id) chkbx,
    apex_item.hidden(9, seq_id) seq_id
    from apex_collections
    where collection_name = 'STAKEHOLDERS_COL'
    AND c006 IN ('O','N','U')
    * 3.     I have a button 'Add a line' add a blank line for inserts. The button "submit page" REQUEST As "ADD". *
    * 4.     The process of adding new line: *.
    a. process Point: after submit - by the calculation and Validation
    b. process of Condition: what key - add row
    c. code:
    begin
    apex_collection.add_member(
    p_collection_name => 'STAKEHOLDERS_COL',
    p_c006 => 'N',
    p_generate_md5 => 'YES' );
    end;
    * 5. I have a button Delete who submits the request page = 'DELETE '. *
    * 6.     Collection update process:
    a. process Point: after submit - by the calculation and Validation
    + b.     Condition of process:
    REQUEST != 'ADD'
    +
    c. code:
    DECLARE
    l_status VARCHAR2(1);
    l_seq_id NUMBER;
    l_original_md5 VARCHAR2(4000);
    l_array_md5 VARCHAR2(4000);
    
    BEGIN
    
    FOR i IN 1..apex_application.g_f01.count LOOP
    
    -- Check previous status of Collection Member
      
       SELECT c006, c007 INTO l_status, l_original_md5
       FROM apex_collections
       WHERE 
       collection_name = 'STAKEHOLDERS_COL'
       AND seq_id = apex_application.g_f09(i);
    
    IF l_status = 'N' THEN
       l_status := 'N';
       
    ELSE
       SELECT wwv_flow_item.md5(apex_application.g_f02(i)
       , apex_application.g_f04(i)
       , apex_application.g_f05(i)
       , apex_application.g_f06(i))
       INTO l_array_md5
       FROM DUAL;
       
       IF l_original_md5 != l_array_md5 THEN
          l_status := 'U';
       END IF;
    END IF;
    
    
    IF l_status IN ('N','U') THEN
       
       apex_collection.update_member(
       p_collection_name => 'STAKEHOLDERS_COL'
       , p_seq => apex_application.g_f09(i)
       , p_c001 => apex_application.g_f01(i)
       , p_c002 => apex_application.g_f02(i)
       , p_c003 => apex_application.g_f04(i)
       , p_c004 => apex_application.g_f05(i)
       , p_c005 => apex_application.g_f06(i)
       , p_c006 => l_status
       , p_c007 => l_original_md5
     );
    END IF;
    END LOOP;
    IF :REQUEST = 'DELETE' THEN
       FOR i IN 1..apex_application.g_f08.count LOOP
       -- Check previous status of Collection Member
     
      SELECT seq_id, c006 INTO l_seq_id, l_status
      FROM apex_collections
      WHERE collection_name = 'STAKEHOLDERS_COL'
      AND seq_id = apex_application.g_f08(i);
    
      IF l_status = 'N' THEN
         apex_collection.delete_member(
         p_collection_name => 'STAKEHOLDERS_COL'
         , p_seq => l_seq_id
        );
      ELSE
        apex_collection.update_member_attribute(
        p_collection_name => 'STAKEHOLDERS_COL'
        , p_seq => l_seq_id
        , p_attr_number => '6'
        , p_attr_value => 'D'
       );
      END IF;
     END LOOP;
    END IF;
    
    end;
    * 7.     Update the collection table
    a. process Point: present - according to calculation and Validation
    b. process of Condition: If the key (APPLY_CHANGES)
    c. code
    DECLARE
    l_table_md5 VARCHAR2(4000);
    l_collection_md5 VARCHAR2(4000);
    BEGIN
    
    FOR c1 IN (SELECT c001, c002, c003, c004, c005, c006, c007,seq_id
    FROM apex_collections
    WHERE collection_name = 'STAKEHOLDERS_COL'
    ) LOOP
    
    IF c1.c006 = 'N' THEN
       insert into eba_prjv_proj_stakeholders
                ( STAKEHOLDER_NAME,
                 STAKEHOLDER_ROLE_ID,
                 PRIMARY_CONTACT_YN,
                 RECEIVE_NOTIFICATION_YN
                 )
                values
                (c1.c002,
                 c1.c003,
                 c1.c004,
                 c1.c005            
                );
    ELSIF c1.c006 = 'D' THEN
       DELETE FROM eba_prjv_proj_stakeholders
       WHERE id = c1.c001;
    ELSIF c1.c006 = 'U' THEN
       -- Check the record hasn't been updated since the query
       -- Get MD5 checksum from the Table
      
     SELECT wwv_flow_item.md5(STAKEHOLDER_NAME, STAKEHOLDER_ROLE_ID, PRIMARY_CONTACT_YN, RECEIVE_NOTIFICATION_YN)
       INTO l_table_md5
       FROM eba_prjv_proj_stakeholders
       WHERE id = c1.c001;
       -- Compare the checksum values and if they are different, raise an error.
       IF l_table_md5 != c1.c007 THEN
          raise_application_error( -20001
          , 'Current version of data in database has changed '||
            'since user initiated update process.');
         return;
      END IF;
    
      UPDATE eba_prjv_proj_stakeholders set
      STAKEHOLDER_NAME = c1.c002,
      STAKEHOLDER_ROLE_ID = c1.c003,
      PRIMARY_CONTACT_YN = c1.c004,
      RECEIVE_NOTIFICATION_YN = c1.c005
      where id = c1.c001;
    end if;
    end loop;
    apex_collection.delete_collection( p_collection_name => 'STAKEHOLDERS_COL' );
    END;
    At the end of the process, I see null values inserted in my table. The report also displays null values.

    Published by: jaouad khalifi on August 17, 2012 04:26

    Published by: jaouad khalifi on August 17, 2012 04:42

    Published by: jaouad khalifi on August 17, 2012 04:46

    Published by: jaouad khalifi on August 18, 2012 02:03

    Hello

    I changed and then brought back to the State that you had.

    The problem here is that you have status and Seq_id returned with APEX_ITEM. HIDDEN, but you have not selected the Show check box for those columns attribute report tab.

    Thus there is no f06 and f09 only named elements in your HTML DOM and therefore no APEX_APPLICATION. G_F06 and G_F09. If your processes

    FOR correct here is what you do

    1. mark the status and Seq_id as indicated in the report attribute tab columns
    2. change the ACE status display hidden to report column Standard. Change display of the Seq_id also report Standard column

    Note that when a column is not marked to show in the report he becomes any and you don't see the associated items in the DOM HTML.

    See you soon,.

  • RENAMECOLLECTIONTABLE - questions by renaming the table from the collection.

    Hi all

    I use the version of database Oracle 10.2.0.2, OS - Solaris

    I am enrolled in the scheme after successfully.

    <? XML version = "1.0" encoding = "UTF-8"? >
    < xs: schema xmlns: XS = "http://www.w3.org/2001/XMLSchema".
    xmlns:xdb = "http://xmlns.oracle.com/xdb".
    elementFormDefault = "qualified" attributeFormDefault = "unqualified" >

    < xs: element name = "employee" type = "employeeType" xdb:defaultTable = "EMPLOYEEXMLTYPE_TABLE" / >

    < name XS: complexType "employeeType" = >
    < xs: SEQUENCE >
    < xs: element name = "name" type = "xs: String" / >
    < xs: element name = "departments" type = "departmentsType" nillable = "true" minOccurs = "0" / >
    < xs: element name = "name" type = "xs: String" / >
    < / xs: SEQUENCE >
    < name XS: attribute = "id" type = "Integer" use = "required" / >
    < / xs: complexType >

    < name XS: complexType = "departmentsType" >
    < xs: SEQUENCE >
    < xs: element name = "Department" type = "DepartementType" maxOccurs = "unbounded" / >
    < / xs: SEQUENCE >
    < / xs: complexType >

    < name XS: complexType = "DepartementType" >
    < xs: SEQUENCE >
    < xs: element name = "name" type = "xs: String" / >
    < xs: element name = "departmentWings" type = "departmentWingsType" / >
    < / xs: SEQUENCE >
    < / xs: complexType >

    < name XS: complexType = "departmentWingsType" >
    < xs: SEQUENCE >
    < xs: element name = "departmentWing" type = "departmentWingType" maxOccurs = "unbounded" / >
    < / xs: SEQUENCE >
    < / xs: complexType >

    < name XS: complexType = "departmentWingType" >
    < xs: SEQUENCE >
    < xs: element name = "name" type = "xs: String" / >
    < xs: element name = "target" type = "xs: String" / >
    < / xs: SEQUENCE >
    < / xs: complexType >

    < / xs: Schema >

    My goal is to create indexes on/employee/departments/department/departmentWings/departmentWing/name.

    I followed the steps mentioned in Create index for an XMLType column.

    One of the measures mentioned in the link above is to rename the table in the collection (in my case departmentwing) using the DBMS_XMLSTORAGE_MANAGE procedure. RENAMECOLLECTIONTABLE.

    So I tried the following:
    SQL > START
    DBMS_XMLSTORAGE_MANAGE 2. () RENAMECOLLECTIONTABLE
    OWNER_NAME 3 = > "XDB_TEST"
    Table_name 4 = > "EMPLOYEEXMLTYPE_TABLE"
    5 COL_NAME = > NULL,
    XPATH 6 = > ' / employee/departments/Department/departmentWings/departmentWing/name. "
    7 COLLECTION_TABLE_NAME = > 'DEPTWING_TABLE '.
    (8);
    9 END;
    10.

    PL/SQL procedure successfully completed.

    If the procedure has said that it has completed successfully, I couldn't see the created DEPTWING_TABLE.

    SQL > DEPTWING_TABLE DESC;
    ERROR:
    ORA-04043: object DEPTWING_TABLE does not exist

    I am left helpless. Can someone please?

    Kind regards
    Simo.

    Published by: user5805018 on October 12, 2011 04:40

    Hello

    First of all, are you sure that the nested tables generated during the registration of the scheme?

    You must annotate the schema with xdb:storeVarrayAsTable = 'true' and use the option genTables-online true for registration.
    Then you should see something like this:

    SQL> select table_name, table_type_name, parent_table_name, parent_table_column
      2  from user_nested_tables
      3  ;
    
    TABLE_NAME                     TABLE_TYPE_NAME                PARENT_TABLE_NAME              PARENT_TABLE_COLUMN
    ------------------------------ ------------------------------ ------------------------------ --------------------------------------------------------------------------------
    SYS_NTy8fd9LOzSmun4whyTbJC4g== department384_COLL             EMPLOYEEXMLTYPE_TABLE          "XMLDATA"."departments"."department"
    SYS_NTeAiIyOu0Q9G3nvWMtcM6mQ== departmentWing381_COLL         SYS_NTy8fd9LOzSmun4whyTbJC4g== "departmentWings"."departmentWing"
     
    

    In addition, according to the manual (xdb_easeofuse_tools.pdf):

    For Oracle Database 11g Release 2 (11.2) and above, this function accepts only, XPath
    the rating as a dotted notation. If the XPath notation is used, a setting of namespaces
    may also be necessary.

    So, on your version, you must use the notation 'dot ':

    SQL> call XDB.DBMS_XMLSTORAGE_MANAGE.renameCollectionTable(
      2    USER
      3  , 'EMPLOYEEXMLTYPE_TABLE'
      4  , NULL
      5  , '"XMLDATA"."departments"."department"'
      6  , 'DEPT_TABLE'
      7  );
    
    Method called
    
    SQL> call XDB.DBMS_XMLSTORAGE_MANAGE.renameCollectionTable(
      2    USER
      3  , 'DEPT_TABLE'
      4  , NULL
      5  , '"departmentWings"."departmentWing"'
      6  , 'DEPTWING_TABLE'
      7  );
    
    Method called
    
    SQL> select table_name, table_type_name, parent_table_name, parent_table_column
      2  from user_nested_tables;
    
    TABLE_NAME                     TABLE_TYPE_NAME                PARENT_TABLE_NAME              PARENT_TABLE_COLUMN
    ------------------------------ ------------------------------ ------------------------------ --------------------------------------------------------------------------------
    DEPT_TABLE                     department384_COLL             EMPLOYEEXMLTYPE_TABLE          "XMLDATA"."departments"."department"
    DEPTWING_TABLE                 departmentWing381_COLL         DEPT_TABLE                     "departmentWings"."departmentWing"
     
    

    Hope that helps.

  • Event in the collection of the table object

    I'm using Flash Builder 4 and working on an AIR application. I have a browser tab in my application and a popup that allows you to create an order. They can click an Add button to add items to the order, which adds lines to a datagrid control. When he clicks on save an event with an actionscript class is shot and pass order information with an object that must be added to a collection of table in the main application to display in the page backlog of orderitems. The news of command goes through fine.

    I can't find how to add the event.orderitems which is an object in the localOrderItems:Arraycollection for the commands that I use, I'm storing an object stored for orders when the pc is in offline mode, so they can submit them as soon as they are brought back online. This shows the first item in the list and I got out and tenant to display items.

    private void saveOrder(event:SaveOrder): Sub

    {

    store orders

    var : command = new Order();

    order.storeId = event.storeId;

    order.orderUID = event.orderUID;

    localOrders.addItem (order);

    localOrdersSO.data.orders = localOrders;

    localOrdersSO.flush ();

    Shop for order

    localOrdersItemsSO.data.items = event.orderItems;

    localOrdersItemsSO.flush ();

    PopUpManager.removePopUp (createOrderScreen);

    }

    for each {(o: Object var in newItems)

    oldItems.push (o);

    }

    See

    http://livedocs.Adobe.com/Flex/3/HTML/Help.HTML?content=03_Language_and_Syntax_16.html

  • The Source of an Image to link to the Icon of a Collection of table property

    Is it possible to do what I can't seem to make it work? For example, the image is called myImage and I need my collections of table icon to change in change source myImage. I tried this but it does not work: -.

    {id:}

    "First element" , label: "First element" , icon: "{myImage.source}" },

    Can someone help me on this? Thanks for your suggestions.

    Try this out. Julst is a start. This will save your image to disk. Yes, you can replace the existing images.

    You want to save the images on the spot I guess?

    Dany


    <>
    xmlns:MX ="http://www.adobe.com/2006/mxml" layout = "absolute" verticalAlign = "middle" backgroundColor = "white" width = "1024" height = "768" > "


        Import mx.graphics.codec.JPEGEncoder;
       
    Import mx.graphics.ImageSnapshot;
    Import mx.collections. *;
       
    private void takeSnapshot(event:Event): void
    {
    capture the image
    var imageBitmapData:BitmapData = ImageSnapshot.captureBitmapData (myhtml);
    create a bitmap
    var s:Object = new Bitmap (imageBitmapData);
           
    Encode to JPEG
    var jpgEncoder:JPEGEncoder = new JPEGEncoder (60);
    var ba: ByteArray = jpgEncoder.encode (imageBitmapData);

    Choose a file name, you can do it dynamically according to the event
           
    var filename:String = "MyImage"
    resolve the path to a file object
    var file:File = File.applicationDirectory.resolvePath (filename);

    get the native path
    var wr:File = new queue (file.nativePath);
           
    create a filestream
    var stream: FileStream = new FileStream();
           
    open/create file, set the filemode to write in order to save.
    Stream.Open (wr, FileMode.WRITE);
           
    write your byteArray in the file.
    stream.writeBytes (ba, 0, ba.length);
           
    Close the file.
    Stream.Close ();

    Switch (MYHTML. Rental)
    {
    case "http://abcnews.go.com/":
    abcnewsimage.source = filename;
                   
    break;
           
    case "http://news.bbc.co.uk/":
    bbcnewsimage.source = filename;
    break;
    }
           
           
    }
       
       
       
    private var myTilelistAArrayCollection:ArrayCollection = new ArrayCollection () collection
    [{id: "ABC News Item", label: "ABC News" ", icon: ' '},]
    ([{id: "BBC News Item", label: "BBC News" ", icon: ' '}]) ;
       
    private var myTilelistBArrayCollection:ArrayCollection = new ArrayCollection([)
    {id: "ABC News Item", label: "ABC News" ", icon: ' '},
    ([{id: "BBC News Item", label: "BBC News" ", icon: ' '}]) ;
       
    ]]>
       
       
       
       
       
       
           
           
       

       
       
        http://abcnews.com/"complete =" takeSnapshot (event) "width ="250"height ="250"horizontalScrollPolicy ="off"verticalScrollPolicy ="off"x ="10"y ="118"/ >"
       

       
       

  • How to copy a Collection of table without incurring a new to the former?

    I created a table of a WebService results Collection. Some later in the code, I created a copy of this Collection of table, in order to apply a filter. However, when I make a change to the new table Collection, it updates the Collection of original painting.

    How can I avoid this? I want the new table Collection it's own entity that I can update on the fly without affecting the original Collection.

    Since this forum does not have an "Attach Code" option, here is a small sample of my code:


    private var aColl1:ArrayCollection;
    private var aColl2:ArrayCollection;

    ....

    WebService result Manager

    aColl1 = ws.lastResult as ArrayCollection collection;

    ....

    Another function in the same Application

    aColl2 = new ArrayCollection (aColl1.toArray ());

    aColl2.filterFunction = myFilter;

    aColl2.refresh ();

    ....

    A third function in the same Application

    for each (var item: object in aColl2)
    {
    object [property] = "newValue"; This updates the same object in the Collection of original painting
    }

    Hi Eric,.

    Similar to Java, AS all objects are references. Then, even when you copy a table new table elements would refer to the same objects.

    What you need is a good copy of the object. You can try using ObjectUtil.copy for each element of the array and create a new table and use it.

    -Sultani
    http://flexpearls.blogspot.com

Maybe you are looking for