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);

Tags: BlackBerry Developers

Similar Questions

  • 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 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 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

  • 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

  • How to handle the onTriggered many ActionItem created dynamically

    Hi, I created the ActionItem dynamically using (loop)

    because data is from webservice

    How to handle the onTrigerred?

    If my code is like this:

    for (int i = 0; i)< alist.count();="">

    {

    My page page * = iRoot-->findChild ("SpecificObject");
    ActionItem * action = ActionItem::create () .title (aList [i] .name);

    bool res = QObject::connect (action, SIGNAL (triggered ()), this, SLOT (handleAction (())); what I'm confused because I don't know what action is triggered
    Q_ASSERT (res);
    Q_UNUSED (res);

    my page-> addAction (action, ActionBarPlacement:efault);

    }

    MyClass::handleAction() Sub

    {

    aFunction(); This parameter of function required of aList, said user.user aList [i]

    }

    Do I need to create handleAction() as well as added actionItem SLOT

    But I don't know how much action added because it is dynamic server

    Thank you

    There are a few options:

    Create a single location and connect all the signals. You can then call sender() into the slot to retrieve the object that sent the signal and go from there. You can also use a QSignalMap that maps each signal to a value and send this value to a single location. You can also use QSignalMap::sender() to get the sender object.

    I used the QSignalMap to do something similar for handling created dynamically successfully drop-down lists.

  • How to use PL/SQL to create dynamic action to set the value of a selection by another list?

    Hello

    I would like to know how to use PL/SQL to create dynamic action to set the value of a list of selection by another selection list.

    1.PNG

    I wish can create dynamic action to manage the two above the Room select list (: P9_ROOM) and building (: P8_BUILDING).

    When you select "1074" in the bathroom, building highlights like "BRM BLD 5"

    When you select 'Area of the black box' in the room, building must assign the value "7 BLD BRM"

    When the room is Null, building should also be Null.

    I thank you,

    Alice

    I forgot to mention, for the PL/SQL Code, because you are working with items in the selection list, the return values are different from the display on your LOV values, you must instead use the return values.

    Thank you

    Erick

  • I am trying to create dynamic landing pages that reflect the locations of my Google ads. How can I create a dynamic text on my landing page to specify the location in the title?

    I am trying to create dynamic landing pages that reflect the locations of my Google ads. How can I create a dynamic text on my landing page to specify the location in the title?

    Thanks a lot for your answer. I've sorted it now.

    Kind regards

    Gill

  • How to create a dynamic RTF report that creates dynamic columns based on the selection of dynamic columns in a table?

    Hi all

    Suppose I have table, whose structure changes frequently on a daily basis.

    For example. / / desc my_table gives you after the name of the column the day 1

    SQL > my_table DESC;

    Output

    Name

    Age

    Phone


    Day 2, two other columns are added, viz, address and salary.

    SQL > my_table DESC;

    Output

    Name

    Age

    Phone

    Address

    Salary


    Now, I want to create a Dynnamic RTF report which made extracting data from all columns from my_table daily. For this, I have defined a simultaneous program with XML output type and include in annex a data/definition of data model that takes XML as input and gives the final result of the conc program in EXCEL layout. I am able to do that for a constant number of columns, but don't know how to do it when the number of columns to display dynamically changes.

    For 1 day my XML file should be like this.

    <?xml version="1.0" encoding="UTF-8"?>
    <dataTemplate name="XYZ" description="iExpenses Report" Version="1.0">
    <dataQuery>
    <sqlStatement name="Q2">
    <![CDATA[
    SELECT Name
    ,Age
    ,Phone
    FROM my_table
    ]]>
    </sqlStatement>
    </dataQuery>
    <dataStructure>
    <group name="G_my_table" source="Q2">
      <element name="Name" value="Name" />
      <element name="Age" value="Age" />
      <element name="Phone" value="Phone" />
    </group>
    </dataStructure>
    </dataTemplate>
    
    

    And my day 1, EXCEL output RTF model should be like this.
    Name age phone

    Swapnill 23 12345

    For 2 days my XML file should be like this. With 2 new columns selected in the SELECT clause.

    <?xml version="1.0" encoding="UTF-8"?>
    <dataTemplate name="XYZ" description="iExpenses Report" Version="1.0">
    <dataQuery>
    <sqlStatement name="Q2">
    <![CDATA[
    SELECT Name
    ,Age
    ,Phone
    ,Address
    ,Salary
    FROM my_table
    ]]>
    </sqlStatement>
    </dataQuery>
    <dataStructure>
    <group name="G_my_table" source="Q2">
      <element name="Name" value="Name" />
      <element name="Age" value="Age" />
      <element name="Phone" value="Phone" />
      <element name="Address" value="Address" />
      <element name="Salary" value="Salary" />
    </group>
    </dataStructure>
    </dataTemplate>
    
    

    And my day 2, exit EXCEL model RTF should be like this.
    Name address telephone pay

    23 12345 Madrid 100000 Swapnill

    Now, I don't know below things.

    • Make the dynamic XML as we did in the day 1 there are 3 columns in the SELECT statement and the day 2, 5 columns. I want to create a dynamic XML which must not be changed if the new columns are added into my_table. I don't know how to create this query and also create their corresponding items below.
    • Make the RTF model dyanamic as day 1 there are 3 exit EXCEL columns and the day 2, 5 columns. I want to create a dynamic RTF model that would display all the columns selected in XML dynamic. I don't know how the RTF will create new XML tags and how it will know where to place them in the report. Means, I can create model RTF day 1, by loading the XML data for 3 columns and place 3 tags XML in the model. But how he will create and place the tags for the new columns the day 2?

    Hope so, you got my requirement, it's difficult. Please let me know how I can implement the necessary solution using the RTF dynamically without any manual intervention.

    Kind regards

    Patricia K.

    Post edited by: SwapnilK

    Hi guys,.

    I was able to solve above the requirement.

    I created a procedure that would create & update (attached to the data definition) XML file dynamically for each race. This dynamic XML contains the SQL statement for the data query that is built dynamically. I am updating this XML file using XDOLoader utility to the definition of data. Then run my program customized to generate the excel output.

    Exit excel retrieves correct number of columns dynamically (3 on Day1 and Day2 5), with corresponding data records.

    Kind regards

    Patricia K.

Maybe you are looking for

  • Need replacement for M70 - 191 DVD burner.

    My DVD burner on my M70-191 (has my * a UJ-8415) refuses to recognize most CD and fails when you try to burn the DVD, with various errors. I've tried different types and different burning software. Re-installed, cleaned up by car drivers. No luck. So

  • stop/play a for loop

    Hallo, I have a few buttons three radio (play / stop / pause) and a loop for that (to make it simple) displays an increasing number in a number of the indicator. I would like my buttons would be like this: -play button: starts the loop (indicator sta

  • All locked or disabled to restart user accounts

    I was faced with a problem with my user accounts getting locked out/disabled every time that I reboot my system. I can't start in safe mode, I can't run the system restore, I can't do anything but run a startup disk that will allow me to unlock locke

  • L7580 Solution Center scan stopped working on one of my laptops

    I have an OfficeJet Pro L7580.   It is connected to my LAN via Ethernet.  I have several portable Windows 7 64 b that he print and scan from there successfully, using either v13 and v14 complete pilot, including a Pavilion dv7 with v13, an Asus using

  • Vs winter NAP?

    I think I accidentally turned off a 'Start Up' program. Whenever I am away from my computer for just a little while, instead of 'siesta' she's in "hibernation", and I have to log on. Help?