Dynamic select list as APEX plug-in custom attribute?

I'm developing a region plug-in in APEX 4.0.1. I wanted to make one of the custom attributes a select list where the options offered were the current application list templates (queried from the <tt>apex_application_temp_list</tt> view: the rendered plug-in region should be styled using a standard list template from the current theme). However, the Select List plug-in custom attribute type only appears to support static lists. Can anyone confirm that I've not missed anything and that this is indeed the case?
If so, it seems that the plug-in will have to rely on developers typing a list template name into a text box, which is far from ideal. (Unless anyone can suggest a workaround?)
Component specific templates can be applied to several built-in component types&mdash;lists, calendars, reports&mdash;so it would make sense for there to be a similar capability for plug-ins where these are congruent with an existing template type, e.g. by providing a Template Picker plug-in custom attribute type.

Hi,
you have not missed anything. Plug-in attributes of type "Select List" just support static values. And I'm not sure if a query based Select List would really help, because what happens if the template is deleted. Or in the reports where it shows if the template is in use.
So I think your second approach to extend plug-in attributes to link to certain shared components (Lists, Templates) is the better way forward, because that will also allow us to know what you are actually referencing and we can use that information in reports, delete operations, ...
Will add it to possible enhancements for 4.1
Regards
Patrick
My Blog: http://www.inside-oracle-apex.com
APEX 4.0 Plug-Ins: http://apex.oracle.com/plugins
Twitter: http://www.twitter.com/patrickwolf

Similar Messages

  • Dynamic Select List - XML and umlaut

    Hi, I've recently implement a dynamic select list as per [this thread|http://forums.oracle.com/forums/thread.jspa?threadID=327306], however it seems to break if I have any words containing an umlaut. I've tried setting the header on the Application Process to UTF-8 (OWA_UTIL.mime_header ('text/xml', FALSE, 'utf-8');) but it doesn't seem to make any difference. The word in particular giving me problems is Kühne - it's the only non english entry so far, but I would expect others in the future.
    Does anyone have any ideas how to allow this character to be parsed correctly? Short of using replace to check for this and every other possible character I'm not sure what else to do.
    Thanks

    Pete88 wrote:
    Hello
    I would like to create a dynamic select list where you can start entering a name and select list reduces with each character entered.
    E.g. A list of towns in the UK where you want to select London. This list is delay as normal and as start typing by the time you have entered “Lon” the list only has few names starting with “Lon”
    I expect I need a JavaScript to active this?Not in APEX 4.x. Use a Text Field with autocomplete item.

  • Dynamic Select List in Reports

    Hi,
    I have come across solutions to implement dynamic Select Lists. But can the same be implemented in a report.
    I have a report of 2 columns which are select lists. The Value of one depends of the other.
    Can this be done?
    Thanks in Advance

    Hi Abdullah,
    Thanks for the Tip. However, couple of queries.
    1) The first modification involves changing the query to : select lov_pkg.savekey() , colA, colB, ... But the function savekey takes a value.
    Ideally, I need this function to be called while loading and when the first select list is changed. How can this be done.
    2) Also, To make this change in query, I had to use (Use Generic Column Names (parse query at runtime only)) option. Now my Add Row button doesnt work? Can you tell me how that can be customized.
    Thanks,
    Sunil

  • Default value dynamic select list

    Hi everybody,
    I have a question concerning dynamic select lists.
    I have a report of a table that shows some records. Each record has different versions of data. So when you click on a record you get to another page where you get some information about this record and where you can select the version of this information (with the help of a select list).
    The select list works fine and is defined dynamically as follows:
    select distinct a.name display_value,
    a.version_id return_value
    from cn_pl_version a,
    cn_pl_std_peplanung b
    WHERE a.version_ID = b.version_id AND
    b.pe_id = '&P6_HELP_PRODET.'
    order by a.version_id desc
    My problem is that when I click on a record I always get the report filled with the oldest version of the current record, so I always have to choose the newest version in the select list manually. I would prefer always to have the newest version in the report.
    The query for the report is as follows:
    select
    (select sum(stunden) from cn_pl_std_peplanung t02
    where abt_id = '10'
    and t02.pe_id = t1.pe_id
    and t02.version_id = t1.version_id
    and t02.idee_id = t1.idee_id) stunden_ir,
    (select name from cn_pl_version u01
    where u01.version_id = t1.version_id) Version
    from cn_pl_std_peplanung t1, cn_pl_projektelemente z1, cn_pl_version u1, cn_pl_projektidee s1
    where t1.version_id = '&P6_VERSION_WAHL.'
    and t1.pe_id = z1.pe_id
    and z1.pe_id='&P6_HELP_PRODET.'
    group by t1.pe_id, t1.version_id, t1.idee_id
    '&P6_VERSION_WAHL.' is the item of the select list
    '&P6_HELP_PRODET.' is the ID of the current record
    I'm not sure if you understood my problem, my english isn't the best...
    Thanks for any kind of help!!
    Patrick

    Hi Patrick,
    what value does you select list show, when you branch to the page? Is it the correct one?
    If not you should change your select list, that the correct version is selected as default. You can define a "default value" when you set the source of the element.
    Otherwise you can maybe set up an example application at http://apex.oracle.com.
    Best Regards
    chrissy

  • Creating a dynamic Selection List based on a View Object

    Hello,
    I'm new to JDeveloper and I would like to create a JSP Page with dynamic Selection List based on a runtime query or based on a view object (BC4J). The selection made by an user should serve another dynamic query with the necessary parameters that I built using createViewObjectFromQueryStmt(). By now I tried this using the InputSelectLOV from the Component Palette in JDeveloper. But without success. By the way: the selection list is not very large (5 values), so it's not necessary to have a form finding the desired value.
    Maybe someone had experience about creating this already. Please give me a tip or a little example.
    Thanks.

    http://otn.oracle.com/products/jdev/howtos/jsp/renderers.html

  • Dynamic select list crashes with php

    HI All,
    I can't seem to get a dynamic select list to work in
    dreamweaver. It completly crashes everytime I try adding it to my
    page. I found someone else in the forum who had the same problem
    but no one ever responded. I've tried several things including
    putting just the record set and dynamic select on it's own page
    with no other code on it. It still crashes DW. I also tried coding
    it myself by making a listmenu and modifying it so that the option
    value equals a PHP echo of a value. It crashed there too. Does
    anyone have a piece of code with a working dynamic select list that
    uses a record set that I could look at? That way I can see where
    I'm going wrong. All I'm trying to do is get a simple drop down
    select list of employee names so someone can choose their name to
    get commission. It's a one table, 2 fields (first & last name)
    record set.
    Using DW CS3, php & MySQL.,windows XP Pro
    Any help would be really appreciated!

    AthroughZ wrote:
    > I can't seem to get a dynamic select list to work in
    dreamweaver. It
    > completly crashes everytime I try adding it to my page.
    It looks as though you have a corrupt cache file. Follow
    troubleshooting
    step 4 in the following technote:
    http://www.adobe.com/go/tn_19105
    David Powers, Adobe Community Expert
    Author, "The Essential Guide to Dreamweaver CS4",
    "PHP Solutions" & "PHP Object-Oriented Solutions"
    http://foundationphp.com/

  • Dynamic select list with display,return val & join condition issue.

    hello,
    I am having a dynamic select list with display, return value
    say for example my select statement is
    select distinct dname d, deptno r
    from dept dt
    right join emp e on (e.deptno=dt.deptno)
    where (condition)
    when i tried this query for my select list, it is not working. It saying that
    " LOV query is invalid, a display and a return value are needed, the column names need to be different. If your query contains an in-line query, the first FROM clause in the SQL statement must not belong to the in-line query. "
    I am not able to understand the problem. Can anyone help me out with this issue?
    thanks.

    Shouldn't your join have dept as the driving table?
    select distinct dname d, deptno r
    from dept dt
    right join emp e on (dt.deptno = e.deptno)
    where (condition)
    Or using older Oracle standard join
    select distinct dname d, deptno r
    from dept dt, emp e
    where (dt.deptno (+) = e.deptno) AND (OTHER WHERE condition)
    OR
    (Since a right join is just getting the values from the driving table that are NOT in the associated table)
    select distinct dname d, deptno r
    from dept dt
    WHERE dt deptno NOT IN (SELECT deptno FROM emp) AND (OTHER where condition)
    Thank you,
    Tony Miller
    Webster, TX

  • Dynamic select list: link to another page

    Hi
    Have following dynamic select list at the bottom in "product.php" page (www.dolls.com.sg)
    <div id="selectcat">
      <select name="Categories">
        <?php
    do { 
    ?>
        <option value="<?php echo $row_rsCategories['categoryName']?>"<?php if (!(strcmp($row_rsCategories['categoryName'], $row_rsCategories['categoryName']))) {echo "selected=\"selected\"";} ?>><?php echo $row_rsCategories['categoryName']?></option>
        <?php
    } while ($row_rsCategories = mysql_fetch_assoc($rsCategories));
      $rows = mysql_num_rows($rsCategories);
      if($rows > 0) {
          mysql_data_seek($rsCategories, 0);
       $row_rsCategories = mysql_fetch_assoc($rsCategories);
    ?>
      </select>
    My target is, whenever a visitor clicks on a category in the pull down menu, he is forwarded to the respective "categories.php" page.
    How can I do that?
    Thanks
    Helmut

    Change your code to this:
    <div id="selectcat">
    <form method="get" action="categories.php">
      <select name="Categories">
        <?php
    do { 
    ?>
        <option value="<?php echo $row_rsCategories['categoryName']?>">
        <?php echo $row_rsCategories['categoryName']?></option>
        <?php
    } while ($row_rsCategories = mysql_fetch_assoc($rsCategories));
      $rows = mysql_num_rows($rsCategories);
      if($rows > 0) {
          mysql_data_seek($rsCategories, 0);
       $row_rsCategories = mysql_fetch_assoc($rsCategories);
    ?>
      </select>
      <input type="submit" value="View Dolls">
    </form>
    </div>
    In categories.php, use $_GET['Categories'] to filter the recordset.

  • Creating dynamic select list

    I have a dynamic select list populated by site names and URLs from a map; when a user clicks on an entry the site name and URL will fill two text boxes. There are also buttons to add, update, and delete entries. These buttons lead to actions within my JPF file.
              When I select an entry to delete, the script runs a delete SQL statement again my Ora db instance, then the page content is repopulated. I want to know how come when I do that I always get the sequence ID of the just deleted entry at the end of my select list.
              Here is a snippet of what I've got:
              JSP:
                        <netui:select
                dataSource="{actionForm.siteList[0]}"
                optionsDataSource="{actionForm.itemOptions}"
                size="4"
                tagId="siteList">
              <netui:textBox
                dataSource="{actionForm.title}"
                size="30" maxlength="200" tagId="title"/>
              <netui:textBox
                dataSource="{actionForm.url}"
                size="30" maxlength="200" tagId="url"/>
              <netui:hidden dataSource="{actionForm.key}"
                tagId="key"/>
              <script language="javascript">
                <!--
                <%=session.getAttribute("jsArray")%>
                  function siteClicked()
                    var index =
                      document[getNetuiTagName("process",this)]
                      [getNetuiTagName("siteList",this)][
                        document[getNetuiTagName("process",this)]
                        [getNetuiTagName("siteList",this)]
                        .selectedIndex]
                      .value
                    document[getNetuiTagName("process",this)]
                    [getNetuiTagName("key",this)].value
                      = index;
                    document[getNetuiTagName("process",this)]
                    [getNetuiTagName("title",this)].value
                      = siteArray[ index ][0];
                    document[getNetuiTagName("process",this)]
                    [getNetuiTagName("url",this)].value
                      = siteArray[ index ][1];
                -->
              </script>
                                  JPF:
                        Connection conn = null;
              query = "delete from stlnt_other_ref_sites " +
                      "where stlnt_ors_site_id = " + form.getKey();
              try {
                pstmt = conn.prepareStatement( query );
                pstmt.executeUpdate();
              } catch (SQLException ex) {
              try {
                Map map = new LinkedHashMap();
                while ( rs.next() )
                  map.put(new Integer(rs.getInt(1)), rs.getString(2));
                  jsArray += "siteArray[" + rs.getInt(1)
                    + "]=new Array(\"" + rs.getString(2)
                    + "\",\"" + rs.getString(3) + "\");";
                  hasResults = true;
                options = map;
                getSession().setAttribute("jsArray",jsArray);
                getSession().setAttribute("hasResults",
                  String.valueOf(hasResults));
              } catch (SQLException ex) {
              

    OK I got it working... Mostly... I don't know if it was a combination of changes that made the difference, but I'll put down what I did. First, I switched my select object in the form bean into just a string type from a string array (it was allowing the selection of one entry anyways). Second, rather than just blanking out the options map, I also blanked out the select object [eg form.setSelect("")].
              Now when I select an entry and click delete, the resulting select list is short one visible element. However, you can still select the blank spot where that last entry used to be. However, this is not a huge issue for me now; I will investigate this at a later time.

  • Dynamic select list with one static 'not_listed" option

    Hi guys,
    I want to create a dynamic select list with one static 'not_listed' option.
    One possible alternative is to add the 'not_listed' record into database, but I really dont want to go that way unless there is no other way around.
    Can anyone shed some lights on this?
    Many thanks,
    William

    As usual : "It depends"...
    If you have a foreign key defined on that field, Scott's reply won't work - unless you define '0 - Not listed' in the database. You can use selec 'not listed' d, to_number(null) r from dual though...
    Another - more declarative way - is in the on 'Edit Page Item' page, in the 'List of Values' region set 'Display Null' to 'Yes' and 'Null Display Value' to ' - Not listed - '.
    Roel

  • Cannot make a dynamic  select list

    I couldn't make a dynamic select list in a jsp. please help

    <select name='item'>
                   <option value='-1'>Select Option</option>
    <%
                   rs=stmt.executeQuery("select * from item_master");
                   while (rs.next())
    %>
                             <option value='<%= rs.getString("item_code") %>'
    <%
                             if (rs.getString("item_code").equals(stritemcode))
                                  out.println(" selected ");
    %>
                             ><%= rs.getString("item_description") %></option>
    <%
    %>
                   </select>
    Hope the code snippet helps you. Here stritemcode is the value that should be selected. Amol

  • Question on Dynamic Select Lists and Checkboxes

    Hello,
    I am new to APEX, and this is my first posting, I have a question about how to implement dynamic checkboxes from a select list.
    Basically I would have a select list, and based on what item is selected a set of checkboxes would appear.
    I was originally using the Select and Submit property on the select box, which works fine, all of the checkboxes appear appropriately. But the thing is, APEX refreshes the page each time, and since this select box is lower in the page, the user would have to scroll all the way down to where they were before.
    The main requirement is so that the user won't have to scroll down the that position where the select box is each time they select a new option.
    So a work around attempt is to create a javascript that will automatically scroll down to that position on page load ...
    i.e.
    function pageScroll() {
    window.scrollBy(0,50);
    But that didn't work, because for some reason the javascript wasn't appearing.
    Is there a way to either:
    1. Have a dynamic checkbox appear using ajax? -or-
    2. Have the javascript scrolling effect
    Sorry if this is a confusing question, I was wondering if anyone else came across this issue.
    Thanks in advance!!

    Since this Select List plays such an important role on the page, why not create a side-region and put that select list there so you don't have to overwhelm the user and his 'persistence of vision ' with a page that scrolls all by itself to the 1000th line to, then , change the options ?
    just an idea.

  • Dynamic Select List based on TextField data

    Hi,
    I like to dynamically display the select list based on the value in the textfield, the data in the textfield is of character type.
    Thanks

    Hello,
    Well as you now know HTML based select lists don't work like that, that widget is called a combo box and there will be built in combo boxes in APEX 3.0, it's a fairly complex dhtml widget.
    What you might want to do is provide a text item next to your select box and an Add New Value Option in your select list.
    Carl

  • Dynamic Select List Allowed Values

    Howdy Folks,
    I am trying to allow end users to select their username. The usernames are generated from a rule library, and displayed in a select form element. I am doing this by having the allowedValues call the rule that generates the possible names directly. The rule returns a list of valid names. The problem I am currently having, is that if the page reloads or refreshes, then the allowedValues calls the rule again. Some of the username choices involve random numbers, so it is possible (and very likely), that separate calls to the rule will generate different potential values. So what is now happening, is that when a user selects the value, the page reloads, and the end user sees an error that looks like this:
    ( ) - Warning: Selected value for field 'Select a Valid User Name' does not match any of the allowed values.
    The reason I am reloading the page, is that I am also trying to show the user what their email address will look like with the new value. So I have a different form element that is loading is value dynamically, and referencing the select form element. This mostly works, but the warning above is unacceptable.
    Is there a way I can load the dynamically created list only once, the first time the form is viewed, and not load it again every time the page refreshes?
    Another thing I tried to do (but didn't have luck with, so I sorta gave up on it) was to use the onChange of the select to change the value of email display field. This way the page never reloads and I don't have to deal with that issue. I'm thinking the onChange might actually work, but I would need to execute javascript or something, and not just use an express <set/> command to set the value of the field name that displays the email text.
    Does anyone have advice on how to make the values only load once? Or how to change the value on the onChange event?
    Thanks!
    Jim

    Mike,
    Thanks for the feedback. I actually did try that eventually. I created a variable in the form, and initialized that variable to the list of possible values. Then I referenced the variable in the 'allowedValues' of the select form item. At that point in time I still had the select box set as an action, so it would reload the page, hoping to reload the value in the email display field. This still did not work. Each time the action fired off, the variable was re-initializing itself. I eventually tried to put in a check, so it would not re-initialize itself if it had already been initialized. That caused a syslog error.
    I ended up solving the problem using javascript. I changed the field that reported the potential email address to an html element. Then for the html attribute I made a div with an ID. I then set a line of javascript into the onChange attribute of the select form element. This worked when ever the select form value changed. I then added the same line of javascript to the onLoad attribute of the jsp pages body element. This worked for loading the page.
    This solved the problem of the page reloading and the select getting new values. That still happens if you actually reload the page, but all the form elements work without the reload now.
    Thanks!
    Jim

  • Dynamic Select List not displaying correct value

    Hi there!
    I have a page with a dynamic repeat region.
    As I press one record I get up all the details based on id on an edit page.
    The problem is that the info that is inserted via a Select List is not displaying correct on edit page.
    All the other values are correct, also the values in the repeat region on index page,
    but the value from the Select List on edit page is just displaying the initially selected item.
    Have tried using SELECT DISTINCT in the SQL statement, but no luck.
    Any other ideas?
    Cut and paste from form:
    <select name="Vegtype" class="ProvDet" id="Vegtype" title="<%=(rsAs.Fields.Item("VegType").Value)%>">
                        <option value="Ev" selected="selected">Ev</option>
                        <option value="Fv">Fv</option>
                        <option value="Rv">Rv</option>
                        <option value="Kv">Kv</option>
                      </select>
    Recordset
    <%
    Dim rsAs
    Dim rsAs_cmd
    Dim rsAs_numRows
    Set rsAs_cmd = Server.CreateObject ("ADODB.Command")
    rsAs_cmd.ActiveConnection = MM_LabCon_STRING
    rsAs_cmd.CommandText = "SELECT DISTINCT DatoM, DatoR, DatoU, Distr, FagFelt, Felt, IntNr, Km, KontrNr, Kontrollor, Masse, MasseBK, Punkt, Resept, TestID, UserID, VegHp, VegNavn, VegNr, VegType FROM tblTest WHERE TestID = ?"
    rsAs_cmd.Prepared = true
    rsAs_cmd.Parameters.Append rsAs_cmd.CreateParameter("param1", 5, 1, -1, rsAs__MMColParam) ' adDouble
    Set rsAs = rsAs_cmd.Execute
    rsAs_numRows = 0
    %>
    Regards,
    Christian
    DWCS5 | .Asp | MS Access

    Ok, here goes the top down approach...
    In the HTML header of my page, i have this reference to a js file containing the javascript - <script src="#WORKSPACE_IMAGES#108.js" type="text/javascript"></script>
    Then in an HTML Region I have the following code to create the divs that will be shown and hidden - <div id="divREGION" class="divs">Select region to get list of countries.</div>
    <div id="divCOUNTRY" class="divs">Select country to get list of cities.</div>
    <div id="divCITY" class="divs">Select city and then press "Get Employees". </div>
    Note that these divs contain static content. You may be able to create dynamic content for these divs by creating dynamic query regions and putting div tags around the region (i havent tried this, it may require template modification).
    The select boxes have this code in the "HTML form elements attributes" - onFocus="javascript:showHideDiv(this,true)" onBlur="javascript:showHideDiv(this,false)"
    This onFocus and onBlur call the showHideDiv() function, passing in the object reference of the select box and a true/false to show/hide the related div.
    The actual javascript function that is contained in the 108.js file is:
    function showHideDiv(objThis, inBool){
         var divid = "div" + objThis.id.substring(3);
         if (inBool) {
         ShowDiv(divid);
         else {
    HideDiv(divid);
    That function in turn calls either the ShowDiv() or HideDiv() functions, depending on the true or false, passing in the ID of the div to be changed...
    function ShowDiv(divid){
         eval('document.all'+ '["' + divid + '"]' + '.style' +'.display = "inline"');
    function HideDiv(divid){
         eval('document.all'+ '["' + divid + '"]' + '.style' +'.display = "none"');
    Hope this helps.

Maybe you are looking for