Spry select list code to wire it to html data table SET column?

I am making a page based on Figure 15-14, Pg 878, in David Power's book, "Dw CS4 with CSS, Ajax and PHP. I have two separate html data tables hidden in the page, one for the specialties drop down select list and the other for the teachers master/detail regions. These are populated with php and working well. The spry select list and master/detail regions are working great except for one issue. The column in my html data table that is being filtered ("Specialty" in my code = 'Category' in the book's example code) is a SET column (with possible value of 1, 2, 3, 4, and/or 5). Clicking on the drop down menu brings up the records with a single value beautifully. The result for records with multiple values is a spry error "Invalid row number: 0". After four different versionings and methods of messing with this, I still haven't a clue. Please help me with how to rewire the Spry select list code so that it will read the records that have multiple items in that column. I have included the code below.
var data_set_teachers = new Spry.Data.HTMLDataSet(null, "teacher_data");
data_set_teachers.gallery = '1';
function chooseSet(dataSet, row, rowNumber)
if (row["Specialty"] == data_set_teachers.gallery) {
   return row;
return null;
data_set_teachers.filter(chooseSet);
function changeSet(set)
data_set_teachers.gallery = set;
data_set_teachers.filter(chooseSet);
data_set_teachers.setCurrentRowNumber(0);
var rows = data_set_teachers.getData();
for (var i = 0; i < rows.length; i++) {
   if (rows[i]["Specialty"] == set) {
     data_set_teachers.setCurrentRowNumber(i);
     break;
var data_set_specialties = new Spry.Data.HTMLDataSet(null, "specialty_data");

Well I'll be damned!
What's done in the sample app is, of course, the intuitively obvious choice and is exactly what I started out trying to do the first time round.
But as I mentioned before, when I first tried it (yes: I'm pretty sure I set the "for" attribute on the inlineMessage components), I got the non-unique component id exception for the inlineMessage component(s) after adding the second (but not the first) row to the page.
Anyway, after dragging my inlineMessages to the exact same position as those in the AppModel example, now things work fine (except I think I'd like a line break before the message and to change the row/column styles so the values and messages line up properly...the look is rather ugly in the AppModel example when there are validation messages displayed).
Not sure, but I'm thinking maybe there was an issue with where the inline message markup was placed, my first time through, relative to the data table value bound component and the column header facet?
I was using the application view drag 'n drop feature the first time round and dragged the inlineMessage component to the spot just below the data table value bound component and hence just above the column header facet. In the AppModel example, OTOH, the inline messages are placed just after the column header facet.
Of course, I will now try to duplicate the original exception.
If I can (and it is an issue with placement), I will post back some sort of bug report or RFE. Otherwise, I'll post back declaring what a bone head I've been...;-)
Anyway, thanks for the quick response, v.
Campbell

Similar Messages

  • Help with lists and Numbers - how can I separate data from one column?

    I have a series of data entries that have two or three pieces of information listed in one column (it was a list copied from the Internet). My data is in this form all in one column (ie Column A):
    XXXX -- YYYY, ZZZZ
    I want to be able to easily split that data into three columns (A, B, and C) without having to go through and manually separate all of the entries? I'd ideally like to have XXXX in one column, the '--' removed, YYYY in another column, and ZZZZ in a third column, like this:
    Column A Column B Column C
    ====== ====== ======
    XXXX YYYY ZZZZ
    Is this possible? Any help is appreciated.

    BlooGoo
    Open or paste your material in your favorite texteditor. TextEdit will suffice but there are better applications. Make sure your material is consistent, especially that there are no stray characters or extra spaces studded in the text. You can do this by using the clean up routine as described below.
    1. Copy the set of characters you want to replace. In this case " -- " Note that there are spaces on each side of the dashes and you want to get rid of those.
    2. Open the *Find and Replace* dialogue:
    +Menu > Edit > Find > Find…+ (or command f)
    Paste the " -- " into the Find: field, then type a comma in the Replace: field or
    Copy and paste a tab from the document or
    Click on the Advanced button and enter a tab using the Insert… button that appears.
    3. Click *Replace All.*
    Repeat as necessary. If it doesn't seem to work, copy and paste the bits that stick, usually there is something not visibly different but different as far as the computer iust concerned.
    When you are finished save the results as a comma or tab delimited delimited .txt file and reopen it in Numbers.
    Peter

  • Dynamic Population of Select List    code

    I have two select box's in jsp.
    if i selct one item on chane method i have to
    pupulate them in second selectbox.can any body have
    code for that

    I am not sure if you are using database for retrieval but in such a scenario you can do this:
    in case the option value/name for your first select box are unique, you can store this value in a particular variable and write another query to retrieve the value which you require in the select box in an Array by using the variable and finaly iterating through the array to have the select box populated.
    Hope you understand this and it helps you out.

  • Select list works for some users not for others

    Apex 3.2, Oracle 10g
    I have a page with a select list. (other select lists work fine) This view is a based on a view over a dblink with the chain being (public synonym -> dblink view -> dblink real view )
    One user logs into the Apex app and the select list populates.
    I log in to the app, either through the developer login or the app login, navigate to the same page and the select list does not populate.
    What can cause this in Apex or is it a database issue.
    Someone said it may be a rights issue, but I thought all Apex users appeared as the same 'user' to the database.
    Miscellaneous points: The app authentication is via LDAP/OID and I can get the select list code work in SQL Developer.
    Thanks,
    Sam

    not sure what you are asking
    It is a "Select List"
    The sql is
    select x d, x r
    from view
    wher x is not null
    order by 1
    The view is a synonym in the application schema, points to a view on the same database instance (different user) which points to the real view via dblink to a different database instance.

  • How to Refer the Selected value in a Select List

    I have a page item which is a select list. I have a button in my region which when clicked will call a process. This process takes the current value of my page item as a parameter. However, when I select a value from the Select list and click on the button, the page item is still submitting the earlier value, it is not getting updated with the value I selected in the select list. Can someone tell me how I can get the page item value to be updated with the value I selected from the choice list? I tried calling a javascript function from the element attribute of this select list onchange="javascript:setValue(this);") and was trying to set the value of another hidden page item with the value of this select list but then the function is not getting called as well. My function code is something like
    function setValue(pThis)
    for (var i = 0; i < pThis.options.length; i++) {
    if (pThis.options[ i ].selected){
    result= pThis.options;
    html_GetElement('P2_HIDDEN').value = result;
    P2_HIDDEN is my hidden page item

    970829 wrote:
    I have a page item which is a select list. I have a button in my region which when clicked will call a process. This process takes the current value of my page item as a parameter. However, when I select a value from the Select list and click on the button, the page item is still submitting the earlier value, it is not getting updated with the value I selected in the select list.
    How do you know this? Have you used Debug mode to track what is happening when the button is pressed? This will show any changes to item values in session state during page submit and page show processing.
    Can someone tell me how I can get the page item value to be updated with the value I selected from the choice list?
    This should happen automatically with a select list item, if the button is correctly defined to perform a page submit. It will not happen if the button performs a redirect. What action is defined to occur when the button is pressed?
    I tried calling a javascript function from the element attribute of this select list onchange="javascript:setValue(this);") and was trying to set the value of another hidden page item with the value of this select list but then the function is not getting called as well. My function code is something like
    function setValue(pThis)
    for (var i = 0; i < pThis.options.length; i++) {
    if (pThis.options[ i ].selected){
    result= pThis.options;
    html_GetElement('P2_HIDDEN').value = result;
    P2_HIDDEN is my hidden page item
    As detailed above, this should be completely unnecessary, however as an aside, html_GetElement is a very out of date method of accessing an item. What version of APEX are you using? (Always specify which version you're using when you ask a question, to allow us to determine the most appropriate solution to the problem.)

  • How to default a value in a select list

    Hi
    I have an item on the page which is displayed as a select list.
    The select list has an lov that returns 3 values as follows:
    ACAD1M
    ACAD2H
    ACAD3T
    the sql for this lov is as follows:
    select CAL_TYPE d,cal_type r
    from igs_ca_type
    where s_cal_cat='ACADEMIC'
    It needs to return the values in the order as shown above, however if the user does not select anything from the select list, I want it to default to the value in the middle of the list(ACAD2H)
    I tried using default on the item but I could not get this to work.
    Could someone explain how I can get the select list in HTMLDB to default to the value that I want regardless of which position it appears in the select list it always seems to default to the value at the top of the list.

    Hello Kay,
    A default value for a select list must be set to a legitimate returned value from the select list LOV query.
    The default value should be set in the item "Default" section. In the "Default Value" field you should enter your query – in a form of a PL/SQL Function Body – and set the "Default Value Type" field accordingly.
    The following is an example of code I'm using to set the default value of a select list to be the first displayed option (set by the user, and recorded in the dispord column):
    declare
      l_sno  number;
    begin
      select sno
      into l_sno
      from mis_mess_users
      where dispord = (select min(dispord)
                     from mis_mess_users);
      return l_sno;
    end;Using the same principle, you can use any query that will give you the result you need.
    Regards,
    Arie.

  • One select list with multiple LOV's (LOV based on how page was called)

    APEX 4.0.2
    I've a DML form page from a report on which I need a single select list item to have a differing LOV based on how the form page was called.
    The calling page (report), contains an edit link column and a create button. Depending on which is selected, I wish the LOV for my select list item to change. The idea behind this is that if someone creates a new entry, I want to constrain the select list to a subset of rows of a table query populating the LOV. On the other hand, if an existing item is edited, I want the select list LOV containing all rows of a table query populating the LOV.
    What I've tried...
    - Duplicates of select list item each triggered to render based on an arbitrary value set when either "create" or "edit" are selected. This did not work because the item was part of DML and would not allow replication on the same page.
    - Logic in the LOV sql statement controlling which sql was to be run based on an arbitrary value set when either "create" or "edit" are selected. This did not work as logic is not allowed in LOV sql statements.
    Any thoughts? Many Thanks!
    Paul

    Hello Patrick!
    Thanks for responding - Love your captcha plugin!
    Anyway, these are the two dynamic LOV's. The first I have in play right now (when creating new records). I need to have the other for existing record modifications.
    LOV #1
    select stock_no d, stock_no r
    from   [email protected]
    where  status like '%Awaiting Transfer%'
    or     status like '%On Hold%'
    order by 1LOV #2
    select stock_no d, stock_no r
    from   [email protected]
    order by 1As I mentioned, I attempted to use plsql logic in the query to trigger one or the other based on a value set when the user either clicked an edit link or a create button but couldn't get the dynamic LOV to commit with that extra code in it.
    Thanks!
    Paul

  • ORA-30563, Outer Join not allowed in select list

    I can not find any information about this error message that I am getting.
    I have just upgraded my Oracle database from Version 7.3 to Version 8.1.7, a stored procedure that was written in v7.3 has outer joins in the select statement.
    when trying to run this proc in version 8 I get this meesage.(ORA-30563, Outer Join not allowed in select list)
    code ex:
    Select alt.id
    decode(alt.advise, NULL, NULL, AA.act_yr(+))||'-'||AA.act_per(+)||'-'||AA.Acc_per_no(+)) as advise_no
    from alt, AA;
    Is there any information about this message anywhere? or does anybody know if this is a known issue with oracle ver 8.1.7?
    Thanks
    CJ

    It appears to have been a bug in 7.x
    From a metalink note on bugs fixed in 8i (doc 132632.1)
    974742 Oracle does not report an error if (+) is specified in select-list. The OUTER JOIN operator (+) is only valid in WHERE clause predicates. As this is not flagged as an error the query can give unexpected results. The correct action to avoid this problem is to fix the query.
    Ken

  • 3 buttons and 2 select lists in a single line

    Hi,
    I have an application which has 3 region buttons ( say, b_1, b_2, b_3) and 2 selects lists (say, sl_1, sl_2). I want to display all the five buttons and items in a single line in the following order:
    b_1 b_2 sl_1 b_3 sl_2
    I have set Begin on new line = no
    and Begin on new field = no, for both the two select lists.
    But it does not seem to work.
    Do anyone have any idea, how to sort out this issue?
    A quick reply would really be appreciated.
    Regards,
    AM

    Hi Vikas,
    Please have a look into the application at
    http://apex.oracle.com/pls/otn/f?p=34363:1:6206621111100168:::::
    I have created two select lists P1_X and P1_Y. These items are hidden on page load event. When the associated button is clicked the list should appear on the page.
    Written the following code in 'Pre element text' for each of the items:
    P1_X :: <input type="button" value="X" onclick="f_X();" class="t17Button" />
    P1_Y:: <input type="button" value="Y" onclick="f_Y();" class="t17Button" />
    Where, f_X() and f_Y() are displaying the select lists.
    As you can see, the select lists are appearing just below the html buttons, which I want side by side with the buttons.
    Could you please figure out the issue?
    If you want I can share my login details.
    Regards,
    AM

  • SELECT LIST about...

    Hello.
    Is there any way to create multiple 'select list's. That each one depending on each other? There are three 'select list' in my case.
    First - city
    Second - department
    Third - Person
    Of course, if I change 'city' one I want other two to change automatically BUT - without reloading page! Is it possible? There are department with very low connection rate - often reloading page - is very expensive for them..

    Why there is no answer? Are my question silly?Well...there are a few reasons for that -
    1) It's the weekend
    2) You have waited less than an hour for a reply.
    3) Nobody is 'paid' to provide support on these forums, we all do it for free in our (limited) spare time (see point 1)
    Yes what you have asked is achievable, take a look at the following blog posting by Scott Spendolini which you should be able to use and adapt
    http://spendolini.blogspot.com/2005/10/ajax-select-list-code-generator.html

  • LOV an SQL : how to configure a select list to get all records

    Hello,
    I am using Oracle 10g with APEX 2.0.
    Here is my question:
    I have a report and I am using 3 text fields and a select list to search through a join of two tables. The select list is composed of a "list of values" and the parameter, which is used in the SQL-sentence, has a numeric value.
    Result table after the join operation looks like this:
    Field1 Field2 Field3 Field4 (By assuming the field3 is the one which used in the select list.)
    21a this 1000 bn
    21a that 1001 vb
    33c thus 1012 ct
    What I want to do is to set another parameter-value pair in the select list to let user choose the "ALL" of the mentioned items in the select list so that the search will return all the records without having taken this select list-field into consideration.
    Is it possible to do it with LOV and SQL? Do I need any other functions? or configurations?
    Thanks in advance,
    Sedef

    Hi user630478!
    I always use a select list with submit and the option to get a NULL-Value for such things. To solve your problem do the following things:
    1.) Create two named LOVs. One as you already did and another one for all values.
    2.) Your select list with submit should be configured to show a NULL-Value e. g. it shows ALL with the value 0.
    3.) Create two conditional branches that work together with your select list. One that show the normal results if a user has clicked on a normal value and the second should act only if a user has clicked on ALL.
    4.) Write a process that switches the LOVs in your select list from one to the other. This process should only be fired if the second conditional branch has been actived.
    Maybe if I understood right that's what you want to know.
    yours sincerely

  • Select list and date picker on one line  -  is this a bug?

    I'm using: Application Express 3.2.0.00.27
    Is the following a bug? If so, how do I get it reported so it will be fixed in a future release of APEX? If not, how do I do it so it ends up the way I want?
    1. create blank page
    2. create html region
    3. create "select list" item (Begin On New Line - Yes, ...Field - Yes, ColSpan - 1, Row Span - 1)
    4. create date picker item (Begin On New Line - No, ...Field - No, ColSpan - 1, Row Span - 1)
    There will be other items displayed in more columns above what I just had you create above. I want the select list and the date picker to display next to each other on same line, so I placed date picker item on same line in same field as select list item.
    HOWEVER... the date picker ends up displayed under the select list item (kind of), instead of next to it on the same line.
    Here's what I get:
    ...................... [Select List Field] Date Picker Label
    Select List Label
    ...................... [Date Picker Field]
    Here's what I want:
    Select List Label [Select List Field] Date Picker Label [Date Picker Field]
    Thanks,
    Steve
    Edited by: sskelton on Aug 3, 2009 11:01 AM
    Edited by: sskelton on Aug 3, 2009 11:02 AM

    Hi Steve,
    I'm not sure if it's the official way, but you could add a post here: Enhancement Request Thread : Post 3.1 - that's what I've been doing :D
    Andy

  • Select list / Pop up box - Read only ??

    Hi all,
    I have a select list to populate a field in an ApEx application. The select list is populated by a query on a table and as such there is no option to input any non-standard items via free text into that field - all values must be chosen from the select list.
    My issue now is that the select list is getting quite large and is really not the easiest way to select data from a list.
    A popup LOV is perfect for the searching through available values but it leaves the text box available for "free text input", allowing non standaerd data to be entered into that field.
    Is there any solution to this?

    Neil,
    You can use Validation to enforce correct entry. The approach I use is to use custom popup. See example below:
    http://www.oracle.com/technology/products/database/application_express/howtos/how_to_create_custom_popups.html
    You can set the text box's attributes to readonly="true". This will keep the textbox disabled thereby preventing free form data entry. Users will be forced to pick data from the custom popup page.
    Ravi

  • How to fix the length of select list box?

    Halo, i am doing the research. I need to find out what is the method to fix the length of select list box. This is b'cos i can set the length of select list due to different length of record(s)/data(s).
    Another question to select list box. What is the maximum length of the select list box?? Can i enter the character with 255 lenght??
    Thank you very much..... a prompt reply will be appreciate!!

    Thanks for ur reply! actually that answer that you gave is right, but i also need to know what is the maximum lenght of character in the select list box?? any idea to that??
    Meanwhile, i also need to know how can i make the character display in select list box dynamically?? that means i can change the font style or font size??
    Anyway, thanks for ur answer.
    bscs.

  • Improper casting of bind in select list item?

    Hi all,
    In v3.1.2, I have a Select List item called P1_DEPT_FILTER where the LOV is:
    Number of Columns          1
    Display Null                Yes
    Null display value           -- ALL --
    Null return value
    List of values definition     select DNAME, DEPTNO from DEPT order by 1
    In a computation of another item on the same page, I have a SQL Query in the computation that contains a WHERE clause referencing the Select List item:
         AND (:P1_DEPT_FILTER IS NULL OR assigned_belt LIKE :P1_DEPT_FILTER)
    The problem is that sometimes the computation query returns no rows. Using APEX debug and also dumping the session variables shows P1_DEPT_FILTER to contain the expected value based on what I selected, so I created a LOGON TRIGGER on the owner's database for the owner's schema to fire up a SQL Trace with binds. The bind variables for the computation query show "dty=1", which is a (n)varchar2 type, instead of the expected "dty=2".
    My theory is that this improper casting is causing the computation to not work correctly, since running the computation query outside of APEX works perfectly.
    I'm missing something here, but am stuck on where to continue troubleshooting. Thoughts?
    TIA!
    Rich
    Edited by: socpres on Dec 17, 2008 4:02 PM (typo)

    Hey Scott,
    My apologies for not posting the exact SQLin my original post -- I tend toward obfuscation. In any case...
    That computation and it's slight derivatives appear on computations for P3_ID, P3_ID_NEXT, and P3_ID_PREV, as well as the "Get Next or Previous Primary Key Value" process. Since the value returned for the P3_CHAMPION_FILTER Select List is "8" when I attempt to filter, I altered the P3_CHAMPION_FILTER for each of the 4 SQLs similar to this:
    SELECT
        NVL(MIN(ID),0)
    FROM
        vip_project.project_table
    WHERE
        project_document IS NULL
        AND lead_team_charter_date IS NOT NULL
        AND (NVL(:P3_BELT_FILTER,0) = 0 OR assigned_belt = TO_NUMBER(:P3_BELT_FILTER))
    --     AND (NVL(:P3_CHAMPION_FILTER,0) = 0 OR assigned_champion = TO_NUMBER(:P3_CHAMPION_FILTER))
        AND (NVL(:P3_CHAMPION_FILTER,0) = 0 OR assigned_champion = 8)And it works perfectly! Without a filter on Champion, the correct 56 rows meeting the criteria are available for navigation on the form. If I select the item in the P3_CHAMPION_FILTER that corresponds to the value of "8", only the 3 rows for that "champion" column are navigable. Here's what debug says about the P3_CHAMPION_FILTER field when I select the "8" item:
    0.14: ...Session State: Saved Item "P3_BELT_FILTER" New Value="0"
    0.14: ...Session State: Saved Item "P3_CHAMPION_FILTER" New Value="8"
    0.14: ...Session State: Save "P3_ID" - saving same value: "1"
    And the Session State:
    100     3     P3_CHAMPION_FILTER     Select List     8     I
    So, in theory, changing the "TO_NUMBER(:P3_CHAMPION_FILTER)" to "8" should have no effect, but it does. Baffling!
    Thanks!
    Rich

Maybe you are looking for

  • Problem in message mapping while generating multiple record

    Hi experts,                  I am doing an idoc to file scenario in which E1FISEG SEGMENT is coming multiple time and if it contains two field ebeln & sgtxt then only it has to create corresponding data record I used following logic .............. ei

  • Why there is no multitasking gestures on ipad 1 ,but it is on ipad 2

    Why there is no multitasking gestures on ipad 1, but it is on ipad 2 !?!? I need an answer.......because this is not fair.......

  • IPod / iTunes Photo Synch

    Anyone have an answer to problem of iPod not synching with photos? Have some photos on iPod, added photos to my designated synch folder but they do not transfer when I update, even with appropriate boxes checked. I have plenty of space (GB's!). Thank

  • What the heck is going on!? help me!!!!!!!!!!

    When I first got my iPod(x-mas,2005), I downloaded some tv shows. I recently downloaded another episode. When I turned on my iPod to watch it, I didn't have TV sows as an option under the Videos menu. Please Help Me!

  • Express Edition listener won't start

    I have tried suggestions from other threads, and have not had any luck. I have installed Oracle XE, and can access the DB using SQL Plus. But when I try to go to the DB homepage (http://127.0.0.1:8080/apex), I get "cannot display the webpage" error.