Populate the selectOneListbox Dynamically using Query.. Frank plz check

Hi,
I am using JDeveloper 11G
How Can I populate the selectOneListbox Dynamically using Query in Jsp pages...
Kindly let me know...
Thanks in advance
Jithesh

try this,
public SelectItem[] getSelectOneList() {
DCIteratorBinding testListIter1 = getItrtBindings("ViewObj1Iterator");
ViewObject vo1 = testListIter1.getViewObject();
//vo1.setNamedWhereClauseParam("id", someid);
vo1.executeQuery();
DCIteratorBinding iter= getItrtBindings("ViewObj1Iterator");
int startIdx = iter.getRangeSize();
iter.setRangeSize(-1);
Row[] rows = iter.getAllRowsInRange();
SelectItem[] selectOneList = new SelectItem[rows.length];
SelectItem item = null;
if(rows != null && rows.length > 0){
for(int i=0; i<rows.length; i++){
Row r = rows;
String attribute = r.getAttribute("FunctName").toString();
String label = r.getAttribute("FunctName").toString();
item = new SelectItem();
item.setValue(attribute);
item.setLabel(label);
selectOneList[i] = item;
iter.setRangeSize(startIdx);
return selectOneList;

Similar Messages

  • To check the checkbox dynamically used in thmlb tag

    Hi all,
    I am new to crm 2007,
      I have added a thtmlb tab to create a checkbox. I am able to get checkbox event to get value of the check box and process. But when reopen the  view the check box should be checked  dynamically depending on the conditions.
                   how to make a check box checked dynamically.
    Thanks
    Hema

    Hi john,
    I have table control with fore fileds like this..
    'text box'-------'get button'.
    chkbox---item-material---qty
    box1--1abcde--
    10
    box2--2xyhnb--
    20
    Nothing is allow input value except chkbox.
    Values are coming by one text box above this table.
    Text box allow input value..
    if i click box1 ...that row will be selected and it takes to second screen.....
    But this box is not allowing to check...
    kaki
    Message was edited by: Kaki R
    Message was edited by: Kaki R

  • OEM12c - Added tablespace to database and the Available Space Used (%) Alerts is not checked

    Hello -  I'm new to OEM 12c and I'm still getting my head around the monitoring aspects of it.  I just added two temporary tablespaces to a database.  When I look at the tablespaces via OEM12c, I notice that the Avaliable Space Used (%) Alerts column has a check mark for all the tablespaces except the two I just created.  The original TEMP tablespace does have check in the column.  Will these two new tablespaces be monitored for used space?
    Thanks!
    Shawn

    I'm assuming you're on DB 11.2 or higher...    Temp and Undo are typically excluded from monitoring due to their cyclical nature.   Thresholds must explicitly be set from 11.2 and higher.  Please see this note for more details.   Another explanation might be timing... if you just added them, and the tablespace collection hasn't run, you won't see that check because the metric hasn't validated them yet.   If you go back after the collection runs, you should see (if they were a normal tablespace and the temp/undo monitoring wasn't in play)...
    How to - Exclude UNDO and TEMP Tablespaces From The Tablespace Used (%) Metric (Doc ID 816920.1)

  • How to populate the configurator UI using CIO

    Requirement : Based on the user entered string (Basemodel.Option1.Options2.Optiopn3.Options4.Option5) a free text at sales order line. In case of bad line(meaning any one of the options is invalid) the user hits the configurator button and the valid options need to be populated to the configurator UI. As of now i able to populate one value. I am missing some where when i am trying to populate multiple options. Below is the java code which iam using.
    I tried using ArrayString and by result set but no luck :( , Please let me know if any one came accross this type of requirement.
    //The class CfgExtTest contains two methods, namely displayAttributes and getCountrySelected.
    //The displayAttributes accepts a runtime node as a parameter, through which the connection to the database can be established.
    //Once a connection is established, the getCountrySelected method can be used to obtain the value entered in the DFF for the Order Header Id.
    //The java code also selects the option from an Option Feature which matches the option selected in the DFF.
    import java.sql.Connection;
    import java.sql.PreparedStatement;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.sql.Statement;
    import java.util.StringTokenizer;
    import oracle.apps.cz.cio.IOption;
    import oracle.apps.cz.cio.IRuntimeNode;
    import oracle.apps.cz.cio.LogicalException;
    import oracle.apps.cz.cio.NoSuchChildException;
    import oracle.apps.cz.cio.TransactionException;
    import oracle.apps.cz.utilities.NameValuePairSet;
    import oracle.apps.cz.cio.*;
    public class Configtestui {
    public void displayAttributes(IRuntimeNode irn){
    try{
                   Configuration config = irn.getConfiguration();
                   InformationalMessage iMsg1 = new InformationalMessage("config---->"+config, irn);
                   config.addInformationalMessage(iMsg1);
              ConfigTransaction tr = config.beginConfigTransaction();
              InformationalMessage iMsg2 = new InformationalMessage("ConfigTransaction---->"+tr, irn);
              config.addInformationalMessage(iMsg2);
    String country= getCountrySelected(irn);
    InformationalMessage iMsg3 = new InformationalMessage("getCountrySelected---->"+country,irn);
    config.addInformationalMessage(iMsg3);
    try{
              config.commitConfigTransaction(tr);
              IRuntimeNode udcc = irn.getChildByName("Select Monitor");//Select Hard Drive
              IOption option = (IOption)udcc.getChildByName(country);
              option.setState(IState.TRUE);
              catch(Exception e)
              Configuration conf = irn.getConfiguration();
              ConfigTransaction trans = conf.beginConfigTransaction();
                   InformationalMessage iMsg = new InformationalMessage("Exception caused while reading property - First", irn);
                   config.addInformationalMessage(iMsg);
                   try{
                        config.commitConfigTransaction(trans);
                   catch(Exception ee){
    catch (Exception le){
         public String getCountrySelected(IRuntimeNode baseNode)
              Connection conn = baseNode.getConfiguration().getContext().getJDBCConnection();
              PreparedStatement pStmt = null;
              ResultSet rs;
              String UDC=null;
              String sql = "select ATTRIBUTE2 from cz.CZ_CONFIG_ATTRIBUTES" ;//"select attribute2 "+ "from oe_order_headers_all ooha ";//+ "where ooha.header_id ="+orderid;
              try
              pStmt = conn.prepareStatement(sql);
              rs = pStmt.executeQuery();
              if (rs.next())
                   UDC = rs.getString(1);
              System.out.println(UDC);
              rs.close();
              pStmt.close();
                        // Close database cursors.
              catch(Exception e){
              return UDC;
         }

    Hi Pankaj,
    Thanks a lot for your reply. I am very new to java and configurator extensions.
    There is an option feature "Select hard drive" on UI and 2GB ,10GB , 20GB are my options.
    I am trying to select 2GB on the UI. Iam fetching this value from a table '"Select selection from xxcz.TEST_CONFIG"' using this query.(below is my code)
    <some part of code where iam fetching the question and selecting its option >
    IRuntimeNode udcc = irn.getChildByName("Select Hard Drive");
    IOption option = (IOption)udcc.getChildByName(country);
    option.setState(IState.TRUE);
    My requirement i have multiple options from different questions to select in UI.. Can i select directly option ( as in my example 2GB) ? PLease let me know you thougths on this.
    -------------------------- Entire code ---------------------------------
    import java.sql.Connection;
    import java.sql.PreparedStatement;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.sql.Statement;
    import java.util.StringTokenizer;
    import oracle.apps.cz.cio.IOption;
    import oracle.apps.cz.cio.IRuntimeNode;
    import oracle.apps.cz.cio.LogicalException;
    import oracle.apps.cz.cio.NoSuchChildException;
    import oracle.apps.cz.cio.TransactionException;
    import oracle.apps.cz.utilities.NameValuePairSet;
    import oracle.apps.cz.cio.*;
    public class CreateConfig {
         public void displayAttributes(IRuntimeNode irn){
              try{
         Configuration config = irn.getConfiguration();
              InformationalMessage iMsg1 = new InformationalMessage("config---->"+config, irn);
              config.addInformationalMessage(iMsg1);
              ConfigTransaction tr = config.beginConfigTransaction();
              InformationalMessage iMsg2 = new InformationalMessage("ConfigTransaction---->"+tr, irn);
              config.addInformationalMessage(iMsg2);
    String country= getModelOptions(irn);
    InformationalMessage iMsg3 = new InformationalMessage("getCountrySelected---->"+country,irn);
    config.addInformationalMessage(iMsg3);
    try{
              config.commitConfigTransaction(tr);
              IRuntimeNode udcc = irn.getChildByName("Select Hard Drive");
              IOption option = (IOption)udcc.getChildByName(country);
              option.setState(IState.TRUE);          
              catch(Exception e)
              Configuration conf = irn.getConfiguration();
              ConfigTransaction trans = conf.beginConfigTransaction();
                   InformationalMessage iMsg = new InformationalMessage("Exception caused while reading property - First", irn);
                   config.addInformationalMessage(iMsg);
                   try{
                        config.commitConfigTransaction(trans);
                   catch(Exception ee){
    catch (Exception le){
    public String getModelOptions(IRuntimeNode baseNode)
              Connection conn = baseNode.getConfiguration().getContext().getJDBCConnection();
              PreparedStatement pStmt = null;
              ResultSet rs;
              String UDC=null;
              String sql = "Select selection from xxcz.TEST_CONFIG" ; // < Here iam getting value 2GB one of the option under 'Select Hard Drive'
              try
              pStmt = conn.prepareStatement(sql);
              rs = pStmt.executeQuery();
              if (rs.next())
              UDC = rs.getString(1);
              rs.close();
              pStmt.close();
              catch(Exception e){
              return UDC;
         }

  • Not able to view the values on the report viewed using Query Report Viewer

    Hi all,
    There seems to be some unknown problem with the Report Template I have prepared and uploaded on PIA XML Publisher. When I run it with some ID set, it doesn't seem to show the values from the Data I give. For example if I have a field called ChartField in my report Template, It doesn't seem to get populated when I do SetID.
    Why is it so?

    Hi all,
      select bdmng from resb into corresponding fields of table it_stpo2
                for all entries in it_stpo
                 where matnr = it_stpo-idnrk
                 and xloek ne 'X'.
      loop at it_stpo2.
        move-corresponding it_stpo2 to it_stpo.
        append it_stpo.
      endloop.
    In the above code, m able to fetch the records in the table it_stpo2. but the data is not gettin populated in the final internal table it_stpo. Both the internal tables it_stpo & it_stpo2 are same.
    The data is gettin moved from it_stpo2 to it_stpo but only upto the header level. its not gettin appended in the table it_stpo even after using append stmt.
    Plz help me to resolve this issue. its urgent.
    Rgds,
    Purva

  • How to populate the Poplist dynamically

    Hi,
    I need help in the following.
    I am populating the first poplist named Poplist1 from the FND_Lookup table. So based on the values selected in the first poplist1 the value in the second poplist, poplist2 should show different values.
    Say we select 'Bird' from poplist1, the poplist2 should poplute values from FND_Bird table, if we select Animal from poplist1, the second poplist, poplist2 should show values forn FND_Animal.
    I am not sure about how to make this work. Any guidance would be of great help to me.
    Thanking you
    ri

    There are three ways in which you can do this.
    1. Performant way : If your options in the first poplist is less then you can define a set of poplists in the metadata based on the number of values in the first poplist which derives values from different tables and set rendered property to a SPEL expression. Use PPR on the first poplist and render the appropriate poplist which queries from the underlying tables based on the selected value in the first poplist.
    2. You can define a set of view objects for each one of your tables and associate the viewObject at runtime to the second poplist.
    3. You can dynamically create viewObject based on the first poplist selection and associate that with the second poplist.
    In case of second and third approach you need to do a formsubmit on the first poplist selection and capture that event and redirect to the same page and do all these stuff in processrequest.

  • Unable to populate the default value  using form personalization

    Hi, I need to default a value in order managemnt for waybill number
    shipping -- transaction - delivery - detail --
    In Order management
    Shipping - Transactions
    Source system -- Order management
    From Order number - Any ordernumber
    say find
    I want to default this Detail ( xxxxx) as Way bill
    value of :DLVB.DETAIL_LABEL
    I have put the following condition on form personalization
    Condition tab
    Triger event
    When new record instance
    Trigger object
    dlvy_s
    Processing mode both
    Actions tab
    Property
    Object type Item
    Target Object DLVY_S.WAYBILL
    Property name Value
    Value
    :DLVB.DETAIL_LABEL
    but it is not defaulting... Appreciate if any one has idea what is wrong in this.
    Edited by: 885022 on Oct 3, 2011 11:31 AM
    Edited by: 885022 on Oct 3, 2011 11:33 AM

    yes Srini
    as we dont have any option via personalization to set the default values ,it can be done through controller extension ,
    in processRequest method of extended controllere get the control for that particular field where u want to set the default value and set the value using fieldbean.setValue(pagecontext,value);
    in case of any particular case ,please post in the forum
    thanx
    Pratap

  • Is there a way to get the IP address of a "remote" system on the LAN without using Share Screen and checking the network settings?

    I'm trying to better understand Mac's with respect to networking.  It seems that my computer should know the IP address of ever system listed on the Local Area Network, but all I see is the system name.  Is there a way to determine the IP address also?
    I have tried using "Get Information", but that produces no useful data.

    I'm trying to better understand Mac's with respect to networking.  It seems that my computer should know the IP address of ever system listed on the Local Area Network, but all I see is the system name.  Is there a way to determine the IP address also?
    I have tried using "Get Information", but that produces no useful data.

  • Creating a row trigger to populate the primary key

    to populate the primary key of a table automatically, i created a sequence named rule_id
    using the following statement:
    create sequence rule_id;
    and then i created a trigger to populate the primary key using the statements below:
    CREATE OR REPLACE
    TRIGGER RULE_ID BEFORE INSERT ON DOC_CATS_RULE_BASED_CLASS
    FOR EACH ROW
    BEGIN
    SELECT SEQ_RULE_BASED_CLASS.NEXTVAL
    INTO :new.id FROM DUAL;
    END;
    i took this from a books example. but it gives and error called:
    Error(3,8): PLS-00049: bad bind variable 'NEW.ID'
    What is wrong and what is the current way to do it?
    Please help!

    Hi ,
    The new denotes the new data values for the table relative column.....
    As regards the dual is a small table in the data dictionary that Oracle and user-written programs can reference to guarantee a known result. This table has one column called DUMMY and one row containing the value X.
    Regards,
    Simon

  • Problem in creating program dynamically using FM 'rss_template_instantiate'

    hi everyone,
    i need to create the program dynamically using FM 'RSS_TEMPLATE_INSTANTIATE'.
    if we create the program using this function module can we see the generated code.
    very urgent!!!!!
    thanks in advance.
    regards,
    bharat.

    hi everyone,
    i need to create the program dynamically using FM 'RSS_TEMPLATE_INSTANTIATE'.
    if we create the program using this function module can we see the generated code.
    very urgent!!!!!
    thanks in advance.
    regards,
    bharat.

  • What is the difference using start condition and check function module

    what is the difference  between using start condition and check function module

    That's new to me, I thought a start condition was evaluated before the workflow started, and thus now workflow work item is available. That's why I think the only situation in which start conditions/check functions can't be used, is when the availability of a workflow log for investigation of exactly what stopped the workflow is a requirement.
    I suppose the <a href="http://help.sap.com/saphelp_46c/helpdata/en/4c/86bf43feca11d2a64f0060087a79ea/frameset.htm">SAP documentation</a> is in need of an update.

  • The client timed out waiting to connect to the Essbase Server using TCP/IP

    Hi,All
    When I deploy the HPCM application to essbase, i received the following message below in the log file hpm.log
    2009-02-20 13:34:50,389 [Thread-115] ERROR com.hyperion.profitability.business.mdb.deployment.cubegeneration.CubeGenerator: error setting measures dimension member properties
    com.hyperion.profitability.data.mdb.essbase.MDBException: Error setting member property share option to store_data for member: D0900SB
         at com.hyperion.profitability.data.mdb.essbase.MDBMember.setShareOption(MDBMember.java:413)
         at com.hyperion.profitability.business.mdb.deployment.cubegeneration.CubeGenerator.setMemberProperties(CubeGenerator.java:1232)
    Caused by: com.essbase.api.base.EssException: (1290001): Network Error [10061]: Unable To Connect To [hypeion:32776]. The client timed out waiting to connect to the Essbase Server using TCP/IP. Check your network connections. Also please make sure that Server and Port values are correct
         at com.essbase.server.framework.EssOrbPluginDirect.ex_olap(Unknown Source)
         at com.essbase.server.framework.EssOlapMetaDataService.ex_olap(Unknown Source)
    And the Essbase service is up.
    Pls help!
    Shen.

    If you are installing on Windows, there is a limitation in the default configuration of TCPIP. I wrote about it, and included the steps to fix it, on my blog at http://timtows-hyperion-blog.blogspot.com/2007/12/essbase-api-error-fix-geeky.html.
    Note the error number you reported is slightly different than what I write about in the blog, but I believe I have seen this error fixed by the blog steps..
    Tim Tow
    Applied OLAP, Inc

  • Oracle Forms List Items :not populating list Dynamically using select Query

    Hi ,
    I need to create a list item. And the values to be populated in the list are from Database but I'm unable to populate from database.
    Please help me out how to populate the values from database.
    In Property Pallete we have Elements in List under Functional section , In this we have to manually enter the List values but we can't use any Query to Dynamically populate.
    Thanks,
    Kiran Sanga

    When you need to fill a list with the result of a query, you'll have to do it at runtime.
    Andreas has a good blogpost about this.

  • Master Detail Form - How 2 update a field in the Detail form using a query?

    Hello,
    I have a master detail form with, each master record having a fixed(6) number of detail records. One of the fields in the detail record is the PART_DESCRIPTION field. I am trying to update this field by querying Table_X. TABLE_X is in the format of (desciption id, description). Description id runs from 1 to 6.
    When the form displays, the PART_DESCRIPTION field for the 6 detail records needs to be automatically populated with the six values of description stored in Table_X. How can this be done?
    Tried using session storage objects, but made no headway.
    Would greatly appreciate pointers on how to go about doing this.
    Thanks.
    Dev

    If you are on a Portal Version lesser than 3.0.9.8.3, then please try the following to populate
    the PART_DESCRIPTION field.
    Steps:-
    1> Edit the form and go to the Additional PL/SQl section and put the following code in the
    "...after displaying the page area" :-
    declare
    type t_vc_arr is table of varchar2(4000) index by binary_integer;
    l_arr_desc t_vc_arr;
    l_form_name varchar2(200);
    l_form_state varchar2(500);
    begin
    l_form_name := p_session.get_module().get_name();
    l_form_state := p_session.get_value_as_varchar2(
    p_block_name => 'MASTER_BLOCK',
    p_attribute_name => '_FORM_STATE'
    if l_form_state = 'QUERY_AND_SAVE' then
    select description
    bulk collect into l_arr_desc
    from <schema>.table_x;
    htp.p('
    <script>
    var descArr = new Array();
    var Fidx = 1;
    var formObj = document.WWVM'||p_session.get_id()||';
    var fieldName = "'||l_form_name||'.DETAIL_BLOCK.PART_DESCRIPTION.0";
    for i in 1..l_arr_desc.count loop
    htp.p('descArr['||to_char(i-1)||']="'||l_arr_desc(i)||'";');
    end loop;
    htp.p('
    for (var i=0; i < formObj.length; i++){
    if (formObj.elements.name == fieldName+Fidx){
    formObj.elements[i].value = descArr[Fidx-1];
    ++Fidx;
    htp.p('</script>');
    end if;
    end;

  • How to populate data from dynamic drop down list to the text field

    Hi,
    I tried to populate data from dynamic drop down list to city field. I would like to concat data from drop down list.When selecting add button to add the item and select item from drop down list, data should be displayed in the text field. However, Please help. I spent alot of time to make it works I am not successful.
    Please see the link below.
    https://acrobat.com/#d=SCPS0eVi6yz13ENV0cnUdw
    Thanks for your help
    Cindy

    Hi Rosalin,
    Loop the hidden table, get the values and populate drop down in each iteration.
    DropDownList1.addItem("Text","Value");
    You can use one more solution for this scenario. If it is a matter of 2,3 dropdowns, put three dropDowns in the form layout and give seperate static data binding to them. At run time make the dropDowns hide/visible as per the requirement.
    Hope this helps.
    Thanks & Regards,
    Sanoosh

Maybe you are looking for

  • HT4528 screen went black

    my iphone 4s went black using a flashlight app, now it will not respond...

  • Bug report for Query Parser in VIEW Creator

    Hi, when you try to create a view with KEEP(DENSE_RANK... like in this example: SELECT   MIN(chr) KEEP(DENSE_RANK LAST ORDER BY lvl) AS min_chr      FROM     ( SELECT TRUNC((level + 1) / 2) AS lvl, chr(level + 64) AS chr FROM dual CONNECT BY level <=

  • CRS restarting - OCR inaccessible 10.2.0.4

    Hi all, i'm facing this problem and i don't understand why node2 and node1 "sometimes" (1 or 2 days a week) gives this type of error and crs restarts. The ocr files are in an OCFS2 filesystem on a dedicated LUN (mpath): /dev/mapper/mpath2 /ocr_voting

  • How do I fix activation failure for Creative Suite 5.5 when transferring from XP computer to Windows 8.1?.

    How do I fix an activation failure for Creative Suite 5.5 Design Standard? I uninstalled this from my old XP computer and re-installed it on Windows 8.1 two weeks ago. I am in NZ and got error message #129.17. I used the recommended fix of changing t

  • Moved users to new message store Unity Connection

    We recently moved users to a new messwage store on exchange. These users can no longer receive their voice mail in outlook. Everyone else can. What is the issue here? Unity Connection 8.5.1.10000-206 Exchange 2003