Leaving a Page fires "Page Unload" dynamic action?

Hi,
Which Dynamic Action fires when I am leaving a page.
I have a page with lot of items, I want to fire alert based on some condition when user leaving that page (suppose user clicks to say some TAB), I used *"Page Unload"* dynamic action, but somehow it's not working.
Is there any other Event I have to use?
Thanks,
Deepak

Thanks.. VC
but I cannot use that plugin as I have a Page which call other pages using iFrame and I am facing some issue..
I have created a separate Post for this but not able to resolve it till now.. Here is the Link.
Re: "IFrame Region" Plugin / Save Before Exit (3.0.2) - Dialog box - Question
Thanks,
Deepak

Similar Messages

  • How to use dynamic action to fill multi item on a page ?

    Hi..
    I want to fill multi items on a page so I build a dynamic action ( Execute PL/SQL Code ) to do it .The problem is that when the page loads I can't see any data and I tried to see the session values using debug and I found data. Moreover when I save the row I got these data saved.
    So what is the magic there?
    Thanks

    Firstly, to get the multi-select populated with "pre-selected" values the easiest approach is to use Computation or Process at a process point On Load Before Header or After Header or Before Regions.
    All you need to do is populate your "Select List " page Item with : (colon) separated list of selected values. E.g is you want A,B and C out of A,B,C,D,E selected then get A:B:C into the Page Item.
    If you have used Dynamic Actions, what is your event on which the action fires? For Dynamic-Actions the page (HTML DOM) needs to be existing , so it must fire after the page has loaded.
    Regards,

  • Dynamic action setvalue from pl/sql function

    Hi,
    I have a currency table with exchange rate column.
    I created a form that allow user to select currency from the table and get the rate into Px_RATE page items.
    I would like to implement it using Dynamic action in apex 4
    Please help me on this case
    Thanks & regards

    Hi,
    You can achieve this by defining a dynamic action as follows...
    #1 - Right click on the page item used to select the currency (let's call it P1_CURRENCY for purposes of this example) and select 'Create Dynamic Action'
    #2 - Select 'Advanced' as we're going to use the 'Set Value' dynamic action type, which is not available in the 'Standard' branch of the wizard.
    #3 - Name your dynamic action, say 'GET RATE', click 'Next'.
    #4 - Leave the 'When' attributes as default, this just defines that the dynamic action will fire whenever the currency item changes, click 'Next'.
    #5 - For the 'True Action > Action' select 'Set Value'
    #6 - Think about whether you want to set the value on page load from the dynamic action also, if so leave the 'Fire on Page Load' checkbox checked.
    #7 - [Assuming you have a simple PL/SQL API that returns the rate, say get_rate for example] Select 'Set Type' of 'PL/SQL Function Body'
    #8 - For 'PL/SQL Function Body' specify something like: return get_rate(:P1_CURRENCY);#9 - For 'Page Items to Submit', specify the currency item P1_CURRENCY and click 'Next'
    #10 - For the 'Affected Elements' specify 'Item' and then select the page item where you want to return the rate value, say P1_RATE.
    #11 - Click 'Create'.
    Let me know if this works for you or if you have any further questions.
    Regards,
    Anthony.

  • Dynamic action with interactive report region refresh

    Hi!
    I'm using APEX 4.02
    I've got a page with 2 regions.
    Region1 is a (input) form
    Region2 is an interactive report on the same table as region 1
    When entering values on the form I'm trying to dynmically lookup similar records in the table with the interactive report.
    I've made a dynamic action on the change of the form fields which should refresh the interactive report region. I can see this one fires if I add a alert to debug if it fires.
    The dynamic report is based on a query with bind variables pointing to the form fields, for example
    where
    field1 = :P2_FIELD1
    This works great on the page load, so no dynamic action is fired but I can see the rows in the report region are the ones I am looking for.
    But the refresh of the report region is not working, it is never refreshing and/or showing the correct data after a change of the form fields, so it looks like the dynamic action "refresh region" is not working on the interactive report.
    Any ideas why this can go wrong ?
    I would like to solve this using standard dynamic actions and preferrably not via PL/SQL or JS, shoudl be possible if I should believe the documentation... ;)
    Cheers
    Bas
    Edited by: bklerk on 26-apr-2011 3:07

    Hi,
    When you change value to item, I assume you do not set value to session state.
    Use interactive report advanced attributes "Page Items to Submit" , set items session state before report is refreshed.
    http://download.oracle.com/docs/cd/E17556_01/doc/user.40/e15517/app_comp.htm#sthref1235
    Similar post/issue here
    Hide and show region - hides on refresh
    Regards,
    Jari

  • Help using a dynamic action to update tabular form items (specifically radio button) based on collection

    Hi Everyone, I have posted this question in the past and made huge progress with Denes Kubicek's help:  https://apex.oracle.com/pls/apex/f?p=31517:294:115851992029365::::: based on my earlier question posted: https://forums.oracle.com/forums/thread.jspa?threadID=2537494
    I am struggling with one item in my tabular form.  It is a radio button.  The choices all appear properly, but the value is not saved in the collection (and hence, not saved in the table).  All other items in the tabular form save properly.
    here is what I have for the query.   It is item c024 (which maps to ;'f03'), which is defined as a radio LOV based on an existing LOV.
    Currently I have:
    2 page items:
    P110_ID
    P110_VALUE
    Dynamic action called CHANGE COLUMN:
    event: CHANGE
    selection type: jQUERY Selector
    jQuery:
    jQuery Select = input[name='f03'],select[name'f08'],select[name='f09'],input[name='f10'],input[name='f11'],input[name='f12'],select[name='f40'],input[name='f21'],input[name='f22'],input[name='f23'],input[name='f50']
    event scope: Dynamic
    true action#1: set value P110_ID javascript expression this.triggeringElement.id
    true action#2: set value P110_VALUE javascript expression this.triggeringElement.value
    true action#3: execute pl/sql code
    declare
      v_member number;
      v_seq number;
    begin
      v_member := TO_NUMBER (SUBSTR (:p110_id, 2, 2));
      select ltrim(substr(:p110_ID,5,4),'0') into v_seq from dual;
      safis_collections.update_column(v_seq,
                                    v_member,
                                    :p110_value);
    true ation#4 refresh region :LANDINGS_COLLECTION
    the tabular form is based on the query:
    SELECT
    apex_item.text(1,seq_id,'','','id="f01_'||seq_id,'','') "DeleteRow",
    seq_id,
    seq_id display_seq_id,
    apex_item.text_from_LOV(c004,'SPECIES')||'-'||apex_item.text_from_LOV(c005,'GRADE')||'-'||apex_item.text_from_LOV(c006,'MARKETCODE')||'-'||apex_item.text_from_LOV_query(c007,'select unit_of_measure d, unit_of_measure r from species_qc') unit,
    apex_item.select_list_from_LOV(8,c008,'DISPOSITIONS','onchange="getAllDisposition('||seq_id||')"','YES','0','  -- Select Favorite --  ','f08_'||seq_id,'') Disposition,
    apex_item.select_list_from_LOV(9,c009,'GEARS','style="background-color:#FBEC5D; "onFocus="checkGearPreviousFocus('||seq_id||');"onchange="getAllGears('||seq_id||')"','YES','3333','-- Select Favorite --','f09_'||seq_id,'') Gear,
    apex_item.text(10,TO_NUMBER(c010),5,null, 'onchange="setTotal('||seq_id||')"','f10_'||seq_id,'') Quantity,
    apex_item.text(11,TO_NUMBER(c011),5,null,'onchange="getPriceBoundaries('||seq_id||')"','f11_'||seq_id,'') Price,
    apex_item.text(12, TO_NUMBER(c012),5,null, 'onchange="changePrice
    ('||seq_id||')" onKeyDown="selectDollarsFocus('||seq_id||',event);"','f12_'||seq_id,'') Dollars,
    decode(c013,'Y',apex_item.text(14, c014,30,null,'style="background-color:#FBEC5D;" onClick="onFocusAreaFished('||seq_id||');"','f14_'||seq_id,''),'N','N/A') Area_Fished,
    decode(c017,'Y',apex_item.text(18, c018,4,null,'style="background-color:#FBEC5D; "onBlur="setUnitQuantity('||seq_id||')"','f18_'||seq_id,''),'N','N/A') UNIT_QUANTITY,
    decode(c017,'Y',apex_item.text(19,'CN',3,null,'readOnly=readOnly;','f19_'||seq_id,''),'N','N/A') UNIT_COUNT,
    c024 hms_flag,
    decode(c050,'Y',apex_item.checkbox(21,'Y','id="f21_'||seq_id||'" style="background-color:#FBEC5D; " onClick="alterYes('||seq_id||');" onKeyPress="alterYes('||seq_id||');"',c021),'N','N/A') FinsAttached,
    decode(c050,'Y',apex_item.checkbox(22,'N','id="f22_'||seq_id||'" style="background-color:#FBEC5D;" onClick="alterNo('||seq_id||');" onKeyPress="alterNo('||seq_id||');"',c022),'N','N/A') FinsNotAttached,
    decode(c050,'Y',apex_item.checkbox(23,'U','id="f23_'||seq_id||'" style="background-color:#FBEC5D;" onClick="alterUnk('||seq_id||');" onKeyPress="alterUnk('||seq_id||');"',c023),'N','N/A') FinsUnknown,
    decode(c050,'Y',apex_item.textarea(28,c028,3,null,null,'f28_'||seq_id,''),'N','N/A') Explanation,
    decode(c024,'N',apex_item.select_list_from_LOV(29,c029,'HMSNATURE','onchange="saveNature('||seq_id||')"','YES','A','-- Select Nature of Sale --','f29_'||seq_id,''),'U',apex_item.select_list_from_LOV(29,c029,'HMSNATURE','onchange="saveNature('||seq_id||')"','YES','A','-- Select Nature of Sale --','f29_'||seq_id,''),'Y','N/A') Nature_Of_Sale,
    decode(c020,'Y',
    apex_item.select_list_from_LOV(40,c040,'HMS_AREA_CODE','style="background-color:#FBEC5D;"',null,null,null,'f40_'||seq_id,''),
    'N','N/A') HMS_AREA_CODE,
    c020,c050,
    decode(c020,'Y',
    apex_item.text(41,TO_NUMBER(c041),5,null,null,'f41_'||seq_id,''),
    'N','N/A') Sale_Price
    from apex_collections
    where collection_name = 'SPECIES_COLLECTION' order by seq_id
    I have noticed the following:
    when I change column C011 (price) the following values are set in the dynamic action:
    P110_ID = f11_1
    P110_VALUE = whatever I change the price to.
    when I change the column C024 (hms_flag), the following values are set:
    P110_ID = f03_0001
    P110_VALUE = whatever I change hms_flag to.
    the region is refreshed in my dynamic action, and the change for hms_flag does not hold.  I have tested the SQL query that generates the value for v_SEQ in the dynamic action.   In both a change to price and HMS_FLAG it appears valid
    select ltrim(substr(:p110_ID,5,4),'0') into v_seq from dual;
    if f11_1, v_seq:= 1
    if f03_0001, v_seq := 1
    thank you!

    solved.  sort of. 
    field c024 references f03.
    the Dynamic ACtion, step 4 calculates v_member by taking a substring of P110_ID...and in all other fields, the column and the field (fxx) are the same value....except for c024.
    I am not certain exactly how to resolve, but see the problem.

  • Dynamic action - Cache server data

    APEX 4.2.2
    Is there a way to cache server side data in a global (page/document level) Javascript vector (bunch of key-value pairs) (associative array, array of objects or some such)? This way the data can be used by subsequent dynamic actions' Javascript code without querying the server over and over.
    I see that apex_util.json_from_sql is still undocumented after all these years. Are there any examples of using that API to do this sort of thing? Can someone please share?
    Thanks

    https://apex.oracle.com/pls/apex/f?p=57688:24
    I took a shot at this and it seems to work well using Javascript global objects for data storage. Hope this helps someone.
    1. Page attributes - Javascript global variables var gData,gLookup={};2. On-demand application process Get_Emps as apex_util.json_from_sql('select empno,ename from emp');3. Page Load dynamic action to invoke the application process and cache the data var get = new htmldb_Get(null,$v('pFlowId'),'APPLICATION_PROCESS=Get_Emps',$v('pFlowStepId'));
    var retval=get.get();get=null;
    gData=apex.jQuery.parseJSON(retval);
    $.each(gData.row,function(i,obj){
       gLookup[obj.EMPNO]=obj.ENAME;
    });4. EMPNO page item - Standard OnChange dynamic action to SetValue of ENAME page item using the cached data - Javascript expression gLookup[$v(this.triggeringElement)]
    We document something when it is ready to be supported. This specific procedure isn't something we haven't invested in, and thus, per our discretion, have elected not to document or support it at this time.Fair enough.

  • Dynamic Action - Fire on Page Load problem

    Greeeting,
    i created report with dynamic action Event = page load and action = submit . Event scope = Bind,
    But it is submitting page continously , and i want to submit once..
    how i will handle this.. created example please click on link
    http://apex.oracle.com/pls/apex/f?p=20294:3:1276651806269601:::::

    Hi,
    >
    Earlier on you said:
    Page 1 Sales
    Page 2 Sales Detail
    items in sales page are product name id and rate.
    <b>Product name on Page1 is linked with sales detail page 2.</b>
    >
    How? From your query this relation is not evident.
    >
    Now you say:
    Parameters:
    1- From Date
    2- Date
    3- Choose Area
    >
    You logic is rather mixed up. What is it that you want to achieve? What are the default values for the 3 parameters, if any? Which value on Page 2 is being set while navigating from Page 1?
    Two wrongs do not make a right. So first of all abandon the DA that Sumbit Page on Page Load and focus on the fundamental issue related to your logic.
    The suggested modified query below is NOT WHAT YOU NEED FOR YOUR REQUIREMENT but I am posting it so that you can at least get the report running and then work to fix your logic.
    SELECT SS.OUTLET_ID,
      SS.CAT_ID,
      SS.ITEM_CDE,
      SS.ITEM_NME,
      SUM(DECODE(RETURN_IND,'N',ITEM_QTY,'Y',ITEM_QTY*-1)) QTY,
      SUM(DECODE(RETURN_IND,'N',ITEM_QTY,'Y',ITEM_QTY*-1)*ITEM_RTE) AMT,
      O.OUTLET_NME
    FROM
      (SELECT OSM.OUTLET_ID,
        PI.CAT_ID,
        PI.ITEM_CDE,
        PI.ITEM_NME ITEM_NME,
        OSM.RETURN_IND,
        OSD.ITEM_QTY,
        OSD.ITEM_RTE
      FROM OUTLET_PRICE OP,
        OUTLET_SALES_MASTER OSM,
        OUTLET_SALES_DETAIL OSD,
        POS_ITEM PI
      WHERE OSM.OUTLET_SALES_MASTER_ID = OSD.OUTLET_SALES_MASTER_ID
      AND OSM.OUTLET_ID                = OSD.OUTLET_ID
      AND OSD.OUTLET_PRICE_ID          = OP.OUTLET_PRICE_ID
      AND PI.ITEM_ID                   = OP.ITEM_ID
      /* AND OSM.OUTLET_ID                = :P2_SELECT_OUTLET
      AND OSM.CONSIDERED_DTE BETWEEN :P2_FROM AND :P2_TO */
      AND OSM.OUTLET_ID                LIKE NVL( :P2_SELECT_OUTLET,'%')
      AND OSM.CONSIDERED_DTE BETWEEN NVL(:P2_FROM,TRUNC(SYSDATE)-1) AND NVL(:P2_TO,TRUNC(SYSDATE))
      UNION ALL
      SELECT OSM.OUTLET_ID,
        PI.CAT_ID,
        PI.ITEM_CDE,
        PI.ITEM_NME ITEM_NME,
        OSM.RETURN_IND,
        OSD.ITEM_QTY,
        OSD.ITEM_RTE
      FROM OUTLET_PRICE OP,
        OUTLET_SALES_MASTER OSM,
        OUTLET_SALES_DETAIL OSD,
        ITEM I,
        ITEM_CATEGORY IC,
        POS_ITEM PI
      WHERE OSM.OUTLET_SALES_MASTER_ID = OSD.OUTLET_SALES_MASTER_ID
      AND OSM.OUTLET_ID                = OSD.OUTLET_ID
      --AND OSM.OUTLET_ID                = :P2_SELECT_OUTLET
      AND OSM.OUTLET_ID                LIKE NVL(:P2_SELECT_OUTLET,'%')
      AND OSD.OUTLET_PRICE_ID          = OP.OUTLET_PRICE_ID
      AND OP.ITEM_ID                   = I.ITEM_ID
      AND I.CAT_ID                     = IC.CAT_ID
      AND IC.TEMP_ITEM_ID              = PI.ITEM_ID
      /* AND OSM.CONSIDERED_DTE BETWEEN :P2_FROM AND :P2_TO */
      AND OSM.CONSIDERED_DTE BETWEEN NVL(:P2_FROM,TRUNC(SYSDATE)-1) AND NVL(:P2_TO,TRUNC(SYSDATE))
      )SS ,
      OUTLET O
    WHERE SS.OUTLET_ID = O.OUTLET_ID
    GROUP BY SS.OUTLET_ID,
      SS.CAT_ID,
      SS.ITEM_CDE,
      SS.ITEM_NME,
      O.OUTLET_NME
    ORDER BY ITEM_NMECheers,

  • About creating an AJAX page with DML procedures  using dynamic actions

    About creating an AJAX page with DML procedures in APEX using dynamic actions. Help with limitations.
    I want to share my experience, creating AJAX procedures in APEX 4.0.
    LIMITATIONS
    •     How Can I Hide UPDATE button while I press NEW button. ??
    •     How Can I Hide CREATE button while I’m UPDATING A RECORD. ??
    •     How can I avoid multiple Inserts or Updates. ??
    Here are the steps to create an AJAX Updatable Form using the sample table DEPTS. You can see the demo here: [http://apex.oracle.com/pls/apex/f?p=15488:1]
    1)     Create a blank page
    2)     Add a Report Region for departments (It shows the columns deptno, dname and loc).
    3)     Add an HTML Region and create the elements to edit a Department.
    a.     P1_DEPTNO (Hidden to store PK)
    b.     P1_DNAME (Text Field)
    c.     P1_LOC (Text Field)
    4)     You also have to create a hidden element called P1_ACTION. This will help to trigger dynamic actions to perform DMLs.
    5)     Open Page Attributes and in the HTML Header Section include the following code.
    <script>
         function doSelect(pId){
              $x_Value(‘P1_DEPTNO’,pId);
              $x_Value(‘P1_ACTION’,’SELECT’);
    </script>
    6)     Modify the column DEPTNO in the report, to add column link. In the link text you can use #DEPTNO# , in target you must select ‘URL ‘ and in the URL field write javascript:doSelect(#DEPTNO#);
    7)     Create the following Buttons in the Form Region.
    CANCEL     Redirects to URL: javascript:$x_Value(‘P150_ACTION’,’CANCEL’);
    NEW          Redirects to URL: javascript:$x_Value(‘P150_ACTION’,’NEW’);
    SAVE          Redirects to URL: javascript:$x_Value(‘P150_ACTION’,’UPDATE’);
    CREATE          Redirects to URL: javascript:$x_Value(‘P150_ACTION’,’CREATE’);
    8)     Create the following Dynamic Action to Select a Department
    Name:     Select Dept
    Event:     Change
    Selection Type:     Item(s)
    Item(s):     P1_ACTION
    Condition:     equal to
    Value:     SELECT
    Action:     Execute PL/SQL Code
    PL/SQL Code:     
    SELECT dname, loc
    INTO :P1_DNAME, :P1_LOC
    FROM dept
    WHERE deptno = :P1_DEPTNO;
    Page Items to Submit:     P1_DEPTNO, P1_DNAME, P1_LOC     
    Don’t include any false action and create the Dynamic Action.
    The first limitation, the value of page elements don’t do refresh so I added the following true actions to the dynamic action AFTER Execute PL/SQL Code.
    Action:     Set Value
    Unmark *‘Fire on page load’* and *‘Stop execution on error’*
    Set Type:     PL/SQL Expression
    PL/SQL Expression:     :P1_DNAME
    Page Items to submit:     (none) (leave it blank)
    Affected Elements: Item P1_DNAME
    Action:     Set Value
    Unmark *‘Fire on page load’* and *‘Stop execution on error’*
    Set Type:     PL/SQL Expression
    PL/SQL Expression:     :P1_LOC
    Page Items to submit:     (none) (leave it blank)
    Affected Elements: Item P1_LOC
    These actions allow refresh the items display value.
    9)     Create the following Dynamic Action to Update a Department
    Name:     Update Dept
    Event:     Change
    Selection Type:     Item(s)
    Item(s):     P1_ACTION
    Condition:     equal to
    Value:     CREATE
    Action:     Execute PL/SQL Code
    PL/SQL Code:     
    UPDATE dept SET
    dname = :P1_DNAME,
    loc = :P1_LOC
    WHERE deptno = :P1_DEPTNO;
    Page Items to Submit:     P1_DEPTNO, P1_DNAME, P1_LOC     
    Don’t include any false action and create the Dynamic Action.
    Include the following True Actions BEFORE the Execute PL/SQL Code true Action.
    Action:     Set Value
    Unmark ‘Fire on page load’ and ‘Stop execution on error’
    Set Type:     PL/SQL Expression
    PL/SQL Expression:     :P1_DNAME
    Page Items to submit:     P1_DNAME
    Affected Elements: Item P1_DNAME
    Action:     Set Value
    Unmark *‘Fire on page load’* and *‘Stop execution on error’*
    Set Type:     PL/SQL Expression
    PL/SQL Expression:     :P1_LOC
    Page Items to submit:     P1_LOC
    Affected Elements: Item P1_LOC
    These actions allow refresh the items display value.
    Finally to refresh the Departments report, add the following true action at the end
    Action:     Refresh
    Affected Elements: Region Departments
    10)     Create the following Dynamic Action to Create a Department
    Name:     Create Dept
    Event:     Change
    Selection Type:     Item(s)
    Item(s):     P1_ACTION
    Condition:     equal to
    Value:     CREATE
    Action:     Execute PL/SQL Code
    PL/SQL Code:     
    INSERT INTO dept(deptno,dname,loc)
    VALUES (:P1_DEPTNO,:P1_DNAME,:P1_LOC);
    Page Items to Submit:     P1_DEPTNO, P1_DNAME, P1_LOC     
    Don’t include any false action and create the Dynamic Action.
    Include the following True Actions BEFORE the Execute PL/SQL Code true Action.
    Action:     Set Value
    Unmark *‘Fire on page load’* and *‘Stop execution on error’*
    Set Type:     PL/SQL Function Body
    PL/SQL Function Body:     
    DECLARE
    v_pk NUMBER;
    BEGIN
    SELECT DEPT_SEQ.nextval INTO v_pk FROM DUAL;; -- or any other existing sequence
    RETURN v_pk;
    END;
    Page Items to submit:     P1_DEPTNO
    Affected Elements: Item P1_DEPTNO
    Action:     Set Value
    Unmark *‘Fire on page load’* and *‘Stop execution on error’*
    Set Type:     PL/SQL Expression
    PL/SQL Expression:     :P1_DNAME
    Page Items to submit:     P1_DNAME
    Affected Elements: Item P1_DNAME
    Action:     Set Value
    Unmark ‘Fire on page load’ and ‘Stop execution on error’
    Set Type:     PL/SQL Expression
    PL/SQL Expression:     :P1_LOC
    Page Items to submit:     P1_LOC
    Affected Elements: Item P1_LOC
    These actions allow refresh the items display value.
    Finally to refresh the Departments report, add the following true action at the end
    Action:     Refresh
    Affected Elements: Region Departments
    11)     Create the following Dynamic Action to delete a department
    Name:     Delete Dept
    Event:     Change
    Selection Type:     Item(s)
    Item(s):     P1_ACTION
    Condition:     equal to
    Value:     DELETE
    Action:     Execute PL/SQL Code
    PL/SQL Code:     
    DELETE dept
    WHERE deptno = :P1_DEPTNO;
    Page Items to Submit:     P1_DEPTNO
    Don’t include any false action and create the Dynamic Action.
    Include the following True Actions AFTER the Execute PL/SQL Code true Action.
    Action:     Refresh
    Affected Elements: Region Departments
    Action:     Clear
    Unmark ‘Fire on page load’
    Affected Elements: Items P1_DEPTNO, P1_DNAME, P1_LOC
    12)     Finally Create the following Dynamic Action for the NEW event
    Name:     New Dept
    Event:     Change
    Selection Type:     Item(s)
    Item(s):     P1_ACTION
    Condition:     equal to
    Value:     NEW
    Action:     Clear
    Unmark *‘Fire on page load’*
    Affected Elements: Items P1_DEPTNO, P1_DNAME, P1_LOC

    I need some help to solve this issues
    •     How Can I Hide UPDATE button while I press NEW button. ??
    •     How Can I Hide CREATE button while I’m UPDATING A RECORD. ??
    •     How can I avoid multiple Inserts or Updates. ??

  • Apex 4.2 dynamic action to refresh a report region on a different page

    Hi,
    I open up a pop up window from a report region. When the user is done in the pop-up window and closes it, can I trigger a refresh on the report region using dynamic actions without actually reloading the whole page? I know I can use dynamic action on a page to refresh the report region on the same page.
    Thanks,
    Sinan

    Sinan,
    So long as the region to be refreshed is still loaded, you can do this. I don't know how you are loading your pop-up or unloading it but, the principle should be the same as what I provide below.
    Assume that you have set the static ID for your report to MY_REPORT. (Be sure you have checked "Allow Partial Page Refresh" in the Report Attributes).
    $('#confirmBox').find('div#userConfirmationMessage').html( '<span class="userInputRequest">Would you to Refresh your Report?</span>' );
    $('#confirmBox').dialog(
        autoOpen: true,
        modal: true,
        title: 'Refresh Conformation',
        buttons:
            'No': function ()
                $(this).dialog('close');
            'Yes': function ()
                $(this).dialog('close');
                 $('#MY_REPORT').trigger('apexrefresh');
    -Joe

  • Creating two dynamic action in a page

    Hi,
    I have created two dynamic action under the page_items(p6_item,p6_item1 both are hidden).
    First dynamic action under p6_item is action1.
    properties of action Event-> Change
    Selection_Type->Item
    Item-> p6_Item
    Value-> show
    (When i Hit the button viewall it should only display region1)
    True Action:
    sequence->10, Action->Show, Fire->Yes, Selection Type->region, Region->region1
    sequence->20, Action->Hide, Fire->Yes, Selection Type->region, Region->region2
    False action:
    sequence->30, Action->Hide, Fire->Yes, Selection Type->region, Region->region1
    Second Dynamic action under p6_item1 is action2
    properties of action Event-> Change
    Selection_Type->Item
    Item-> p6_Item1
    Value-> show
    (When i Hit the button Search it should only display region2)
    True Action:
    sequence->10, Action->Show, Fire->Yes, Selection Type->region, Region->region2
    sequence->20, Action->Hide, Fire->Yes, Selection Type->region, Region->region1
    False action:
    sequence->30, Action->Hide, Fire->Yes, Selection Type->region, Region->region2
    Here the problem is, when i hit the viewall button it is not displaying region1 instead region2 is displayin region1 is hidden. when i hit the Search Button it is displaying region2 , region1 is hidden. Foer me, When viewall hitted region1 should only display not region2. When Search button hitted region2 should only display not region1.

    Hi little foot,
    I have created my page in apex.oracle.com. you can clearly see the issue which i am having in the page.
    Workspace:listen
    Username: [email protected]
    Password:apex
    Application Name: 45665
    Page: page1

  • How to fire an event dynamically in JSF Page

    Hi All
    How to fire an event dynamically in JSF Page?
    Thanks
    Sudhakar

    Hi,
    Thanks for the response. I mean to say, if I create the components dynamically then how can I fire events for those components.
    In otherwords,
    If I create the Button dynamically with particular ID being set to that component, then how can I call button action event when the button is clicked??
    Hope you understand
    What is the role of MethodBinding mechanism here??
    Thanks
    Sudhakar Chavali

  • APEX 4.0.1: restriction on maximum number of dynamic actions on a page?

    Hello,
    I would like to know if there is a restriction on the number of dynamic actions on a page.
    I have a page with 29 dynamic actions. All works fine on the page.
    If I create another dynamic action that only display an alert or does anything else, I have the error message HTTP 404 when I try do display the page.
    If I delete an old dynamic action and create a new one then the page works fine.
    So after several tests, it seems that there is a maximum number of DA on a page but can someone confirm that?
    Environment:
    APEX 4.0.1
    Embedded PL/SQL Gateway
    Regards,
    Sddc

    I stand corrected in that some limits are acknowledged:
    http://download.oracle.com/docs/cd/E17556_01/doc/user.40/e15517/limits.htm
    Where are people getting these ideas that normal form or "Codd" said that there was a
    limit on columns and if you had more columns than a database product found convenient to implement that it was a 'design defect'? I took database management as an undergrad and in grad school and there was NO rule about number of columns. Anyone who says there is is shoveling pure bs. Even if there were such a rule, and there isn't, it is very inadvisable for a vendor who allows 1000 columns in a table in their database product to impose a limit that is 1/10 of that in an interface to their database. (And btw you can create a table (A 'wide' table, in sqlserver with 30,000 columns according to this:
    http://msdn.microsoft.com/en-us/library/ms143432.aspx )
    Artificially dividing up data instruments that were administered/collected at one time into pieces in separate tables, just to make a vendor's developers' life easier and more convenient, or just to keep the product from competing with the extremely extremely expensive "enterprise" products the vendor sells, is not acceptable.
    Splitting highly related data into separate tables for no reason other than the
    interface is not capable of handling it, creates a load of problems that would not otherwise
    exist. What if the user enters less than all the parts? Then someone has to figure out if the parts not entered had no data recorded in the source or if they were simply accidentally skipped. Basically someone or a program would have to enter those pages and denote they had no content if that were the case. Much more logic, much more opportunity for error vs keeping data that was highly associated together.
    A software vendor can apply whatever limits they want and no one can stop them, that's for sure. But what would be better here is making these more clear up front. This is a "rad" development tool for very small and not hugely complex forms and reports. Be clear and there will not be people royally steamed over spending their time and money evaluating a product that is not designed to do much of what people need it to do. This stuff should be in an FAQ and the top of the forum.

  • Is it possible in a before-page-submit dynamic action to cancel processing?

    I have a page where when the user submits, I check certain conditions and prompt the user with a confirmation ("are you really sure you want to submit this...?") and if they press OK (javascript true) continue to submit as normal, else (javascript false) the page should stop submitting.
    I know I can do this by putting Javascript code on whatever buttons I need to such that they're prompted from whatever appropriate button but I then thought it might be more elegant to just put it in one place in a before-page-submit DA.
    So I figured that in my DA for a before-page-submit I'd try explicitly returning true or false thinking that I returned true it would continue to submit but if false it would stop submitting. Unfortunately no dice.
    Example:
    Dynamic Action
    Before Page Submit
    Condition (Javascript Expression): (this.data=="SAVE")||(this.data=="MULTI_ROW_DELETE")
    var response=checkPbcDml();
    alert(response); //for debugging and I do properly get true or false back
    if(!response)
      return(false);
    else
      return(true);So I'd like return(false) to stop the submission process (was only guessing that it'd work, and it doesn't). Is there any other javascript command that I could execute to cancel the submission processing?
    Yes I know that I really can do this on my buttons and it'll work...
    javascript:if(checkPbcDml())apex.confirm(htmldb_delete_message,'DELETE');
    javascript:if(checkPbcDml())apex.submit('SAVE');...but was just hoping to do something in the DA as a matter of elegance to put code in one place rather than two places.
    Edited by: gti_matt on Jun 14, 2012 10:30 AM

    trent wrote:
    Personally, I'd just try to utilise the confirm action - probably achieved by incorporating the checkPbcDml() function into the dynamic action condition, at the sime time you are checking the request value.Aha! That's it.
    The "Confirm" DA action's OK/Cancel response is evaluated by the "Before Page Submit" and cancels the processing.
    What I did was:
    1. Looked at my old function's conditions:
    function checkPbcDml()
      if (($v('P265_FREEZE_FLAG')=='Y') && ($v('P265_PUR_MFG')=='M'))
        return(true);
      else
        return(confirm("Part Bid Categories information will only be saved from this page for frozen &F182_MAKE_TEXT. parts.\nDo you want to continue with this action anyway?"));
    }2. Appended them to the existing DA conditions that were evaluating the save or multi-row-delete request:
    ((this.data=="SAVE")||(this.data=="MULTI_ROW_DELETE")) && (!(($v('P265_FREEZE_FLAG')=='Y') && ($v('P265_PUR_MFG')=='M')))3. And created a Confirm action with that message text and removed my checkPbcDml() function.

  • APEX dynamic action - How to hide an item after the page loads

    Hello
    I have a form  with  item  Type,  lesson and page.   I want to create a  dynamic action like "on page load" if Type = x then don't show lesson and page items. .
    How do I say if Type=x then  don't show lesson and page. otherwise show them.
    Please note Dynamic action,  Event=Page load
    Thanks

    create dynamic action like
    Event:Change
    Selection Type:Item
    Item:Type
    Condition:Equal To
    value:X
    Select Action:Hide
    Select Items to hide
    also create opposite false action
    and click on page checkbox below action to yes
    Hope this may helps
    pars.

  • How to add a link to html region to fire a dynamic action?

    Hi, guys:
    I need to add a hyper link to a html region (I wish it could be a button :( ) , the value of items in this region is loaded by a pl/sql process before loading header. And this link needs to fire a dynamic action to update database. I know how to add a hyper link to this region, but how to set this link so I can fire a dynamic action by clicking this link, could anyone give me a hint?
    Thanks a lot in advance.
    Sam
    Edited by: lxiscas on Apr 11, 2013 5:04 PM

    Hi, Jorge:
    Thanks for your reply. I cannot use updateRec, I have to use my own PL/SQL procedure. I tried to use similar way as people set dynamic action for modal page.
    I set column link for ncic_approve_link
    SELECT SOR_ALIAS.ALIAS_ID,
    SOR_ALIAS.OFFENDER_ID,
    SOR_ALIAS.FIRST_NAME|| ' '|| SOR_ALIAS.MIDDLE_NAME|| ' '|| SOR_ALIAS.LAST_NAME || ' ' ||  SOR_ALIAS.SIR_NAME   AS " Alias Name ",
    NVL(SOR_ALIAS.NICKNAME, 'No Nick names ') AS "Nick Name",
    (case when SOR_ALIAS.ncic_verify_date is null then 'NCIC' else null end) ncic_approve_link
    FROM SOR_ALIAS
    WHERE SOR_ALIAS.OFFENDER_ID    = :p216_detail
    AND SOR_ALIAS.ADMIN_VALIDATED IS NOT NULL
    AND upper(SOR_ALIAS.STATUS)    = upper('active')the link attributes is
    onclick="return false;" class="alias_ncic" title="NCIC Approve"then I pass two values to two hidden variables:
    P216_H_NCIC_APPROVE_TABLE_NAME--->'SOR_ALIAS'
    P216_H_NCIC_APPROVE_KEY_VALUE--->#ALIAS_ID#
    and I declare a dynamic action to execute PL/SQl code as :
    event: click
    selection type: JQuery seclector
    JQuery selector: a.alias_ncic
    declare
    begin
      sor_admin.update_NCIC_verify_date(:P216_H_NCIC_APPROVE_TABLE_NAME, :P216_H_NCIC_APPROVE_KEY_VALUE);
    end;However, the PL/SQL was called but raised exception that both the parameters are null. It looks when user click the column link, the value is not passed to hidden items. Could you help me on this?
    APEX 4.1
    Oracle 11G R2
    Thanks.
    Sam
    Edited by: lxiscas on Apr 29, 2013 10:00 AM
    Edited by: lxiscas on Apr 29, 2013 10:01 AM

Maybe you are looking for