How to create dynamically a selecItems in a PGAE to a table

For those who would be able to help:

I use JDeveloper 10.1.3.4. In my application, I need to put a number of tags selectItem such as radio buttons on a page. What is difficult about this, is that it cannot be known in advance how many radio buttons will be, because is depends on how many rows is selected a table, even if we know that the number of selected lines will not exceed 3. I am considering using the radio button because it looks better on the page and the user must select only one.

Some examples of rows in the table:
TERM    AVAILABLE  SWITCHED
------  ---------  --------
200809  N          OFF
200902  N          ON
200906  Y          ON
200909  Y          ON
The SQL of the view of this table /(entity object) object is:
SELECT Terms.TERM
FROM TERMS Terms
WHERE AVAILABLE = 'Y' AND SWITCHED = 'ON'
I can't drag the two selected lines of data control palette. But it's just a table. What I need is to ask the user to select one of them. What is the best way to achieve this?

Thanks a lot for your help!

Newman

Hello

Try this:

a. at the bean of support within actionListener/action/selectionListener(based on your need), browse the rows that are returned by your query (best way is to write a method return results in AM/VO Impl list and then call him bean support) and prepare a list of the selectItems as below:

//bean code
private List selectItems;

//setter and getter methods for selectItems

actionListener/action/selectionListener(..){
   SelectItem selectItem = null;
   for(Row row: rows){
      selectItem = new SelectItem(,

Finally link these list of selectItems tag of f: selectItems selectOneChoice list


    

Jean Lou

Tags: Java

Similar Questions

  • How to create dynamic ObjectChoiceField?

    Hello friends,

    I want to create the search section for what I want to create dynamic choiceField. Tell me how to create that. I want 4 field of choice.

    Select the Continent-> Africa, Asia, Europe, America, South America, Antarctica, Oceania
    Select the country
    Select the region
    SELECT City

    here if I select Asia I want to show in the field of choice throughout Asia of County County, after that, if I sect Asia County I want to show all the area of that County and if I show a region that show the whole of the region. Than please tell how I do?

    It doesn't matter what Web service?

    How I do?

    you found NPES because obj_country is null.

    I think you can try with the recording of information in text files.

    String str_continent[]= new String[]{"Select Continent","Africa", "Asia", "Europe"," North America", "south America"," Antarctica","Oceania"};
    final ObjectChoiceField obj_Country=new ObjectChoiceField();
            obj_Country.setLabel("Countries");
    final ObjectChoiceField obj_continent=new                                                                                         ObjectChoiceField("Continent",str_continent){
             protected void fieldChangeNotify(int context) {
            if(getSelectedIndex()==2)
                    {
    InputStream in = getClass().getResourceAsStream("Asia.txt");
    String[] asianCountries =new  String[0];
    try {
    asianCountries = StringUtilities.stringToWords(new String(IOUtilities.streamToBytes(in)));
    } catch (IOException e) {
    e.printStackTrace();
    }
    
                        obj_Country.setChoices(asianCountries);}
    super.fieldChangeNotify(context);
                }
            };
    
            add(obj_continent);
            add(obj_Country);
    
  • How to create dynamic arrays parallel/side-by-side in Adobe cycle

    Is it possible to create dynamic arrays parallel/side-by-side in Adobe cycle?  If so, how?

    Given that the tables have different sizes, in that I am running wrapping issues with running adjustment of Western characters and characters from the pagination with checkpoint.  Any other ideas?

    In fact, I had tried this solution ("wrapping the tables in a subform of position and set to automatically adjust the height and allow page breaks"), but it did not work.  Something to do with nested subforms of position within a subform control flow etc.  So to make it work, I set the page to be a subform of position and the auto-hauteur value and allow page breaks and I unpacked the paintings while they were only 'wrapped up' of the page itself.

  • How to create dynamic Services based on VMware files

    Hello

    We would like to create as many services as VMware folders in VMware, so whenever we will be add/remove any computer file VMware virtual of the service components will also be day/follow-up...

    We check the option "Create a rule to include a group of components" in the function Builder, and adding the conditions of rule as:

    ! VFolder where name like ''.

    But the result is not successful, because we are unable to choose the right component that inherites the VFolder type components...

    The same works of query in the "Script Console" and the children of the property spreads with all virtual machines...

    Any ideas?

    Thank you.

    Hi Eneko

    One of our systems Consultants found a carton of community that creates dynamic records VMWare-based services. I have attached the cartridge and I included some comments from the author, Thomas Bryant.

    I am pleased to announce the release of version 1.0 of a cartridge personalized for VMware files.  I had a lot of customers ask me to automatically build services in vFoglight based on the structure of folders in vCenter, and that is exactly what will make this cartridge!  This cartridge contains a rule that runs once per hour and will create a category called files VMware services and then for each vCenter, the data center and the series of records, create services and add virtual machines to each, as in vCenter.  Simply load the cartridge and wait about 30 to 60 seconds depending on the number of files you have, and then services will be created.  Please let me know if things work, good or bad.

     

    Updated - Version 1.0.1 released

    The update fixes a problem with the sort order of the structure "Virtual Machines and templates" vs "Hosts and Clusters" and the following files which were not created properly.

     

    Known issues - currently will not remove a service based on a folder that has been deleted from vCenter.  I'll look to add this in the next version.

    One last thing. After you install the cartridge, a new rule, named Custom - create/update records VMware will be added under VMware_Folders cartridge. If edit you it and look at the Conditions & Actions tab, you should be able to see the groovy script that is used to create and populate the services. Here, you should be able to edit the prefix added to each folder in Foglight. By default, the prefix is "Folder_.

    I hope that this solution is satisfactory for you,

    Kind regards

    Gaston.

  • How to create a process of erasure for sub form of table

    Hello

    I created two applications and they share the same DB schema to apex.oraclecorp.com.

    One is app purchase order, when user enter 'Purchase requisition number' and select ' ERT HW/Item ID: HW/Item Name.

    and click 'apply changes' in the tabular presentation, the other app in 3rd screenshot, automatically updated data with the ID of the item selected with the "purchase requisition number.

    I did it with the following code in the first screenshot.

    I would like to know how to create a delete for this process?

    Does it mean that when I delete one of the item in purchase order app, another application can update the article with this number of requisition (PRM) as null?

    How to specify the item I checked to remove?

    Thank you!

    Alice

    I did itScreen Shot 2015-07-17 at 16.24.22.png

    Screen Shot 2015-07-17 at 16.16.18.png

    Screen Shot 2015-07-17 at 16.18.33.png

    Hi AliceFan-Oracle,

    AliceFan-Oracle wrote:

    I read the thread of the solution you provided. But I think that my case is different.

    I therefore reproduce my apex.com case.

    In the page of the order, I create a process of "Apply change" button, so when you select item ERT ID and press the button 'apply changes', the process will update the column 'PURCHASE_REQUEST_NUMBER' in the table 'ERT_TABLE_ITEM '.

    So it works on the button 'Apply Changes' that hope you that it works and you want to reproduce the same thing for the button 'delete '? as mentioned below:

    So my question is how to create a deletion process, then click on the button Delete, the application of 'buy' in the article ERT Table number must be removed while the selected item with ID ERT point in the purchase order page is deleted?

    Check your Application 81653 - Page 3.

    Made the following changes:

    • Created a process of PL/SQL 'Remove the PRM in ERT_ITEM_TABLE' as follows:
    Declare
    
        j number;
    
    Begin
    
        For  i IN 1 .. apex_application.g_f01.count
        LOOP
            j := apex_application.g_f01(i);
            Update ERT_TABLE_ITEM
            SET    PURCHASE_REQUEST_NUMBER = null
            Where  ERT_ITEM_ID = apex_application.g_f30(j);
    
        END LOOP;
    
    End;
    
    • Subordinate the process of 'Remove the PRM in ERT_ITEM_TABLE' to 'Remove' button request: MULTI_ROW_DELETE
    • Re-sequenced process so that the process of 'Remove the PRM in ERT_ITEM_TABLE' runs before "ApplyMRD".

    Kind regards

    Kiran

  • How to create dynamic vats in a triangle...

    Dear friends,

    IAM creating the dynamic triangle... same as below:

    http://www.mathopenref.com/cosine.html

    I am struck upward in the creation of the shape of the curve near the corner (A) & B. Please tell me how do it curves dynamic... I have to finish my project soon... pls help me...

    Thank you and advance...

    use graphics methods.  in particular, the lineTo() method.

  • How to create dynamic links with player

    Can you create a hyperlink in the new free player?

    Thank you.

    I did ask on the old free player.

    I just discovered that urls are created to be dynamic links, so I'm good.

    Thanks for trying.

  • How to create dynamic action of the link column in the classic report

    I have an apex page to display a modal window using jquery. In the modal window, I have a classic report with a column of link I want to capture its click event.
    I thought I could create a dynamic action with selection of type = jquery selector. Not sure if I need to do anything on the link column and do not know the syntax
    jquery selector. Would appreciate help or direction?

    Always zip code using .

    ...\
    

    tags as described in the FAQ.

    I created a region of report with the following query:

    Select empno, ename, 'SELECT' from emp
    where (ename like '%'||ltrim(rtrim(:P2_SEARCHPU))||'%'
    or :P2_SEARCHPU is null)
    

    There is no alias specified for the "SELECT" column, Oracle uses so the content of the column as a default alias. It comes

    'SELECT'
    

    Instead of

    SELECT
    

    The necessary jQuery selector would be:

    td[headers="\'SELECT\'"] a
    

    However the need to release the single quote everywhere is a ticking time bug. SELECT an Oracle reserved word means use it as any type of identifier is either too smart.

    You should always use a valid Oracle identifier as an alias explicit when a column contains a literal value or a complex expression:

    select
        empno
      , ename
      , 'SELECT' link_text
    from
        emp
    where
        (  ename like '%'||ltrim(rtrim(:P2_SEARCHPU))||'%'
         or :P2_SEARCHPU is null)
    

    APEX will use the column alias LINK_TEXT as the ID attribute of the column header and the cells in the column will reference it in their headersattributes. The jQuery selector is:

    td[headers="LINK_TEXT"] a
    
  • How to create dynamic LINE tag XML

    I have a procedure as follows:
    create or replace procedure show_xml (v_xml ON clob) AS
    qryCtx DBMS_XMLGEN.ctxHandle;
    v_query varchar2 (2000);
    Start
    v_query: ='SELECT case_id, status, resolution of t_cases where rownum < 4';
    qryCtx: = dbms_xmlgen.newContext (v_query);
    -the value of the row header to be cases
    DBMS_XMLGEN.setRowTag (qryCtx, 'Case');
    -now to get the result
    v_xml: = DBMS_XMLGEN.getXML (qryCtx);
    dbms_xmlgen.closeContext (qryCtx);
    END;

    After running the procedure header line will be "box. Can we define the header of the row that contains dynamic content somehow.
    For example I need the output as shown below:

    <? XML version = "1.0"? >
    rowset <>
    < case extensible index = "1" >
    < CASE_ID > 970200 < / CASE_ID >
    < STATUS > CLO
    SED < / STATUS >
    < RESOLUTION > Load Off reserved < / RESOLUTION >
    < / Body >
    < case extensible index '2' = >
    < CA
    SE_ID > 970670 < / CASE_ID >
    CLOSED < status > < / STATUS >
    Immediate rejection < RESOLUTION > <
    / RESOLUTION >
    < / Body >
    < case extensible index '3' = >
    < CASE_ID > 980030 < / CASE_ID >
    CLOSED < status > < / STAT
    U.S. >
    Avoidance Total < RESOLUTION > < / RESOLUTION >
    < / Body >
    < / LINES >

    We do anyway?

    Why use the PL/SQL, when a single SQL statement is all that is needed to generate the XML?
    H3. Optimize SQL. Minimize the PL/SQL.

    SQL> select
      2          xmlRoot(
      3                  xmlElement( "RowSet",
      4                          xmlAgg(
      5                                  xmlElement( "case",
      6                                          xmlAttributes( rownum as "repeating_index" ),
      7                                          xmlForest(
      8                                                  object_name,
      9                                                  object_type
     10                                          )
     11                                  )
     12                          )
     13                  ),
     14                  VERSION '1.1',
     15                  STANDALONE YES
     16          )                               as XML
     17  from       user_objects
     18  where      rownum < 4
     19  /
    
    XML
    ----------------------------------------------------------------------------
    
    
      
        INSERTEMP
        PROCEDURE
      
      
        EMMP
        TABLE
      
      
        FOO
        TABLE PARTITION
      
    
    
    SQL>      
    
  • How to create dynamically sorting table?

    For example, I have a table with 2 columns: 'Name', 'value x; and 1 table with columns 'name' value 'y' (which is based on the value of x + a formula). What I want to achieve is to get table2 sorted whenever I change value in table1. The "Filter/Sort" tool only applies sort once and doesn't react to any changes made to the table 1.

    I don't know how the practice is (I find it easier at the station just manually), but here's a way to generate an array sorted automatically.

    Add a column "index" for the value of Y in the same table (this can be hidden if you want) with a formula like this:

    The formula in C2, filled to the bottom:

    = B2 + 5 + LINE () / 10000

    The idea is to calculate Y using some formula that you use and then add a very small number based on the number of line so that it becomes a unique value that can be used for searches, even when the same value 'original' appears more than once.

    Then in column B of the table "Sorted" list the values for Y in Crescent order like this:

    The formula in B2, filled to the bottom:

    = SMALL (Table 1: $C, ROW (−1))

    And, finally, to get the name corresponding to this value of Y as this:

    The formula in A2, filled to the bottom:

    = INDEX (table 1: $A, MATCH (B2, table 1: $C, 0))

    Now, whenever you change a value in the column X, "Sorted" table is automatically sorts.

    SG

  • How to create elements of the checkbox on the form of tables

    I use the Application Express 4.2.1.00.08
    We currently have a spreadsheet that is who I am trying to replace application using APEX.

    I have loaded the spreadsheet into a table and have created a tabular presentation using the tabular presentation wizard who created the field in the form of text fields.

    The table has 38 columns in total, so I am trying to retrieve the columns to fit the screen.

    Most of the columns in the spreadsheet contain just the value 1 or null, so I want to make these fields check box so that they are checked if the value of the field is 1 and not controlled if the value is null. If the user selects the checkbox on the ground so I want to write a 1 in the table.

    Can you suggest I do this because several things that I have tried don't seem to work.

    Any suggestions or links to the doc on how to do that would be great.

    The structure of the table is the following:
    Name Null? Type
    ----------------------------------------- -------- ----------------------------
    IDENTIFICATION NUMBER
    FIELDNAME VARCHAR2 (30)
    ENTITY_CATEGORY VARCHAR2 (30)
    ATRIBUTE_GROUP VARCHAR2 (30)
    MASTER_SOURCE_SYSTEM VARCHAR2 (30)
    ENTERED_BY VARCHAR2 (30)
    DESCRIPTION VARCHAR2 (30)
    EXAMPLE_DATA VARCHAR2 (30)
    10891 VARCHAR2 (1)
    VARCHAR2 (1) 11072
    10892 VARCHAR2 (1)
    10487 VARCHAR2 (1)
    11065 VARCHAR2 (1)
    VARCHAR2 (1) 11078
    11066 VARCHAR2 (1)
    11067 VARCHAR2 (1)
    VARCHAR2 (1) 11061
    VARCHAR2 (1) 11062
    11063 VARCHAR2 (1)
    11064 VARCHAR2 (1)
    11079 VARCHAR2 (1)
    VARCHAR2 (1) 11057
    VARCHAR2 (1) 10520
    11058 VARCHAR2 (1)
    VARCHAR2 (1) 11056
    1262 VARCHAR2 (1)
    11070 VARCHAR2 (1)
    11059 VARCHAR2 (1)
    11060 VARCHAR2 (1)
    11071 VARCHAR2 (1)
    VARCHAR2 (1) 10819
    11069 VARCHAR2 (1)
    VARCHAR2 (1) 11068
    11074 VARCHAR2 (1)
    11075 VARCHAR2 (1)
    11076 VARCHAR2 (1)
    11077 VARCHAR2 (1)
    11073 VARCHAR2 (1)

    Published by: Kay Richards on June 7, 2013 16:51

    Published by: Kay Richards on June 7, 2013 17:14

    Click on the shape of table on the edit page

    go to the report attributes tab

    you will find the list of form elements

    now, click the icon to change the required column (small pencil icon).

    go to the tab column attributes, change the display as simple field check box.

    Then go to the values tab list.

    you will find the list of values definition text box just add 1 then click on apply changes.

    Run the page, you are gud to go.

    NULL is the default if the checkbox is in a disabled state, just use 1 in the list of values.

    Kind regards

    Mohan.

  • How to create a type of record and a pl/sql table of this record type in the database

    Hello
    I want to create a record type, and then I want to create a PL/SQL table in the oracle 9i database.
    I did block PL/SQL.
    But when I'm doing it in the database it throws me a few errors.
    Could you please tell me how can I do?

    Concerning

    user576726 wrote:
    Hello
    I want to create a record type, and then I want to create a PL/SQL table in the oracle 9i database.
    I did block PL/SQL.
    But when I'm doing it in the database it throws me a few errors.
    Could you please tell me how can I do?

    Concerning

    RECORD type is only supported in PL/SQL for SQL, you must use the OBJECT type.

  • How to create a select statement to the data in two tables?


    Hi all

    Table 1

    ID YEAR

    758 2013

    Table 2

    ID YEAR

    758 2014

    I want to create some that translates into two lines: function that does this?

    ID YEAR

    758 2014

    758 2013

    Thank you, best regards.

    Hello

    Perhaps a select * from table1 UNION ALL select * from table2 will help you.

    concerning
    Kay

  • How to add dynamic items based on the results of a dynamic query?

    Hi all

    I'm quite new to ofa, here's my problem.

    I have a table 'interventions', each intervention have actions stored in the table "actions".

    I want to show the actions of an intervention in a list, based on the id of the intervention. the response ID value is dynamic, so does not know the number of shares that you want to display in the list.

    Can someone tell me the steps to create a region that has dynamic elements to display names of action?

    Thank you

    Kind regards

    Afaf

    Afaf,.

    Take a look on the link below to see how to create dynamic VO:

    Blog of Anil Oracle Application Framework: create VO when running at the controller or dynamically created VO

    You could add messageStyled text like the code below:

    OAMessageStyledTextBean newMessageBean = (OAMessageStyledTextBean) createWebBean (pageContext, MESSAGE_STYLED_TEXT_BEAN, null,"" ");

    Links to dynamically create elements below:

    Add columns to the table advanced in OA Framework Programatically by Extension

    OPS KNOWLEDGE HELPER

    Let us know if you get any errors when creating.

    See you soon

    AJ

  • create dynamically a group of record based on previously entered record Grou

    Forms [32 bit] Version 10.1.2.3.0 (Production)

    Hello
    I know how to create dynamically record based on a query and put the code in when a new instance of the form.
    My request is. I have a form that includes several groups of Record and the user wants to dynamically create the following groups based on the previous groups.

    For example
    I have a record group with choosing a location.
    When the user selects the location from a list of values
    the 2nd record group called "Cost Centres" will have to filter only those whose locations selected above.

    How can I fill the 2nd record running when I don't know what site the user will choose?
    If I just simply fill in when new instance of form as the location and just select the entire document, populates the list of values.

    CC field is a LIST ELEMENT and the style of list is a LIST of POP, is not necessary.

    I put the code in the location of the trigger when-list-changed field.
    I get this error:
    FRM-41337: cannot complete the record group list

    Here is the code:

    DECLARE
    
    v_recsql Varchar2(1000); -- The SQL for creating the Record Group.
    v_recgrp RecordGroup; -- Record Group
    v_status Number; -- Return Value of Populate_Group function.
    c_where VARCHAR2(1000);
    
    BEGIN
         IF :location = '1' THEN
              c_where := ' substr(cost_centre,1,2) in (''01'',''02'')';
              
         ELSIF :location  = '2' THEN
              c_where := ' substr(cost_centre,1,2) in (''02'',''03'')';
              
         ELSIF :location   = '3' THEN
              c_where := ' substr(cost_centre,1,2) in (''01'',''11'',''07'')';
                   ELSE
              c_where :=  ' 1=1'; --EVERYTHING
    
         END IF;
    
    v_recsql := 'SELECT cost_centre, description  FROM   cost_centres  where '||c_where;
    
    
    -- Create the Record Group
    v_recgrp := CREATE_GROUP_FROM_QUERY('v_recgrp', v_recsql);
    
    
    IF NOT ID_NULL(v_recgrp)
    THEN -- No Error, record group has been successfully created.
    
    
    -- Populate Record Group
    v_status := POPULATE_GROUP('v_recgrp');
    
    
    IF v_status = 0 
    THEN -- No Error. Record Group has been Populated. 
    POPULATE_LIST('block.CC', 'v_recgrp');
    END IF; -- IF v_status = 0 
    
    -- Delete the Record Group as it is no longer needed.
    DELETE_GROUP('v_recgrp'); 
    
    
    END IF; -- IF NOT ID_NULL(v_recgrp)
    
    END;
    Thanks for your help.

    Hello
    Once registration State Gets the change to block you cannot fill/repopulate the list item. Keep these list items as element non-base of data with different names and create different items such as database Moose points. That assign values in triggering WHEN-LIST-CHANGE for real database items.

    -Clément

Maybe you are looking for