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

Similar Messages

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

  • 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

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

  • Combo box with bind variable from popup

    Hi.
    I had two comboboxes on a form, one having a bind variable. It works great, with the first one as bind field.
    But i want to have the first LOV to be a POPUP. So, the second LOV (combo box) needs to be refreshed when a user has picked a value from the popup list. When i do that, the second LOV is not refresehed...
    Is there a way to do this?
    (3.0.9.8.3.A)

    Hi,
    This was a bug and is fixed in 30984.
    Thanks,
    Sharmila

  • Dynamic LOV in report based on universe

    Hi experts,
    I have found the following thread and I understand that I can change the registry to have dynamic LOV for BOXI R2:
    http://scn.sap.com/thread/1524666
    Is it possible for BI4.1?
    Also is it possible for CR4E with .unx source?
    Regards,
    Gordon

    OK. The Path for 4.0 would be:
    32-bit machine:
    HKEY_LOCAL_MACHINE\SOFTWARE\SAP BusinessObjects\Suite XI 4.1\Crystal Reports\Database
    64-bit machine:
    HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\SAP BusinessObjects\Suite XI 4.1\Crystal Reports\Database
    And then create the string key per the suggestion in that thread.
    -Abhilash

  • LOV's in form combo box - how to change font size?

    Greetings:
    I've a table generated form (custom vs. tabular), with a combo-box field that fills with a LOV's that has as it's visible data, a rather long concatenated string. Therefore, this field makes the entire form rather wide when the LOV's contains a long string (as returned from the SQL that gathers the data).
    I've tried using the FONT tag in the 2nd tab (Form wizard) for custom layouts; that didn't work.
    Anyone have ideas for decreasing the font size of the LOV's? Else, I'll have to leave-out some of the info concatenated on that string.
    As always, thanks for you continued guidance and support...
    Ed in Tampa

    Hi,
    Changing the font size and other properties like font color, width, height, etc.. of the form elements can be achieved by using Cascading Style Sheet (CSS).
    It cannot be changed using <FONT> tag.
    In Portal, one can add the CSS attribute to the HTML tags in the custom layout of the form. But adding the CSS attribute to FORM elements (Input, select..)is not possible through Form wizards.
    However, this can be achieved by creating a form through the Dynamic Page. In this case you have to define your whole form.
    To know more about CSS you can visit: http://www.mako4css.com
    Thanks,
    Shivank

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

  • Auto-Suggest feature in Combo-box LOV is not displaying non-unique values

    Hi,
    I have an auto-suggest feature implementation on a combo-box lov that displays the name and email-id of a list of people. There are non-unique names in the back-end, for example :
    Abraham Mason [email protected]
    Abraham Mason [email protected]
    But when I use the auto-suggest feature and type in, say 'Ab', instead of showing both the Abraham Masons the auto-suggest displays only one of the values.
    As in the example above the email-ids of the two Abraham Masons are different and unique.
    If I use the conventional drop down menu of the combo-box then both the values are visible.
    Is the auto-suggest feature implemented in a manner so as to display only unique values?
    This is the implementation of the auto-suggest feature that I have done -
    <af:column headerText="#{bindings.RqmtAtLevel1.hints.Owner.label}"
    id="c23" sortable="true" filterable="true"
    sortProperty="Owner"
    filterFeatures="caseInsensitive">
    <af:inputComboboxListOfValues id="ownerId"
    popupTitle="#{ResourcesGenBundle['Header.SearchandSelect.Searchandselectanobjectusingad']}: #{bindings.RqmtAtLevel1.hints.Owner.label}"
    value="#{row.bindings.Owner.inputValue}"
    model="#{row.bindings.Owner.listOfValuesModel}"
    required="#{bindings.RqmtAtLevel1.hints.Owner.mandatory}"
    columns="#{bindings.RqmtAtLevel1.hints.Owner.displayWidth}"
    shortDesc="#{bindings.RqmtAtLevel1.hints.Owner.tooltip}"
    autoSubmit="true">
    <f:validator binding="#{row.bindings.Owner.validator}"/>
    <af:autoSuggestBehavior suggestedItems="#{row.bindings.Owner.suggestedItems}"/>
    </af:inputComboboxListOfValues>
    </af:column>
    Thanks,
    Anirudh Acharya

    Hi,
    don't find a bug entry about this, so if this indeed is a defect then this has not been filed. Do you have a test case ? If you have please zip it up and send it in a mail to me. My mail address is in my OTN profile (just click on my name until you get to the profile). Pleas rename the "zip" extension to "unzip" and mention the JDeveloper release you work with. The test case should work against the Oracle HR schema.
    If you need to track the issue, I suggest to file a service request with customer support yourself
    Frank

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

  • Dynamically populating a combo box in Forms

    I am having a hard time figuring out how to dynamically populate a combo box at run time. Could someone give me any ideas?
    thanks, Robin

    Use the built-in Populate_list. Read help on that and you'll know how to set it up.

  • Dynamic Combo Boxes

    Hi,
    I have an interface that has 2 combo boxes; in the first you select a product, in the second a type of that product. Now how is possible to make a dynamic changing content combobox?
    Thanks

    Replace the model of the second box with a new one. i.e. When a selection is made in the first box, use 'box.setModel(...)' and replace the current model with a new one.
    ICE

  • Tab Component Dynamic Visibility to Combo Boxes

    I am using a Tab component.  I have 3 tabs on my dashboard.  I have 2 Combo boxes that I am using to filter rows of data on 3 Excel sheets.  Both Combo boxes are not used on all the tabs.  How can I pass example: User clicks on Tab 1 and use dynamic visibility for Combo Box 1 and Combo Box 2 are visible.  If the user clicks on Tab 2 I want only Combo Box 1 to be visible.

    Hi Joe,
    This can be achieved in Dynamic visibility.
    On click on Tab,just map to some target(say value "1") and then For Combo box,set target cell mapped for tab to 1,which means when the target cell gets "1",show the Combo box.
    If you are not clear then you can refer the following URL,which will give you more informations about this.
    http://everythingxcelsius.com/2008/08/tip-7-xcelsius-dynamic-visibility-video-tutorial.html
    Rgds,
    Murali

  • Dynamically change the contents of one combo box based on the other

    Hi Forum,
    I have a question which might have a possibly simple answer. Well anyway help me out since i could not find the simple answer.
    I am building an application using Swing and binding with BC4J using JClient. My GUI has combo boxes, grids, editboxes. My requirement is that i should be able to dynamically change the contents of one combo box based on the selected item in trhe previous combo box. For example, when i choose a country in the "country combo box", the "states combo box" should show the list of the states of the selected country.
    Now how do i do this using binding. If not, how do i write custom querirs in BC4J layer and return a resultset to the remote application so theat i can populate the dependent combo boxes.
    I will appreciate if anyone can help me out in this regard.
    Thank You
    Sumit

    there could be quite a few number of ways of solving this problem.
    One way is through event handlers.
    taking your example as a model when user selects a country you could fire an action with a flag set to ture. A method will return the states from the DB or your temporary files or what ever and then the true flag will be used in the states combo box rendering.
    other way: javascript
    this might be a bit clumsy as you will need the states information in a property file and you can get the info as the user selects a country.
    regards,
    raj

  • Dynamic number of Combo boxes in an applet

    Hi,
    I'm quite new to Java & rite now, i've an reqt to build an applet. The problem is my applet will be having a dynamic number of combo boxes in it. This number is based on the parameter passed to the applet..
    any eg or references to a similar reqt would be very helpful.
    Regards
    -Sree Ram

    Define your combo boxes dynamically and put them in a vector:
    int numberOfComboBoxes = 7;
    Vector comboBoxes = new Vector( numberOfComboBoxes );
    for ( int i = 1; i <= numberOfComboBoxes; i++ ) {
    comboBoxes.add( i - 1, new Choice() );
    Now you can reference the combo boxes any time you like, no matter how many of them there are:
    for ( int j = 1; i < numberOfComboBoxes; i++ ) {
    System.out.println( ((Choice)comboBoxes.get( j - 1 )).getSelectedItem() );
    }

Maybe you are looking for