Tabular presentation, problem adding a line

I created a tabular presentation shows 4 fields apart from a hidden ID and the PK, when I press 'Add Row' and enter new details and then submit, the record gets in the base, but the screen refreshes with a new empty row, how do I avoid this, what is the cause?

Thank you

Hello

Change the page, check that the Page process of "Add a LINE" is conditional that only fires when add a LINE button is clicked.

Kind regards
Shijesh

Tags: Database

Similar Questions

  • Adding line by submitting the manual tabular form while adding lines

    Hi all

    I'm a newbie in the Apex.

    I created a manual tabular form based on Apex_Collection. In addition, created the buttons ADD, DELETE and APPLY the CHANGES .

    The data below are the steps that I did.

    1 initialize the Collections

    Process: When loading - before header

    Enforcement process: once a Page visit

    Source:

    DECLARE
      l_collection_name APEX_COLLECTIONS.COLLECTION_NAME%TYPE;
      l_bind_names      APEX_APPLICATION_GLOBAL.VC_ARR2;
      l_bind_values     APEX_APPLICATION_GLOBAL.VC_ARR2;
      l_query           VARCHAR2(32767);
    BEGIN
      l_collection_name := 'EMAILDETAILS';
    
      IF apex_collection.collection_exists(l_collection_name)
      THEN
      apex_collection.delete_collection(p_collection_name => l_collection_name);
      END IF;
    
      l_query := '   SELECT cmp_cd, ' --c001 => f01
      || '   email, ' --c002 => f02
      || '   tab_seq_id, '  --c003 => f03
      || '   NULL, ' --c004 => f04
      || '   NULL, ' --c005 => f05
      || '   NULL, ' --c006 => f06
      || '   NULL, ' --c007 => f07
      || '   NULL, ' --c008 => f08
      || '   NULL, ' --c009 => f09
      || '   NULL, ' --c010 => f10
      || '   NULL, ' --c011 => f11
      || '   NULL, ' --c012 => f12
      || '   NULL, ' --c013 => f13
      || '   NULL, ' --c014 => f14
      || '   NULL, ' --c015 => f15
      || '   NULL, ' --c016 => f16
      || '   NULL, ' --c017 => f17
      || '   NULL, ' --c018 => f18
      || '   NULL, ' --c019 => f19
      || '   NULL, ' --c020 => f20
      || '   NULL, ' --c021 => f21
      || '   NULL, ' --c022 => f22
      || '   NULL, ' --c023 => f23
      || '   NULL, ' --c024 => f24
      || '   NULL, ' --c025 => f25
      || '   NULL, ' --c026 => f26
      || '   NULL, ' --c027 => f27
      || '   NULL, ' --c028 => f28
      || '   NULL, ' --c029 => f29
      || '   NULL, ' --c030 => f30
      || '   NULL, ' --c031 => f31
      || '   NULL, ' --c032 => f32
      || '   NULL, ' --c033 => f33
      || '   NULL, ' --c034 => f34
      || '   NULL, ' --c035 => f35
      || '   NULL, ' --c036 => f36
      || '   NULL, ' --c037 => f37
      || '   NULL, ' --c038 => f38
      || '   NULL, ' --c039 => f39
      || '   NULL, ' --c040 => f40
      || '   NULL, ' --c041 => f41
      || '   NULL, ' --c042 => f42
      || '   NULL, ' --c043 => f43
      || '   NULL, ' --c044 => f44
      || '   NULL, ' --c045 => f45
      || '   NULL, ' --c046 => f46
      || '   ''O'', ' --c047 (for record status)
      || '   wwv_flow_item.md5(cmp_cd, email, tab_seq_id) ' --c048 (for optimistic locking)
      --c049 for (not used in collection/reserevered for seq_id array)
      --c050 (not used in collection/reservered for delete checkbox array)
      || ' FROM Cmp_Email '
      || ' WHERE cmp_cd= v(''P9_CMP_CD'') ';
    
      apex_collection.create_collection_from_query_b (
      p_collection_name => l_collection_name,
      p_query           => l_query
      );
    
    
      IF :REQUEST = 'ADD'
      THEN
      APEX_COLLECTION.ADD_MEMBER(p_collection_name => l_collection_name);
      END IF;
    
    END;
    

    2. tabular Guide

    Type: SQL query

    Source:

    SELECT apex_item.hidden(4,c047,NULL,'f04_'|| '#ROWNUM#')
      || apex_item.hidden(5,c048,NULL,'f05_'|| '#ROWNUM#')
      || apex_item.hidden(6,seq_id,NULL,'f06_'|| '#ROWNUM#')
      || apex_item.hidden(3,c003,NULL,'f03_'|| '#ROWNUM#')
      || apex_item.hidden(1,c001,NULL,'f01_'|| '#ROWNUM#')
      || apex_item.checkbox(
      7, 
      seq_id,
      NULL,
      CASE 
      WHEN c047 = 'D' THEN seq_id
      END,
      ':',
      'f07_' || '#ROWNUM#'
      ) AS delete_checkbox,
      apex_item.text(
      2,
      c002,
      20,
      50,
      NULL,
      'f02_' || '#ROWNUM#'
      ) AS email_id
    FROM apex_collections
    WHERE collection_name ='EMAILDETAILS'
    ORDER BY c002
    

    The buttons used:

    1. name button: ADD

    Action: send the Page

    2 button name: DELETE

    Action: send the Page

    3 Collection page

    Point process: present now - before the calculations and Validations

    Enforcement process: once a Page visit

    Source:

    DECLARE
    
    
      l_collection_name APEX_COLLECTIONS.COLLECTION_NAME%TYPE;
      l_original_md5    VARCHAR2(32);
      l_latest_md5      VARCHAR2(32);
    
    BEGIN
    
      l_collection_name := 'EMAILDETAILS';
    
      FOR x IN 1 .. apex_application.g_f06.count 
      LOOP         
      IF apex_application.g_f01(x) IS NOT NULL --ID exists, check to see if record was updated
      THEN
      SELECT c048 INTO l_original_md5
      FROM apex_collections
      WHERE collection_name = l_collection_name
      AND seq_id = apex_application.g_f06(x);
    
      l_latest_md5 := wwv_flow_item.md5(
      apex_application.g_f01(x),
      apex_application.g_f02(x),
      apex_application.g_f03(x)
      );
    
      IF l_original_md5 != l_latest_md5 
      THEN
      apex_collection.update_member(
      p_collection_name => l_collection_name,
      p_seq             => apex_application.g_f06(x),
      p_c001            => apex_application.g_f01(x),
      p_c002            => apex_application.g_f02(x),
      p_c003            => apex_application.g_f03(x),
      p_c047            => 'U',
      p_c048            => apex_application.g_f05(x)
      );
      END IF;
      ELSE --ID does not exist, must be new record
      apex_collection.update_member(
      p_collection_name => l_collection_name,
      p_seq             => apex_application.g_f06(x),
      p_c001            => apex_application.g_f01(x),
      p_c002            => apex_application.g_f02(x),
      p_c003            => apex_application.g_f03(x),
      p_c047            => 'N',
      p_c048            => apex_application.g_f05(x)
      );
      END IF;
      END LOOP;
    
      IF :REQUEST = 'DELETE' 
      THEN
      FOR x IN 1 .. apex_application.g_f07.count 
      LOOP
      apex_collection.update_member_attribute(
      p_collection_name => l_collection_name, 
      p_seq             => apex_application.g_f07(x), 
      p_attr_number     => '47', 
      p_attr_value      => 'D'
      );
      END LOOP;
      END IF;
       
    END;
    

    4. table collection

    Point process: submit now - after calculations and Validations

    Enforcement process: once a Page visit

    Source:

    DECLARE
      l_table_md5       VARCHAR2(32);
      l_collection_name APEX_COLLECTIONS.COLLECTION_NAME%TYPE;
      l_del_count       PLS_INTEGER := 0;
      l_upd_count       PLS_INTEGER := 0;
      l_ins_count       PLS_INTEGER := 0;
      l_success_message VARCHAR2(32767);
       
      CURSOR op_lock_check_cur (p_id IN NUMBER)
      IS
      SELECT wwv_flow_item.md5(cmp_cd, email, tab_seq_id)
      FROM Cmp_Email
      WHERE tab_seq_id = op_lock_check_cur.p_id
      FOR UPDATE;
    BEGIN
      l_collection_name := 'EMAILDETAILS';
    
    
      FOR x IN (
      SELECT *
      FROM apex_collections
      WHERE collection_name = l_collection_name
      AND c047 IN ('N','U','D')) 
      LOOP
      IF x.c047 = 'N'
      THEN
      INSERT INTO Cmp_Email(tab_seq_id,cmp_cd,email) 
      VALUES (cmp_email_seq.nextval,
      :P5_CMP_CD_HIDN, 
      x.c002
      );
    
      l_ins_count := l_ins_count + 1;
      ELSIF x.c047 = 'U'
      THEN
      OPEN op_lock_check_cur(x.c003);
      FETCH op_lock_check_cur INTO l_table_md5;
    
    
      IF l_table_md5 != x.c048 
      THEN
      raise_application_error(-20001,'Current version of data in database has changed since user initiated update process.');
      END IF;
    
      UPDATE Cmp_Email
      SET cmp_cd=:P5_CMP_CD_HIDN
      ,email = x.c002
      WHERE CURRENT OF op_lock_check_cur;
    
      CLOSE op_lock_check_cur;
    
      l_upd_count := l_upd_count + 1;
      ELSIF x.c047 = 'D'
      THEN
      DELETE FROM Cmp_Email
      WHERE tab_seq_id = x.c003;
    
      l_del_count := l_del_count + 1;
      END IF;
      END LOOP;
       
      apex_collection.delete_collection(p_collection_name => l_collection_name);
       
      l_success_message :=  
      l_ins_count || ' rows inserted, ' ||
      l_upd_count || ' rows updated, ' ||
      l_del_count || ' rows deleted';
    
      :P5_SUCCESS_MESSAGE:= l_success_message;
       
    END;
    

    When I press the ADD button, a new line must be added to the shape of the table and the data should be saved to the collection. , But currently, the page is being submitted to the database table when adding new lines in the form of tables. The data should only be saved in the database when the user clicks on the APPLY CHANGES button

    I searched the Forum about this issue and have found many discussions which suggested to use JavaScript to add new lines. As I have no knowledge of JavaScript, these solutions have been strange for me.

    Please help me solve this problem.

    Thanks in advance.

    Kind regards

    Aravind

    Hi Christophe,

    Follow the changes mentioned below

    1. remove this your Collections initialize

    IF :REQUEST = 'ADD'
    THEN
      APEX_COLLECTION.ADD_MEMBER(p_collection_name => l_collection_name);
    END IF;  
    

    2 condition your collection process initialize

    Modify your process-> conditions-> PLSQL Expressions->: REQUEST IS NULL

    3. create a process more onload I say Add new line to the collection

    DECLARE
        l_collection_name APEX_COLLECTIONS.COLLECTION_NAME%TYPE;
       BEGIN
          l_collection_name := 'EMAILDETAILS';
         IF apex_collection.collection_exists(l_collection_name)
          THEN
              APEX_COLLECTION.ADD_MEMBER(p_collection_name => l_collection_name);
              END IF;
       END;
    

    4 condition your Add new line to the collection

    Modify your process-> conditions-> request = Expression1-> ADD (this should be request ADD button)

    5. change your button-> Action addition-> redirect to this application page :-> page no (same page)->-> ADD APPLICATION

    6. check your through the process conditional Page collection

    Modify your process-> conditions-> PLSQL Expressions->: ASK IN ('ADD', 'APPLY_CHANGES', 'DELETE')

    7. check your subject to the process of Collection to Table under condition

    Modify your process-> conditions-> PLSQL Expressions->: ASK IN ('APPLY_CHANGES')

    8. for the whole process to remove the conditions when the button is pressed.

    If the problems persists, create a sample on apex.oracle.com and share the connection information with the name of workspace.

    Hope this helps you,

    Kind regards

    Jitendra

  • Added new line at the top of tabular form in APEX 5.0 and universal theme (topic 42)

    Hello Apex Experts,

    When the user clicks on the button 'Add Row' a tabular presentation, I would like the new line to be at the top of the report rather than the bottom.


    I followed the instructions from Added new line at the top of table in APEX 4.0 form and Denes Kubicek demo application. But it does nothing, always create new bottom line.


    Anyone have an idea or an idea?


    Your help would be appreciated.


    Kind regards

    Blabla

    Hi all

    This problem is now solved by following the new blogpost of Dene:

    http://www.deneskubicek.blogspot.de/2015/05/tabular-form-add-rows-top-universal.html

    Kind regards

    Blabla

  • Look for the lines selected on a tabular presentation

    Hello guys and girls,

    I have a small problem trying to understand if/how I can check by pressing the "submit" button if there where no records selected in my tabular presentation.

    To explain better: I have a selection list in which the user select an employee. On this choice, a tabular presentation appears with the own products for this employee.

    The user must check at least one of the lines to go further.

    If the user does not select all and always press the "submit" button you should see an error message saying: "there are no selected product."

    What I was doing until now (stupid I suppose) was to create a Boolean as validation:

    DECLARE

    vRow directory;

    BEGIN

    BECAUSE me in 1... apex_application.g_f01. COUNTY

    LOOP

    vRow: = apex_application.g_f01 (i);

    If vRow is NULL then

    Returns false;

    on the other

    Returns true;

    end if;

    END LOOP;

    END;

    But does not work. If I have no active records it will say nothing and let me go. If I check something even record.

    Help, please.

    There must be something that I have no idea about.

    Thank you very much.

    Gabriel

    Checkboxes only support values for the lines. For example, a loop on the table will always return true since vRow will never be NULL. In addition, a table with a number equal = 0 will not be locked during all, again don't generate no errors.

    No loop, just check apex_application.g_f01. COUNTY. If it is 0, no checkboxes have been verified.

  • How to access a column value in a Select list in a tabular presentation for each line

    Hello

    Environment: Using Oracle APEX v4.2.1 on an Oracle 11 g 2 DB

    In a tabular presentation using the following example query, i.e.:

    select
    "EMPNO",
    "EMPNO" EMPNO_DISPLAY,
    "ENAME",
    "HIREDATE",
    "SAL",
    "DEPTNO",
    "MY_LOV"
    from"#OWNER#"."EMP"
    
    

    I need access to every line of my sub form of table, the EMPNO of this line value, within a list of selection (query based LOV) in the column "MY_LOV."

    So, basically, the MY_LOV column in my table presentation, would be a list of selection (query based LOV) where MY_EMPNO =: EMPNO (first column in the select statement above), for each line of the tabular presentation.

    With the help of a picture ( Tom's Blog ) and assuming 'Deptno' column here is actually my new column, i.e. "MY_LOV, I want to know how this list of selection based on lov query would be able to access each EMPNO down in the form of tables, i.e. 7839, 7698, 7782 etc.?

    overview.png

    Any help would be appreciated.

    Thank you.

    Tony.

    Hi Tony,.

    Take a look at the API APEX_ITEM for LOV

    http://docs.Oracle.com/CD/E37097_01/doc/doc.42/e35127/apex_item.htm#AEAPI208

    Kind regards

    Brad

  • What should I do for default values when a new line is created in a tabular presentation?

    Hello all-

    I have a tabular presentation that requires a few columns to be entered by the user when he or she creates a new line, but other fields in the column can just default to certain values.  How to set these values by default so that the user doesn't have to be bothered with enter no data except those which MUST be entered?

    An example:

    Form1

    CITY OF COUNTRIES IN THE REGION

    APAC JAPAN TOKYO

    SIDNEY AUSTRALIA, APAC

    APAC KOREA-SEOUL

    REGION is almost always APAC, then I want that by default.  The user can always adjust if necessary, but I want to put it to the user, only to save having to enter a value.  When the user clicks on the button to add a line, that I want to load this value immediately and leave the two empty fields so the user can enter what they want.

    Thank you!

    John

    Hello

    Go change this column.

    Under attributes of tabular form, you will find options to set the default value

    Kind regards
    Jari

  • How to apply the color to the line in a tabular presentation

    Hello

    My requirement is to apply the color to the line in a tabular presentation according to the conditions of the column value.


    Thank you

    1243 Tulasi wrote:
    I created a form of demo using the emp table

    but now it throw an error like "error report:"
    ORA-06550: line 1, column 29:
    PLS-00201: identifier 'CLERKS' must be declared.
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored

    http://Apex.Oracle.com/pls/Apex/f?p=16091:1:12227641756607:

    Workspace: tipper
    username: guest
    password: demo

    Please help me on this very urgent issue.

    Thank you.

    Check it now, only it was you must reference column names using bind variables syntax not #XXX #.

    Refer to the help when you click on * model column 1 Expression * in your report model.

    also, I noticed that you lose the background color when you mouseover it. To do this, you may need to remove the #HIGHLIGHT_ROW # of your model.

    See you soon,.
    Vikram

  • Adding empty lines to tabular form on page load

    Hello
    I use APEX 4.1.1 on 11gXE and Windows Vista.

    I created a tabular form on a page. When the page loads I want the::AddRow() to call x number of times where x is the value returned by a list of selection (from 1 to 10) on another page. If the value 3 is selected::AddRow() is called 3 times. This is similar to the example of Denes Kubicek, but I am interested in the use of a dynamic action instead. Here is the link to Dene

    http://Apex.Oracle.com/pls/OTN/f?p=31517:209

    I created a dynamic action that fires when the page loads and runs the following code:

    var i = 0, z = $v ('P1_NO_ITEMS');

    While (I < z)
    {
    ::AddRow();
    i ++ ;
    }

    When I put P1_NO_ITEMS 3 and go to the tabular presentation page, it loads but does not add 3 empty lines in the form. I tried hard coding a value into the javascript code and that works very well. for example

    var i = 0, z = 3;

    When I add an alert in the code the value of P1_NO_ITEMS seems to be undefined, and I get a white for its value. If I check the session state P1_NO_ITEMS has the value 3.

    Any ideas where I'm wrong? I have a feeling that it is something simple...
    Thank you very much
    Helen

    Hi Helen
    >
    I use APEX 4.1.1 on 11gXE and Windows Vista.

    I created a tabular form on a page. When the page loads I want the::AddRow() to call x number of times where x is the value returned by a list of selection (from 1 to 10) on another page. If the value 3 is selected::AddRow() is called 3 times. This is similar to the example of Denes Kubicek, but I am interested in the use of a dynamic action instead. Here is the link to Dene

    http://Apex.Oracle.com/pls/OTN/f?p=31517:209

    I created a dynamic action that fires when the page loads and runs the following code:

    var i = 0, z = $v ('P1_NO_ITEMS');
    >
    JavaScript works only on elements in the HTML DOM. Once you have navigated away Page 1 the P1_NO_ITEMS not available in JavaScript.
    >
    While (i<>
    {
    ::AddRow();
    i ++ ;
    }

    When I put P1_NO_ITEMS 3 and go to the tabular presentation page, it loads but does not add 3 empty lines in the form. I tried hard coding a value into the javascript code and that works very well. for example

    var i = 0, z = 3;

    When I add an alert in the code the value of P1_NO_ITEMS seems to be undefined, and I get a white for its value. If I check the session state P1_NO_ITEMS has the value 3.

    Any ideas where I'm wrong? I have a feeling that it is something simple... >

    Change

    z=$v('P1_NO_ITEMS');
    

    TO

    z='&P1_NO_ITEMS.';
    

    See you soon,.

  • Tabular presentation displays lines not (although it should be)

    HI -.

    I have a page that contains a tabular presentation, which I call in an iframe. Frame recharge parent the tabular presentation when an item on a jquery tree is selected (settings for the new page).

    I open a page of the child who doesn't have any line in, choose 'Add new lines', then back to the parent page and select another node in the tree. Loading of the page of the child, but no data is displayed in my tabular form - even if there is data. I get a header and the line of paging only. If I click on the button "next" pagination, refreshes the page of the child and the data is displayed as I hope.

    I think that paging is being upset in some sort of page being refreshed by the parent to halfway between the creation of a new line and saving it.

    How can I say specifically the page re - load with regular pagination values? Or I'm doing something too hard?

    Thanks in advance - I would be recognizing all of the ideas, we're really stuck!

    Rochelle,

    Looks like you need to reset pagination when you click on the tree to recharge your tabular presentation, you can do this by putting "RP" in the URL that you call, here the section in the doc that explains the syntax of the URL:

    http://download.Oracle.com/docs/CD/E17556_01/doc/user.40/e15517/concept.htm#BEIJCIAG

    Then look at this description of URL:

    f? p = App:Page:Session:Request:Debug:ClearCache:itemNames:itemValues:PrinterFriendly

    ... you need to get PR in the position where it says ClearCache, for example (assuming that your tabular form is on page 10):

    f? p = & APP_ID: 10: & SESSION. : RP

    I just want to mention that when you use 4 APEX, you can actually refresh regions in a table through dynamic actions, without iFrames.

    Kind regards
    Marc

  • Tabular presentation - defining a line just to the first of the default value.

    Hi all

    How to set a default tabular form only in the first row?
    When I click on "add row" I want the new line have an empty value.

    Thanks in advance.

    Hello

    When you add a new line to the shape of the table, all existing lines must be recorded in the database. You can, therefore, to verify the existence of these files and set the value of a page hidden as a result element. The default value for an item of tabular presentation can then rest on this hidden item.

    This is possible by setting the Source used for "Always,...» "on the hidden item called, say, P1_DEPTNO_DEFAULT, and the Source to something like:

    DECLARE
     X NUMBER;
    BEGIN
     SELECT COUNT(*) INTO X FROM EMP WHERE DEPTNO = :P1_DEPTNO;
     IF X > 0 THEN
      RETURN '';
     ELSE
      RETURN :P1_DEPTNO;
     END IF;
    END;
    

    It is a Type of Source of "body of the PL/SQL function.

    In this example, we will check if there are all the records with a DEPTNO value that matches the P1_DEPTNO EMP. If there is, then the tabular presentation must contain at least one line already, so we return an empty string. If there is no record, the tabular presentation should be empty, so return us the value of P1_DEPTNO.

    The default settings on the DEPTNO column in tabular form would then be:

    Default type: (name of the application or page element) Element
    Default: P1_DEPTNO_DEFAULT

    Andy

  • Problem with BLOB in a tabular presentation manual

    Hi all

    I created a manual tabular presentation. One of the elements is a BLOB type and shown as file browse on the form.

    I'm going to show a download link when the blob column is not null.

    I searched the forum and tried many ways, but nothing has worked so far. The form is available at apex.oracle.com.

    Here are the credentials to connect:

    Workspace: bobforum

    User: forum

    Password: abc123

    Application: 39196

    Page: 1

    http://Apex.Oracle.com/pls/Apex/f?p=39196:1

    I would be grateful if someone can help on this please.

    Thank you

    Zkay

    Hello

    Check your sample now.

    It should work, when inserting blob column files

    Kind regards
    Jari

  • Tabular presentation - column to turn it off (with picture) based on another value of the column

    Hi all

    I haven't worked much on tabular forms and JS. I'm looking for help in this regard.

    I'm working on a tabular presentation. with several editable fields... I need to disable a column (just for this single line), which contains an image, based on a field of LOV (static) list) (Y/N). The image column must be disabled if the value is N.

    My SQL for the report is something like this: (will keep things simple)

    Select

    emp_id,

    emp_name,

    static_list,

    (case when STATIC_LIST = "Y" THEN ' < a title = "Edit SAMPLE TBL" href = "f?) p = & APP_ID.:10: & APP_SESSION.:NO:P10_EMP_ID, P10_EMP_NAME :'|| EMP_ID | «, » || EMP_NAME | "" "> < img src =" "#IMAGE_PREFIX #SAMPLE.gif" border = '0' (> < /a > ' other ' ' end) as disable_col, "

    dept_name

    of sample_table

    I scoured the topics in this forum. Most of them were made using the table ID f_001, f_002.

    I tried to follow the same path by inspecting the item but the disable_col does not have any ID.  Let's say, f_003 is for the static list and f_004 is assigned to dept_name.

    I tried dynamic actions, but it did not work. Read in a topic that dynamic action does not work on tables. So I chose this approach. Is there a simpler way to solve this?

    need your help on how to proceed with this scenario. Thank you in advance.

    Versions: Apex: 4.2, DB: 11 g

    Thank you

    Daniel

    Hi Daniel_A,

    Daniel_A wrote:

    I did my job in Page 4.

    If the IS_VALID column is select as 'Yes' then the column hyper must be enabled, allowing the user to click on it. If she chose the 'no', then the column Hyper must be disabled for this line.

    The initial question about toggle the hyperlink is resolved. Check your App-> Page 4 35160.

    This is done with the help of two dynamic actions:

    • DA first loading of the Page / after updating of region "tabular":

    Event: After refresh

    Selection type: region

    Region: The other 'tabular '.

    Condition: No strings attached

    Action: Run the JavaScript Code

    Fire on loading the Page: Yes

    Code:

    $( 'select[name="f08"]' ).each(function() {
      if ( $(this).val() === "N" ) {
        $(this).closest("tr").find('td[headers="HYPER"]').find("a").addClass("apex_disabled").unbind("click");
      }
    });
    

    Items concerned: no item affected

    • Second DA on the evolution of the selection list:

    Event: change

    Selection type: jQuery Selector

    jQuery Selector: select [name = "f08"]

    Condition: No strings attached

    Action: Run the JavaScript Code

    Fire on loading the Page: No.

    Code:

    var el = this.triggeringElement;
    if ( el.value === "N" ) {
        $(el).closest("tr").find('td[headers="HYPER"]').find("a").addClass("apex_disabled").unbind("click");
    } else {
        $(el).closest("tr").find('td[headers="HYPER"]').find("a").removeClass("apex_disabled").bind("click");
    }
    

    Items concerned: no item affected

    NOTE: as the original question/topic related to toggle the image link in the column, for the problem with the Page 5, please create a new thread with the details.

    Kind regards

    Kiran

  • Impossible to perform a search using a VO after adding a line in OT

    HI guys,.

    I am new to OAF and need your help to solve the current problem that I face.

    We still use JDeveloper 9i (9.0.3.5) and the construction of a custom page for the establishment of a trust hierarchy.

    Background:

    Page has 2 fields of research in region 1, name and organization with of the LOV attached to it. At the same time a region has button to search and clear.

    Below, another region is present which shows the data retrieved via above criteria of search as a table and we also gave a button to add a new line (say add new line).

    We have defined an EO and later a VO based on the same, which is used for this page (from the base of single table).

    Problem:

    When I open a page and search (providing criteria search or search criteria) it returns the correct results. Once I click on the button Add NEW RANK I am able to add a line, and I check back-end. Problem starts after that, I can't make a research post that he keeps on his return / showing same result set that was present on the page after adding a line. I also found that the parameters set by setWhereClauseParam are correct in adding debugging instructions. But once the vo.executeQuery () executed and number of lines returned by vo.getFetchedRowCount is the same as the lines already present on the page (after adding a new line/operation). I've tried passing NULL values to setWhereClauseParam after you perform a commit on the assumption that the VO is not resetting correctly but it did not help.

    Any suggestion for me, experts?

    Code:

    Example of code written for the search button, click,

    public void Manualsearch (pageContext OAPageContext)

    {

    String S2 = pageContext.getParameter ("OrganizationCode");

    String S3 = pageContext.getParameter ("Employee");

    System.out.println ("test2" + S2);         System.out.println ("test3" + S3);

    OAViewObject vo = (OAViewObject) getFrBlogApproversVO1 ();

    If (S3! = null & &!) S3. Equals(""))

    {System.out.println ("employee" + S3);

    vo.setWhereClauseParam(0,S3);

    }

    on the other

    {vo.setWhereClauseParam(0,null);  }

    If (S2! = null & &!) S2. Equals(""))

    {System.out.println ("Org" + S2);

    vo.setWhereClauseParam(1,S2);

    }

    else {vo.setWhereClauseParam(1,null);  }

    vo.executeQuery ();

    If (VO.getFetchedRowCount () == 0)

    {System.out.println ("no line") ;}}

    else {System.out.println ("Rows") ;}

    }

    Example of code written for the click on the button Add NEW RANK.

    Public Sub frCreateRow()

    {OAViewObject vo1 = (OAViewObject) getFrBlogApproversVO1 ();}

    If (VO1.getFetchedRowCount () == 0)

    {vo1.setMaxFetchSize (0);}

    Line r = vo1.createRow ();

    VO1. InsertRow (r);

    r.setNewRowState (Row.STATUS_INITIALIZED);

    VO1. Last();

    }

    on the other

    {vo1.last ();

    VO1.setMaxFetchSize (0);

    Line r = vo1.createRow ();

    VO1. InsertRow (r);

    r.setNewRowState (Row.STATUS_INITIALIZED);

    }

    }

    Example of code written to record the click of a button,

    public void save (pageContext OAPageContext)

    {getTransaction () .commit ();}

    throw new OAException ("Lines recorded with success.", OAException.CONFIRMATION);

    }

    Thank you and best regards,

    Mihir Nahar

    I think I found the answer,

    Reason for this behavior of VO is due to below statement highlighted. I just commented the same and it behaves perfectly.

    Hope this helps others in the future.

    Public Sub frCreateRow()

    {OAViewObject vo1 = (OAViewObject) getFrBlogApproversVO1 ();}

    If (VO1.getFetchedRowCount () == 0)

    {vo1.setMaxFetchSize (0);}

    Line r = vo1.createRow ();

    VO1. InsertRow (r);

    r.setNewRowState (Row.STATUS_INITIALIZED);

    VO1. Last();

    }

    on the other

    {vo1.last ();

    VO1.setMaxFetchSize (0);

    Line r = vo1.createRow ();

    VO1. InsertRow (r);

    r.setNewRowState (Row.STATUS_INITIALIZED);

    }

    }

  • is it possible to toggle an element of tabular presentation according to the value of an element of the second?

    Hello world

    I have a tabular presentation based on a collection.   The column c050 (f30 cards) will be either Y/N.  If it is there, then I would enable the column c024 (f24 cards) (which is be based on lov radio button).  If the value of c050 = N, then disable c024.   There are potentially as many lines, and the c024 element would only be enable / disabled for the specific line.   So if line 1 is c050 = Y line 2 is C050 = N then rank 1 c024 is activated and 2nd c024 is disabled.  Hope that makes sense.

    I created a dynamic action called turn HMS fields.

    event = CHANGE

    selection type = jquery selector

    jQuery selector = input [name = "f30"]

    the condition EQUAL to

    value Y

    true action1 - enable, picker jquery, input [name = "f24"]

    real action 2 - alert, you added a sort of HMS.   There may be additional data to enter.  Thank you

    fake Action1 - disable jquery selector, input [name = "f24"]

    false action2 - alert, no worries of hms.

    Alerts in both cases show correctly... but nothing seems to happen to f24... What am I doing wrong?

    Thank you

    AGH! This is the first time you mention, that there is a radio button!  That changes a lot! As you can see, the format is different (f24_0001_0001) than what we discussed (f24_0001).

    Radio buttons have their own quirks.  My bad, I should have asked what you had.  But since you said your selectors original input were I just thought they are fields of text or something like that.

    How replace you a right drop-down list so that you can see all the work?  And understand it fully.

    Then you can work on the radio button option.

    If you don't get there... I will ask you to install an example in apex.oracle.com and give me credentials to sign in and have a look.

    I could re - try the js on my side with a radio, but it will take time.

    So, just to be clear... f30 is a drop down and f24 is a radio?

    See this line:

    $x_disableItem ("f24_" + row, true);

    Will NEVER find the radio buttons because it lacks the 3rd 0001 and 0002 (how many options do you have?)

    So maybe try you like this:

    $x_disableItem ("f24_" + line + '_0001', true);

    $x_disableItem ("f24_" + line + "_0002", true);

    ... keep for options...

    Do the same for the fake, of course.

    But I think that this needs a better approach if you have radio buttons.  I just need to get out.

    OK, go try things...

    Thank you

    -Jorge

  • Total of the dynamics in a tabular presentation

    I have a tabular presentation where people will be be detailing a sum of money. They would like to enter the amounts in the lines of the tabular form and as they enter into their they want out automatically at the top of the form so that they can see that it will match the amount they're trying to detail. How can I do this? I looked into dynamic action, but it does not seem possible with a tabular presentation, so it is maybe possible with Javascript? I have no idea how to do it well. Can anyone help?

    Thanks in advance. Apex version is 4.0.1.

    The problem with dynamic action is that it would be able to calculate the total of lines that he can see. But for example:

    http://Apex.Oracle.com/pls/Apex/f?p=45448:17

    Calculates the total when you lose the focus of an element.

    The problem is the loading of the page, it is this same calculation several times - so either disable the execute on property to load the page and add a dynamic action similar to the loading of the page so that it works only once, or simply put up with it.

    Anyway, the DA:

    Event: change
    Selection type: jQuery selector
    jQuery selector: input [name = "f03"]
    Action: run the JS code.
    Code:

    var total = 0;
    $('input[name="' + this.triggeringElement.name + '"]').each(function(){
      total+=parseInt(this.value);
    });
    $s('P17_TOTAL', total);
    

    This could be also an action define the true value, which is a little better you declaratively specify which element to assign instead of having in the JS code. In the case of the defined value, simply the variable on the last line of the JS code.

    for example, set the value with JS would become:

    var total = 0;
    $('input[name="' + this.triggeringElement.name + '"]').each(function(){
      total+=parseInt(this.value);
    });
    total;
    

Maybe you are looking for