Dynamically created combo box

I am using ActionScript to create component instances for use
within the
Accordion component. One of those ia a ComboBox where one can
select an
entry from a list of twenty items. The ComboBox works
properly in the Flash
IDE but not when uploaded to the site. All other dynamically
created
components work fine. I should also mention that the SWF is
loaded into a
maste SWF as a movie clip using the loadMovie statement. That
doesn't seem
to be the problem sice most components work.
Anyone have any thoughts?

It was done this way from the start.
I should clarify. The combobox appears correctly but will not
function
(i.e., it does not open to reveal the choices.
Thanks anyway.
Greg

Similar Messages

  • Creating Combo Box or Pop list

    I created list of values.But i never used combo box and poplist.I created a item and in itemtype i changed to listitems and functionality nodes changed to combo box.How to generate value in the list through programatically.Can any one help me .
    Thanks

    You can create both static values and also
    values based on record group .
    I think you know how to create static values.
    (for static just give the values in "Element List" property of list item)
    Using Record group. see this example.
    Declare
    Rg_Id RecordGroup;
    Rg_Name varchar2(20) := 'Type';
    List_Id Item;
    Temp Number;
    Rowcount Number;
    Begin
    Rg_Id := Find_Group('Type');
    If Not Id_Null(Rg_Id) Then
    Delete_Group(Rg_Id);
    End If;
    Rg_Id := Create_Group_From_Query('Type','select empno,'
    | |'empno'
    | |' from emp ');
    List_Id := Find_Item('CTRL_BLOCK.IT_LIST');
    Temp := populate_Group(Rg_Id);
    Populate_List(List_Id,Rg_Id);
    End;
    In the selection you must give two columns one for label and another one for value.
    Try this and let me know if you have any problem.
    Regards,
    viji.
    null

  • Dynamic LOV/Combo Box

    I need to put an LOV/Combo Box on a form where they can select a date from a list of values. We have reports that our field reps have to submit for the previous friday. I have code to create a combo box. How can I add this to a form or create a LOV with this function:
    DECLARE
         n_NumofDays NUMBER;
         testdate VARCHAR2(50);
         selectedyear VARCHAR2(50);
         firstdayofyear VARCHAR2(11);
         firstfridayofyear VARCHAR2(11);
         upcomingfriday VARCHAR2(11);
         currentdate DATE;
         thisyear VARCHAR2(50);
         selected VARCHAR2(8);
    BEGIN
         selectedyear := TO_CHAR(SYSDATE,'YYYY');
    firstdayofyear := '01-JAN-' || selectedyear;
    firstfridayofyear := NEXT_DAY(firstdayofyear, 'FRIDAY');
    upcomingfriday := NEXT_DAY(SYSDATE, 'FRIDAY');
         htp.p('<select name="weekenddate">');
         htp.p('<option selected value="'|| firstfridayofyear || '">Friday '|| firstfridayofyear || '</option>');
              currentdate := firstfridayofyear;
              thisyear := selectedyear;
              x :=0;
         WHILE SelectedYear = ThisYear LOOP
         IF currentdate = upcomingfriday THEN
              selected := 'selected';
         ELSE
              selected :='';
         END IF;
         htp.p('<option '|| selected || ' value="'|| currentdate || '">Friday '|| currentdate || '</option>');
              currentdate := NEXT_DAY(currentdate, 'FRIDAY');
              thisyear := TO_CHAR(currentdate,'YYYY');
         END LOOP;
         htp.br;
         htp.p('</select>');
    htp.br;
    htp.p(n_NumofDays);
    END;
    Look forward to your answer.

    Rebecca:
    This is the standard call for a Portal-built form:
    PORTAL.wwa_app_module.link (
    p_arg_names => PORTAL.wwv_standard_util.string_to_table2('_moduleid:loc_code'),
    p_arg_values => PORTAL.wwv_standard_util.string_to_table2('2728668008:BHM'));
    The 1st parm is required, it id's the form to call; the 2nd parm, LOC_CODE, I'm having to hard-code. It relates to the specific page from where this form is called; therefore, I've several places throughout the site where I call this form and the LOC_CODE value is different. I've a field on on this form that gets populated with this value when the form comes-up, but I have it hidden. I can also use this value to drive the contents of a combo-box on the form. That's what I really needed to do; restrict the selection there based on where the form was being called from.
    Hope that helps...
    Ed in Tampa

  • Need help dynamically building combo-boxes...

    How can I dynamically build drop down lists?
    I was thinking about using a dynamic page, with bind variables
    set for sql statements inside <oracle></oracle> tags, or passing
    the variable from the first selection to the second selection of
    another page (or the same page?)...
    Another thing I was thinking about would be to base a form on a
    DB procedure, and pass the selections to the procedure, and re-
    build the lists that way...
    I need to avoid client side processing (javascript) because of
    accessiblity concerns.
    Any ideas would be greatly appreciated...
    Ryan

    Ajay,
    The following is an excerpt of the code I used. Because of a
    lack of time, I haven't made the code generic. The code is used
    to interface with Oracle Reports 6i & Oracle Configurator. The
    configurator (config_hdr_id & config_rev_nbr) parameters are
    selected by the user and passed into Oracle Reports using related
    dynamic combo-boxes. Pay particular attention to the
    wwpro_api_parameters.get_value function as well as the onChange
    javascript. Hope you can take pieces of this for an example.
    The following is the code for a Portal dynamic page:
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html;
    charset=iso-8859-1">
    <title>Configurator Reports</title>
    <SCRIPT LANGUAGE="JavaScript1.1">
    <!-- Comment out script for old browsers
    ** this function will open a new URL for the Reports CGI
    ** executable to run the report
    function runReport()
    // semi-constants for JavaScript
    var cgiexe = "runrep.sh";
    var slash = "/";
    var colon = ":";
    var qmark = "?";
    var paramsep = "&";
    ** URL parameter values
    ** We should check for nulls, http://, etc. but not for now
    var dtlist = document.REPFORM.WEBHOST;
    var WEBHOST = dtlist.options[dtlist.selectedIndex].value;
    var WEBPORT = document.REPFORM.WEBPORT.value;
    var dtlist = document.REPFORM.SERVER;
    var SERVER = dtlist.options[dtlist.selectedIndex].value;
    var dtlist = document.REPFORM.REPORT;
    var REPORT = dtlist.options[dtlist.selectedIndex].value;
    var dtlist = document.REPFORM.P_HEADER_ID;
    var P_HDR_ID = dtlist.options[dtlist.selectedIndex].value;
    var P_REV_NBR = document.REPFORM.P_REV_NBR.value;
    var dtlist = document.REPFORM.USERID;
    var USERID = dtlist.options[dtlist.selectedIndex].value;
    var dtlist = document.REPFORM.DESTYPE;
    var DESTYPE = dtlist.options[dtlist.selectedIndex].value;
    var dflist = document.REPFORM.DESFORMAT;
    var DESFORMAT = dflist.options[dflist.selectedIndex].value;
    var dtlist = document.REPFORM.MIMETYPE;
    var MIMETYPE = dtlist.options[dtlist.selectedIndex].value;
    // construct the final URL given the parameters
    var URL = "http://" + WEBHOST + colon + WEBPORT +
    "/dev60cgi/"
    + cgiexe + qmark +
    "server=" + SERVER + paramsep +
    "report=" + REPORT + paramsep +
    "p_header_id=" + P_HDR_ID + paramsep +
    "p_rev_nbr=" + P_REV_NBR + paramsep +
    "userid=" + USERID + paramsep +
    "destype=" + DESTYPE + paramsep +
    "desformat=" + DESFORMAT + paramsep +
    "mimetype=" + MIMETYPE;
    // alert("Opening a window with the following URL : \r\r" +
    URL);
    // open the new window with the constructed URL
    //runWindow = window.open(URL);
    //Point the current window to the URL to run the form
    this.window.location.href=URL;
    function getRevision(form)
    var l_config_hdr_id =
    form.P_HEADER_ID.options[form.P_HEADER_ID.selectedIndex].value;
    window.location.href =
    "/pls/portal30/!PORTAL30.wwpob_page_util.redirect?_pageid=61&_tab
    string=&_portletmode=&_cache=1&cz.p_config_hdr_id="+l_config_hdr_
    id;
    return false;
    //-->
    </SCRIPT>
    </head>
    <body>
    <form NAME="REPFORM" METHOD="GET" onSubmit="return false">
    <table BORDER=0 CELLSPACING="5" valign="top" align="left">
    <tr>
    <td ALIGN=LEFT COLSPAN="2"><font face="arial" size="-1"><B>Enter
    configuration data and click the button to submit the selected
    report.</B></font></td>
    </tr>
    <TR><TD> </TD></TR>
    <tr><td valign="top"><table BORDER=0 CELLSPACING="2">
    <TR><TD COLSPAN="3" ALIGN="LEFT">
    <FONT COLOR="#6666CC" FACE="arial,helvetica"
    SIZE="-1"><NOBR><B>Report Parameters</B></NOBR></FONT>
    </TD></TR>
    <tr>
    <td ALIGN=LEFT><font face="arial" size="-1">Report:</font></td>
    <td><font face="arial" size="-1"><select NAME="REPORT">
    <option SELECTED
    VALUE="portal_test_report_6i.rdf">portal_test_report_6i.rdf
    </select></font></td>
    </tr>
    <ORACLE>
    -- Dynamically retrieving the Configurator Header ID's.
    -- kreierso 8-oct-01
    declare
    v_config_hdr_id oc_config_ord_qte_lookup.config_hdr_id%type;
    begin
    v_config_hdr_id :=
    to_number(portal30.wwpro_api_parameters.get_value('p_config_hdr_i
    d','cz'));
    htp.p('<TR><TD ALIGN="left"><font face="arial"
    size="-1">Configuration Header ID:</font></TD>');
    htp.p('<TD><font face="arial" size="-1"><SELECT
    NAME="P_HEADER_ID" onchange="getRevision(this.form)">');
    htp.p('<OPTION VALUE=" "> ');
    for r_get_hdr_values in (
    select cz.config_hdr_id, cz.config_rev_nbr
    from cz_config_hdrs cz
    order by cz.config_hdr_id desc
    ) loop
    if v_config_hdr_id = r_get_hdr_values.config_hdr_id then
    htp.p('<OPTION SELECTED
    VALUE="'||r_get_hdr_values.config_hdr_id||'">'||r_get_hdr_values.
    config_hdr_id);
    else
    htp.p('<OPTION
    VALUE="'||r_get_hdr_values.config_hdr_id||'">'||r_get_hdr_values.
    config_hdr_id);
    end if;
    end loop;
    htp.p('</SELECT></font>');
    htp.p('</TD></TR>');
    htp.p('<TR><TD ALIGN="left"><font face="arial"
    size="-1">Configuration Revision:</font></TD>');
    htp.p('<TD><font face="arial" size="-1"><SELECT
    NAME="P_REV_NBR">');
    for r_get_rev_values in (
    select cz.config_rev_nbr
    from cz_config_hdrs cz
    where cz.config_hdr_id = v_config_hdr_id
    order by cz.config_rev_nbr desc
    ) loop
    htp.p('<OPTION
    VALUE="'||r_get_rev_values.config_rev_nbr||'">'||r_get_rev_values
    .config_rev_nbr);
    end loop;
    htp.p('</SELECT></font></TD></TR>');
    end;
    </ORACLE>
    <tr>
    <td ALIGN=LEFT><font face="arial" size="-1">Format:</font></td>
    <td><font face="arial" size="-1"><select NAME="DESFORMAT">
    <option SELECTED VALUE="RTF">RTF
    <option VALUE="PDF">PDF
    <option VALUE="HTML">HTML</select></font></td>
    </tr>
    <tr><td> </td></tr>
    <tr>
    <td ALIGN=RIGHT><FONT face="arial" size="-1"><input TYPE="SUBMIT"
    NAME="Runrep" VALUE="Run Report"
    onClick="runReport();"></FONT></td>
    <td ALIGN=RIGHT><FONT face="arial" size="-1"><input TYPE="RESET"
    NAME="Reset" VALUE="Reset"></FONT></td>
    </tr>
    </table></td>
    <td valign="top"><table BORDER=0 CELLSPACING="2">
    <TR><TD COLSPAN="3" ALIGN="LEFT">
    <FONT COLOR="#6666CC" FACE="arial,helvetica"
    SIZE="-1"><NOBR><B>Report Paremeters (Hidden
    Candidates)</B></NOBR></FONT>
    </TD></TR>
    <tr>
    <td ALIGN=LEFT><font face="arial" size="-1">Userid:</font></td>
    <td><font face="arial" size="-1"><select NAME="USERID">
    <option SELECTED
    VALUE="kreierso/password@DEV11">kreierso/password@DEV11
    </select></font></td>
    </tr>
    <tr>
    <td ALIGN=LEFT><font face="arial" size="-1">Type:</font></td>
    <td><font face="arial" size="-1"><select NAME="DESTYPE">
    <option SELECTED VALUE="cache">cache
    <option VALUE="Printer">printer
    <option VALUE="File">file
    </select></font></td>
    </tr>
    <tr>
    <td ALIGN=LEFT><font face="arial" size="-1">Mimetype:</font></td>
    <td><font face="arial" size="-1"><select NAME="MIMETYPE">
    <option SELECTED VALUE="application/msword">application/msword
    </select></font></td>
    </tr>
    <tr>
    <td ALIGN=LEFT><font face="arial" size="-1">Reports
    Server:</font></td>
    <td><font face="arial" size="-1"><select NAME="SERVER">
    <option SELECTED
    VALUE="Rep60_dev11_shane.dci.com">Rep60_dev11_shane.dci.com
    </select></font></td>
    </tr>
    <tr>
    <td ALIGN=LEFT><font face="arial" size="-1">Web Host:</font></td>
    <td><font face="arial" size="-1"><select NAME="WEBHOST">
    <option SELECTED VALUE="shane.dci.com">shane.dci.com
    </select></font></td>
    </tr>
    <tr>
    <td ALIGN=LEFT><font face="arial" size="-1">Web Port:</font></td>
    <td><font face="arial" size="-1"><input type=hidden
    NAME="WEBPORT" VALUE="7500">7500</font></td>
    </tr>
    </td></tr></table>
    <TR><TD> </TD></TR>
    <TR><TD ALIGN="CENTER" COLSPAN="2">
    <font face="arial" size="+1" color="#000099">This is currently
    being developed.... ~Thanks, Kirk.</font>
    </TD></TR>
    </table>
    </form>
    </body>
    </html>

  • Create combo box from another

    I currently have a combo box in my movie. The selections are 1, 2, 3,  and 4. I would like to generate another X combo boxes of the same structure based on that number. I.e. Someone choose 2 in ComboBoxA. So 2 of ComboxB's are generated below that.
    Can someone help with the syntax?
    Thanks,
    Brandon

    import mx.controls.ComboBox;
    var tl:MovieClip = this;
    var lo:Object = new Object();
    lo.close = function(eobj:Object) {
        for (var i = 0; i<eobj.target.selectedItem.label; i++) {
            var cba:ComboBox = tl.createClassObject(mx.controls.ComboBox,"cb_"+i,i);
            cba._x = cb._x;
            cba._y = cb._y+(i+1)*cba._height;
            cba.dataProvider = [whatever];
    cb.addEventListener("close",lo);

  • Help needed in getting values from the dynamically created text boxes

    Hello,
    I am developing one jsp page using struts. In the page i m
    dynamically adding some rows with two text boxes in each row. and after entering data into
    those textboxes , user clicks on save button and page is submitted.
    I want to capture all this data of dynamically added
    rows so that i can enter those rows into DB.
    how can i acheive this using struts?.
    Have anyone had tried doing it?. Please help.
    Thanx in advance
    Deepali Naik

    Hi,
    1. If you give these textBoxes the same name, then in your action you can call request.getParameterValues(paramName) - it returns String[ ] of values.
    2. You can give form textBox names like "name"+index or something like this in <logic:iterate> tag
    Good luck!

  • How to populate the combo boxes that are created dynamically in jsp

    Hi,
    I am using JSP.
    I am creating combo boxes dynamically (based on the num selected by the user). These dynamically created combo boxes need to have A-Z as options (each box) . Now, when the user chooses the option A in any of the combo-boxes,the rest should not have this option. so on..
    how do i achieve this.Kindly help.

    You'll need to use JavaScript...I have a complicated example and a simple example, however, I cannot really understand the complex example but I know how it works. The looping is too complex for me.
    First you'll need to populate a server side variable...depending on how often the data is updated you may want this to run each time a new session is created...this example is run each time Tomcat is started and the application context is initialized:
    package kms.web;
    // Servlet imports
    import javax.servlet.ServletContextListener;
    import javax.servlet.ServletContextEvent;
    import javax.servlet.ServletContext;
    // utility imports
    import java.util.Map;
    // domain imports
    import kms.domain.LocationService;
    import kms.domain.DeptService;
    import kms.domain.PatentService;
    * This listenter is used to initialize
    * the Maps of Locations, Patents & Depts used to populate
    * pulldown lists in JSPs
    public class InitializeData implements ServletContextListener {
        * This method creates the Maps.
       public void contextInitialized(ServletContextEvent sce) {
          ServletContext context = sce.getServletContext();
          LocationService lServ = new LocationService();
          // Create the Maps
          Map campuses = lServ.getCampuses();
          Map buildings = lServ.getBuildings();
          Map floors = lServ.getFloors();
          Map locs = lServ.getLocations();
          // And store them in the "context" (application) scope
          context.setAttribute("campuses", campuses);
          context.setAttribute("buildings", buildings);
          context.setAttribute("floors", floors);
          context.setAttribute("locs", locs);
          DeptService dServ = new DeptService();
          Map depts = dServ.getDepts();
          context.setAttribute("depts", depts);
          PatentService pServ = new PatentService();
          Map patents = pServ.getPatents();
          context.setAttribute("patents", patents);
          //I did this one myself
    /*    CodeService cServ = new CodeService();
          Map masterMks = cServ.getCodes();
          context.setAttribute("masterMks", masterMks);
        * This method is necessary for interface.
       public void contextDestroyed(ServletContextEvent sce) {
       // I have no clue what the heck this is for???
       // Let me know if you do!
    }So now we travel into the PatentService method called 'getPatents();' which in turn calls a PatentDAO method
    Map patents = pServ.getPatents();
    Below is the code for the PatentService object:
    package kms.domain;
    import kms.util.ObjectNotFoundException;
    import java.util.*;
    * This object performs a variety of dept services, like retrieving
    * a dept object from the database, or creating a new dept object.
    public class PatentService {
       * The internal Data Access Object used for database CRUD operations.
      private PatentDAO patentDAO;
       * This constructor creates a Dept Service object.
      public PatentService() {
        patentDAO = new PatentDAO();
    public Map getPatents() {
          Map patents = null;
          try {
            patents = patentDAO.retrieveAll();
          // If the dept object does not exist, simply return null
          } catch (ObjectNotFoundException onfe) {
            patents = null;
          return patents;
    }It may be useful for you to see the code of the Patent class:
    package kms.domain;
    /*** This domain object represents a dept.
    public class Patent implements java.io.Serializable {
      private int codeGgm;
      private String name = "";
      private String description = "";
      private int creator;
      private String creationDate = "";
      private int used;
       * This is the full constructor.
      public Patent(int codeGgm, String name, String desc, int creator, String creationDate, int used) {
        this.codeGgm = codeGgm;
        this.name = name;
        this.description = desc;
        this.creator = creator;
        this.creationDate = creationDate;
        this.used = used;
      public Patent() { }
      public int getCodeGgm() {
          return codeGgm;
      public void setCodeGgm(int codeGgm) {
           this.codeGgm = codeGgm;
      public String getName() {
        return name;
      public void setName(String name) {
          this.name = name;
      public String getDesc() {
        return description;
      public void setDesc(String desc) {
          this.description = desc;
      public int getCreator() {
          return creator;
      public void setCreator(int creator) {
             this.creator = creator;
      public String getCreationDate() {
          return creationDate;
      public void setCreationDate(String creationDate) {
             this.creationDate = creationDate;
      public int getUsed() {
           return used;
      public void setUsed(int used){
           this.used = used;
    }And here is the Database table which stores the Patents:
    DESC PATENT:
    CODE_GGM NUMBER(3)
    NAME VARCHAR2(15)
    DESCRIPTION VARCHAR2(250)
    CREATOR NUMBER(10)
    CREATION_DATE DATE
    USED NUMBER(1)
    So, we then travel into the code of the PatentDAO to see how the DAO object executes the DB query to get all of the Data we need for the select list:
    package kms.domain;
    import javax.naming.*;
    import javax.sql.*;
    import java.util.*;
    import java.sql.*;
    import kms.util.*;
    * This Data Access Object performs database operations on Patent objects.
    class PatentDAO {
       * This constructor creates a Patent DAO object.
       * Keep this package-private, so no other classes have access
    PatentDAO() {
    * This method returns a Map of all the Dept names
    * The key is the Dept id
    Map retrieveAll()
           throws ObjectNotFoundException {
          Connection connection = null;
          ResultSet results = null;
          // Create the query statement
          PreparedStatement query_stmt = null;
          try {
            // Get a database connection
          Context initContext = new InitialContext();
           DataSource ds = (DataSource)initContext.lookup("java:/comp/env/jdbc/keymanOracle");
           connection = ds.getConnection();
            // Create SQL SELECT statement
            query_stmt = connection.prepareStatement(RETRIEVE_ALL_NAMES);
            results = query_stmt.executeQuery();
            int num_of_rows = 0;
          Map patents = new TreeMap();
             // Iterator over the query results
            while ( results.next() ) {
                patents.put(new Integer(results.getInt("code_ggm")), results.getString("name"));
             if ( patents != null ) {
                      return patents;
                    } else {
                      throw new ObjectNotFoundException("patent");
           // Handle any SQL errors
         } catch (SQLException se) {
            se.printStackTrace();
           throw new RuntimeException("A database error occured. " + se.getMessage());
        } catch (NamingException se) {
          throw new RuntimeException("A JNDI error occured. " + se.getMessage());
          // Clean up JDBC resources
          } finally {
            if ( results != null ) {
              try { results.close(); }
              catch (SQLException se) { se.printStackTrace(System.err); }
            if ( query_stmt != null ) {
              try { query_stmt.close(); }
              catch (SQLException se) { se.printStackTrace(System.err); }
            if ( connection != null ) {
              try { connection.close(); }
              catch (Exception e) { e.printStackTrace(System.err); }
    private static final String RETRIEVE_ALL_NAMES
          = "SELECT code_ggm, name FROM patent ";
    }Now when you wish to use the 'combo box' (also called select lists), you insert this code into your jsp:
    <TR>
    <%@ include file="../incl/patent.jsp" %>
    </TR>
    depending on how your files on your server are organized, the "../incl/patent.jsp"
    tells the container to look up one directory from where the main jsp is to find the 'patent.jsp' file in the 'incl' directory.
    I need some help creating multi-level select lists with JavaScript:
    Can anyone explain this code:
    <%@ page import="java.util.*,kms.domain.*" %>
    <jsp:useBean id="campuses" scope="application" class="java.util.Map" />
    <TR><TD ALIGN='right'>Campus: </TD>
    <TD>
    <select name="campus" size="1" onChange="redirect(this.options.selectedIndex)">
    <option value="0" selected>No Campus</option>
    <% LocationService ls = new LocationService();
       Iterator c = campuses.keySet().iterator();
       Map[] bm = new Map[campuses.size()];
       Map[][] fm = new Map[campuses.size()][0];
       Map[][][] lm = new Map[campuses.size()][0][0];
       int i2 = 0;
       int j2 = 0;
       int k2 = 0;
       int jj = 0;
       int kk = 0;
       while (c.hasNext()) {
          Integer i = (Integer)c.next();
          out.print("<OPTION ");
          out.print("VALUE='" + i.intValue()+ "'>");
          out.print( (String) campuses.get(i) );
          out.print("</OPTION>");
          bm[i2] =  ls.getBuildingsByCampus(i.intValue());
          fm[i2] = new Map[bm[i2].size()];
          lm[i2] = new Map[bm[i2].size()][];
          Iterator b = bm[i2].keySet().iterator();
          j2 = 0;
          while (b.hasNext()) {
            Integer j = (Integer)b.next();
            fm[i2][j2] = ls.getFloorsByBuilding(j.intValue());
            lm[i2][j2] = new Map[fm[i2][j2].size()];
            Iterator f = fm[i2][j2].keySet().iterator();
            k2 = 0;
            while (f.hasNext()) {
              Integer k = (Integer)f.next();
              lm[i2][j2][k2] = ls.getLocationsByFloor(k.intValue());
              k2++;
              kk++;
            j2++;
            jj++;
          i2++;
       } %>
    </select></TD>
    </TR>
    <TR><TD ALIGN='right'>Building: </TD>
    <TD>
    <select name="building" size="1" onChange="redirect1(this.options.selectedIndex)">
    <option value="0" selected>No Building</option>
    </select></TD>
    </TR>
    <TR><TD ALIGN='right'>Floor: </TD>
    <TD>
    <select name="floor" size="1" onChange="redirect2(this.options.selectedIndex)">
    <option value="0" selected>No Floor</option>
    </select></TD>
    </TR>
    <TR><TD ALIGN='right'>Room: </TD>
    <TD>
    <select name="location_id" size="1">
    <option value="0" selected>No Room</option>
    </select></TD>
    </TR>
    <script>
    var cNum = <%=i2%>
    var bNum = <%=jj%>
    var fNum = <%=kk%>
    var cc = 0
    var bb = 0
    var ff = 0
    var temp=document.isc.building
    function redirect(x){
    cc = x
    for (m=temp.options.length-1;m>0;m--)
      temp.options[m]=null
      temp.options[0]=new Option("No Building", "0")
      if (cc!=0) {
        for (i=1;i<=group[cc-1].length;i++){
          temp.options=new Option(group[cc-1][i-1].text,group[cc-1][i-1].value)
    temp.options[0].selected=true
    redirect1(0)
    var group=new Array(cNum)
    for (i=0; i<cNum; i++) {
    group[i]=new Array()
    <% for (int i=0; i< bm.length; i++) {
    Iterator bldgs = bm[i].keySet().iterator();
    int j = 0;
    while (bldgs.hasNext()) {
    Integer intJ =(Integer) bldgs.next(); %>
    group[<%=i%>][<%=j%>] = new Option("<%=bm[i].get(intJ)%>", "<%=intJ%>");
    <% j++;
    } %>
    var group2=new Array(cNum)
    for (i=0; i<cNum; i++) {
    group2[i] = new Array()
    for (j=0; j<=bNum; j++) {
    group2[i][j] = new Array()
    <% for (int i=0; i< fm.length; i++) {
    for (int j=0; j< fm[i].length; j++) {
    Iterator flrs = fm[i][j].keySet().iterator();
    int k = 0;
    while (flrs.hasNext()) {
    Integer intK =(Integer) flrs.next(); %>
    group2[<%=i%>][<%=j%>][<%=k%>] = new Option("<%=fm[i][j].get(intK)%>", "<%=intK%>");
    <% k++;
    } %>
    var temp1=document.isc.floor
    var camp=document.isc.campus.options.selectedIndex
    function redirect1(x){
    bb = x
    for (m=temp1.options.length-1;m>0;m--)
    temp1.options[m]=null
    temp1.options[0]=new Option("No Floor", "0")
    if (cc!=0 && bb!=0) {
    for (i=1;i<=group2[cc-1][bb-1].length;i++){
    temp1.options[i]=new Option(group2[cc-1][bb-1][i-1].text,group2[cc-1][bb-1][i-1].value)
    temp1.options[0].selected=true
    redirect2(0)
    var group3=new Array(cNum)
    for (i=0; i<cNum; i++) {
    group3[i] = new Array()
    for (j=0; j<=bNum; j++) {
    group3[i][j] = new Array()
    for (k=0; k<=fNum; k++) {
    group3[i][j][k] = new Array()
    <% for (int i=0; i< lm.length; i++) {
    for (int j=0; j< lm[i].length; j++) {
    for (int k=0; k< lm[i][j].length; k++) {
    Iterator locs = lm[i][j][k].keySet().iterator();
    int m = 0;
    while (locs.hasNext()) {
    Integer intM =(Integer) locs.next(); %>
    group3[<%=i%>][<%=j%>][<%=k%>][<%=m%>] = new Option("<%=lm[i][j][k].get(intM)%>", "<%=intM%>");
    <% m++;
    } %>
    var temp2=document.isc.location_id
    function redirect2(x){
    ff = x
    for (m=temp2.options.length-1;m>0;m--)
    temp2.options[m]=null
    temp2.options[0]=new Option("No Room", "0")
    if (cc!=0 && bb!=0 && ff!=0) {
    for (i=1;i<=group3[cc-1][bb-1][ff-1].length;i++){
    temp2.options[i]=new Option(group3[cc-1][bb-1][ff-1][i-1].text,group3[cc-1][bb-1][ff-1][i-1].value)
    temp2.options[0].selected=true
    </script>
    This produces a related select list with 4 related lists by outputting JavaScript to the page being served. It works the same way as the first example that I describe but I don't understand the looping...maybe someone could explain how to go from the single select list to a double and/or triple level drill down?

  • Ring combo box

    Hi,
    I've search high and low for this one-I need to create combo box on a ring control where the user can manually input the values. I have over 3000 items to put in the ring, and it is simply ridiculous to try and search a pull down menu. It is such a simple thing to have but I can't find it anywhere
    I've messed around with custom controls, but there doesnt seem to be a way to change out actual components. Every time I change out the box, it turns it into a string control. I need the functionality of a text input with a numeric output because I am using the numeric output to index strings on a .csv file
    Thanks,
    Ryan

    Ryan,
    If we want the combo box functionality as an enum or ring control, its actually pretty easy to create using the combo box and a couple property nodes. There are two pieces of information in a combo box, one is the string, one is the value. Typically these are the same thing, but they dont have to be. The string is what you see, the value is what you read it as. If you set the string from your information and dictate the value as the desired index, then convert the values to an int, you should be able to get the functionality of a searchable enum/ring. 
    I have uploaded an example which shows this to the community here: https://decibel.ni.com/content/docs/DOC-18384
    Regards,
    Kyle Mozdzyn
    Applications Engineering
    National Instruments
    Regards,
    Kyle M.
    Applications Engineering
    National Instruments

  • Need help @ listening combo box

    Hi Everyone,
    below is my code. Please find my question between '?'ed lines.
    // CREATE COMBO BOX
    if(obj.equals(CSV_COMBO_BOX))
         _combobox[_combobox_count] = new JComboBox();
         //get possible value for combo box
         String [] possible_values = get_possible_values(val[i]);
         for(int i=0; i < possible_values.length; ++i)
         _combobox[_combobox_count].addItem(possible_values[i]);
         //set the default value to usr_val[i]
         _combobox[_combobox_count].setSelectedItem(usr_val[i]);
         // add to panel
         panel.add("tab",_combobox[_combobox_count]);
         // listner
         _combobox[_combobox_count].addItemListener(new ItemListener(){
              public void itemStateChanged(ItemEvent e)
    // ? I WANT TO UPDATE usr_val[i] here ?
    // ? how could i get the value of "i" or
    // combobox_counter in this block?????????
    // ???????????????????????????????<?????
         comboboxcount++;
    Thanks & Regards
    Vikas Talwar

    Hi Everyone,
    below is my code. Please find my question between '?'ed lines.
    // CREATE COMBO BOX
    if(obj.equals(CSV_COMBO_BOX))
         _combobox[_combobox_count] = new JComboBox();
         //get possible value for combo box
         String [] possible_values = get_possible_values(val);
         for(int i=0; i < possible_values.length; ++i)
         _combobox[_combobox_count].addItem(possible_values);
         //set the default value to usr_val
         _combobox[_combobox_count].setSelectedItem(usr_val);
         // add to panel
         panel.add("tab",_combobox[_combobox_count]);
         // listner
         _combobox[_combobox_count].addItemListener(new ItemListener(){
                public void itemStateChanged(ItemEvent e)
              // ? I WANT TO UPDATE usr_val here ?
              // ? how could i get the value of "i" or
              // _combo_box_counter in this block?????????
              // ???????????????????????????????<?????
    _combobox_count++;
    }I have two arrays: one called "val" which is an array of string arrays that you use to populate a JComboBox, and the other one is called "usr_val" that holds strings and is used to set the JComboBox default values. You want to change the default value when the selected item in the corresponding JComboBox has changed. To manage your arrays and JComboBoxes, you have
    one counter "i" which seems to count the arrays of string arrays and the array with the default strings and one counter "_combobox_count" which counts the JComboBoxes that have been genererated with the help of these arrays. Obviously, the arrays could be used to generate a different JComponent as well, in which case "i" and "_combobox_count" will have different values. Both "i" and "_combobox_count" are clearly available within the if-block, so you don�t need any extra tricks to access them. What happens if you directly access "i" or "_combobox_count" from within the "itemStateChanged"-method?
    Thanks & Regards
    Vikas Talwar

  • Problem with editable combo box and creating dynamic table values using js

    Hai
    I have used jquery.jec.js to make my dropdown list as editable... I need to create dynamic table values on the onChange event of dropdown using javascript.
    Now am facing the problem in it...
    I am getting duplicate rows in the table... think(assumption) this jquery.jec.js is calling the dropdown again creating duplicate values...
    Please help me out.... Any help is appreciable... Thanks in advance

    Thanks elOpalo, for your valuable response....
    I have found the correct way of doing.
    Before i had my code like this,
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <title>test</title>
    <script type="text/javascript" src="js/jquery-latest.js"></script>
    <script type="text/javascript" src="js/jquery.jec.js"></script>
    <script type="text/javascript">
    $(function(){
    $('#list').jec();
    function giveAlert(){
         alert('hello');
    </script>
    </head>
    <body>
    <form>
    Combo Box:
    <select id="list" name="list" onChange="giveAlert();">
    <option value="1">one</option>
    <option value="2">two</option>
    </select>
    </form>
    </body>
    </html>
    Now i have changed as the following,
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <title>test</title>
    <script type="text/javascript" src="js/jquery-latest.js"></script>
    <script type="text/javascript" src="js/jquery.jec.js"></script>
    <script type="text/javascript">
    $(function(){
    $('select.combo').jec();
    $('select.combo')
    .change(function() {
    alert($(this).val());
    }).change();
    </script>
    </head>
    <body>
    <form>
    <table>
    <tr>
    <td>Combo Box:</td>
    <td><select class="combo"><option value="b">banana</option><option value="a">apple</option></select></td>
    </tr>
    </table>
    </form>
    </body>
    </html>
    The problem is with the function i have called on the onChange Event.. Now i have defined it inside the jquery function of dropdown to make it as editable...

  • Change combo box selection dynamically?

    I would like to have a combo box change its selection dynamically according to what is selected in another selector.  As far as I can tell from reading the Help, this feature is available for List Boxes, List Views and List Builders only ("The Dynamic Selected Item functionality is available in list-based selectors") and based on the wording I assume that it is currently unavailable for other components.  Is this true?  If so I would like to formally request that other selectors - particularly combo boxes - be included.
    The use case for me is this: After the user has already inputted information and digested some of the output, they eventually reach a section of the project that appears only under certain conditions.  This area is about 800 pixels to the right of the original combo box in the inputs area, and so in order to quickly change that selection they would have to go look for the original selector, which could easily discourage them from browsing that particular selection.  Hopefully this makes sense.
    It would also be great to hear back that this kind of feature request can actually be made in this way.  I've submitted a few similar requests in the past and did not see an acknowledgment, and so I am still unclear as to whether or not feature requests are even possible.
    (Edit: I thought about creating duplicate overlapping instances of the combo boxes in question and, using dynamic visibility, control which appears according to the current selection.  But this is only suitable for smaller lists).

    >
    Alan McClean wrote:
    > To get around it I shuffled my selection list dynamically, so that the one I wanted appeared at the correct place. I did this using the source data component and some Excel logic. However, it is buggy and a lot of work.
    Thanks, Alan.  I am currently working on a similar solution.  Seems to be the best for my situation, but it is far from elegant.
    >
    Charles Davies wrote:
    > Just a thought, would the Filter component work for you?
    The Filter component requires that the underlying Excel data be structured in a pretty specific way.  As far as I can tell, I would probably have to rip apart my XLS and redesign it in order to make use of that component.  Perhaps in a future generation I'll give it a go, but I've already gone through too many redesigns this time around.

  • Needs multi column dynamic combo box using C#

    I need a dynamic Combo box to display multi columns on Drop Down Event 
    such as Stock Code, Make, Model,Sub Model, Measurement Type and so on for  my C# Application with Columns Headers 
    Please Help Me
    Thanks in Advance

    You should create a class that represents your model and then you could use a CompositeCollection as the ItemsSource of the ComboBox.
    Here is an example for you:
    namespace WpfApplication59
    public class YourModel
    public string StockCode { get; set; }
    public string Model { get; set; }
    //+ the rest of your properties
    MainWindow.xaml.cs:
    public partial class MainWindow : Window
    public MainWindow()
    InitializeComponent();
    List<YourModel> models = new List<YourModel>();
    models.Add(new YourModel() { Model = "m1", StockCode ="c1"});
    models.Add(new YourModel() { Model = "m2", StockCode = "c2" });
    cb.ItemsSource = models;
    MainWindow.xaml:
    <ComboBox x:Name="cb" Grid.IsSharedSizeScope="True" ItemsSource="{DynamicResource items}"
    xmlns:local="clr-namespace:WpfApplication59">
    <ComboBox.Resources>
    <CompositeCollection x:Key="items">
    <ComboBoxItem IsEnabled="False">
    <Grid TextElement.FontWeight="Bold">
    <Grid.ColumnDefinitions>
    <ColumnDefinition SharedSizeGroup="A"/>
    <ColumnDefinition Width="5"/>
    <ColumnDefinition SharedSizeGroup="B"/>
    </Grid.ColumnDefinitions>
    <Grid.Children>
    <TextBlock Grid.Column="0" Text="Model"/>
    <TextBlock Grid.Column="2" Text="Stock Code"/>
    </Grid.Children>
    </Grid>
    </ComboBoxItem>
    <Separator/>
    <CollectionContainer Collection="{Binding Source={x:Reference cb}, Path=DataContext}"/>
    </CompositeCollection>
    <DataTemplate DataType="{x:Type local:YourModel}">
    <Grid>
    <Grid.ColumnDefinitions>
    <ColumnDefinition SharedSizeGroup="A"/>
    <ColumnDefinition Width="5"/>
    <ColumnDefinition SharedSizeGroup="B"/>
    </Grid.ColumnDefinitions>
    <Grid.Children>
    <TextBlock Grid.Column="0" Text="{Binding Model}"/>
    <TextBlock Grid.Column="2" Text="{Binding StockCode}"/>
    </Grid.Children>
    </Grid>
    </DataTemplate>
    </ComboBox.Resources>
    </ComboBox>
    You could restyle the the templates (Grids) as per your requirements.
    Please remember to mark helpful posts as answer to close your threads and then start a new thread if you have a new question.

  • Dynamically create drop down box with JSP

    Hi,
    I hope this is not a repeat post, I have search the forum and a posting has not jumped out at me. I am making a jsp that dynamically constructs a custom SQL query.
    I have a number of text boxes with an id, my jsp page calls a servlet, the servlet reads the contorl id and the value to build the query - this works great. However, there's a large text input box which receives a number of extra conditions - this text box receives the input in the following format:
    searchAttributeName1,searchAttributeValue1;searchAttributeName2,searchAttributeValue2
    This is functional, however, it's a bit rubbish as the user has to know the special recognised attributeNames. What I would like to have is some sort of criteria control. This would consist of a drop down box populated from the servlet, a text input for the value and a button to add another criteria control. so the user could build up the number of query criteria. The drop down box ensures they cannot select the wrong keyword, pressing the add criteria button adds a new drop down box and text box pair to the screen.
    An example of this I recently saw was at Intel's jobs search web site https://jobs.intel.com/jobs/jobs.iccw - see that for example.
    Has anyone got any ideas on how to achieve this? I initially thought use jsp scripting (there is no restriction against this) but I need to use javascript I'm guessing as the button click triggers adding a new combo box. Another idea was to use styles and tables to hide the other drop down boxes but this seems like a real hack that I'd like to avoid. I can do with with .NET i hope java can deliver!
    Any ideas are much appreciated - I am a novice with java web development so please, any examples thoroughly explain (no need to explain populating the drop down box - there seem to be plenty of posts on this).
    Thanks for any help or ideas on this issue -

    Gina,
    Here is some sample code for using a ComboBox in a JSP from an EditCurrentRecord bean. This particular example uses a query, you can also populate combo boxes, list boxes, radio buttons and checkboxes from a static list. See the JavaDocs for the EditCurrentRecord bean.
    <jsp:useBean id="RowEditor" class="oracle.jbo.html.databeans.EditCurrentRecord" scope="request">
    <%
    RowEditor.initialize(application, session , request, response, out, "wt_bc_WT_bcModule.WalkthroughEngineSlidesView");
    RowEditor.setTargetUrl("WalkthroughEngineSlidesView_SubmitInsertForm.jsp");
    RowEditor.createNewRow();
    RowEditor.setReleaseApplicationResources(true);
    RowEditor.useComboBox("Presname","select pres_name,pres_name from wt_info","PRES_NAME","PRES_NAME");
    RowEditor.render();
    %>
    </jsp:useBean>
    null

  • How can I create a multi-line combo box?

    I am using Adobe Acrobat Pro 9 and I am trying to create a multi-line combo box on my fillable form.  At the bottom of this form/letter I would like to have a several paragraps that the user can choose from, but it's only allowing me to enter one line at a time.  Any help??

    Hi, Did you find the answer to this? I'm looking to create a combo box with multi-lines

  • OIM 11gR2 Add combo box UDF on Create User Form

    Hi.
    We have created a new UDF on user form. It is a lookup field and has the following lookup associated: "Lookup.Users.Continente"
    "Lookup.Users.Continente" has two values, both of them checked as Enabled.
    From the form designer all the values are displayed when selecting one default value so it is reading correctly from the lookup.
    We published the sandbox after this.
    Then we created a new sandbox and tried to add that field to the Create User Page. We went to "Create User Page", customize it and add content from "Data Component - Catalog" -> "userVO" -> Select the UDF, clicked on "Add" and selected "ADF Select One Choice".
    A new combobox is added but no values are shown. We have plublished the sandbox, restarted OIM, purged cache, etc... but it still shows an empty combo box. We have also tried adding it as "ADF Input List of values" but it does not add the field to the create user page.
    Any ideas of what are we doing wrong?
    The idea is very simple, just create a field with the same behaviour as, for example,  "User Type" field. A combobox that displays the enabled values from a lookup...
    We have also tried creating the UDF cheking the searchable option, searchable picklist and all the possible combinations.
    Thanks in advance!!

    oim version is oim 11gR2 with BP4

Maybe you are looking for

  • The CO account assignment object belongs to company code 2100, not 1100

    Hi All, My system has all different company codes assigned to one cotrolling area as a result one can change org unit and position cost center from one company code to another. I recently changed same position's cost center from co code 2000 to cost

  • Need help with setting up a stream with FMLE and FMS

    Hi guys! I'm new to this stuff, so i would love if you could guide me, and/or tell me if what i'm trying to do is even possible. This is what i'm trying to do: I am currently working on a project for Narvik University College in Norway. We are experi

  • How to create a web instance in weblogic?

              Dear All,           I want to know how to create a web instance in weblogic server?           Furthermore , where can i get more info. about the weblogic           server , including how to use those examples pages provided from           w

  • Is it possible to get this o/p in a query

    Hello All, is it possible to write a query for the output SQL> select * from emp1; EMPNO EMPNAME 100 AAA 222 BBB 333 CCC 444 DDD SQL> select * from bank; BANKID BANKNAME 1 ICICI 2 HDFC 3 SBI 4 SBH SQL> select * from emp1_bank; EMPNO BANKID 100 1 100

  • Events In Order

    Hello. A quick question if I may. I have 2 switches on my vi. One for enable and one for run. The enable switch must be pressed before the run switch. If enable switch is pressed then the enable output is on. The enable and the run have to be pressed